{"raw_statement":[{"iden":"problem statement","content":"Consider integer sequences $A = (a_1,a_2,\\dots,a_N)$ of length $N$, where each element is a positive integer not greater than $M$.  \nCount how many such sequences satisfy the following condition, and output the result modulo $998244353$.\n\n*   For every integer $m$ such that $1 \\leq m \\leq M$, the number of times $m$ appears in $A$ is at most $m$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 300$\n*   $1 \\leq M \\leq 300$\n*   $N, M$ 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 3"},{"iden":"sample output 1","content":"8\n\nThere are $8$ sequences that satisfy the condition:\n\n*   $(1, 2)$\n*   $(1, 3)$\n*   $(2, 1)$\n*   $(2, 2)$\n*   $(2, 3)$\n*   $(3, 1)$\n*   $(3, 2)$\n*   $(3, 3)$"},{"iden":"sample input 2","content":"300 300"},{"iden":"sample output 2","content":"478329414"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}