{"raw_statement":[{"iden":"problem statement","content":"You are given positive integers $N$ and $M$. Among the $2^{NM}$ matrices $A$ with $N$ rows and $M$ columns where each element is $0$ or $1$, find the number, modulo $998244353$, of ones that satisfy the following condition:\n\n*   $A_{a, b} \\times A_{c, d} \\leq A_{a, d} \\times A_{c, b}$ for every quadruple of integers $(a, b, c, d)$ such that $1 \\leq a < c \\leq N$ and $1 \\leq b < d \\leq M$."},{"iden":"constraints","content":"*   $1 \\leq N, M \\leq 400$\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $M$"},{"iden":"sample input 1","content":"2 2"},{"iden":"sample output 1","content":"13\n\nThe condition is $A_{1,1} \\times A_{2,2} \\leq A_{1,2} \\times A_{2,1}$. All $13$ matrices other than $\\begin{pmatrix} 1 & 0 \\\\ 0 & 1 \\end{pmatrix}, \\begin{pmatrix} 1 & 1 \\\\ 0 & 1 \\end{pmatrix}, \\begin{pmatrix} 1 & 0 \\\\ 1 & 1 \\end{pmatrix}$ satisfy the condition."},{"iden":"sample input 2","content":"1 30"},{"iden":"sample output 2","content":"75497471\n\nAll $2^{NM}$ matrices satisfy the condition, so print $2^{30}$ modulo $998244353$, that is, $75497471$."},{"iden":"sample input 3","content":"400 400"},{"iden":"sample output 3","content":"412670892"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}