{"raw_statement":[{"iden":"problem statement","content":"There is a tree with $NM+1$ vertices numbered $0$ to $NM$. The $i$\\-th edge ($1 \\le i \\le NM$) connects vertices $i$ and $\\max(i-N,0)$.\nInitially, vertex $i$ is colored with color $i \\bmod N$. You can perform the following operation zero or more times:\n\n*   Choose two vertices $u$ and $v$ connected by an edge. Repaint the color of vertex $u$ with that of vertex $v$.\n\nFind the number, modulo $998244353$, of possible trees after the operations. Two trees are distinguished if and only if some vertex has different colors."},{"iden":"constraints","content":"*   $1 \\le N, M \\le 2 \\times 10^5$"},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $M$"},{"iden":"sample input 1","content":"3 1"},{"iden":"sample output 1","content":"42\n\nOne possible sequence of operations is as follows. Including this one, there are $42$ possible final trees.\n![image](https://img.atcoder.jp/arc176/star.png)"},{"iden":"sample input 2","content":"4 2"},{"iden":"sample output 2","content":"219100"},{"iden":"sample input 3","content":"20 24"},{"iden":"sample output 3","content":"984288778"},{"iden":"sample input 4","content":"123456 112233"},{"iden":"sample output 4","content":"764098676"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}