{"raw_statement":[{"iden":"problem statement","content":"You are given integers $N$, $M$, $X$, and $Y$.\nFind the number, modulo $998244353$, of pairs $(A, B)$ of sequences $A=(a_1,\\ldots,a_N)$ and $B=(b_1,\\ldots,b_N)$ that satisfy all of the following conditions:\n\n*   $A = (a_1, \\ldots, a_N)$ is a sequence of non-negative integers.\n*   $B = (b_1, \\ldots, b_N)$ is a subsequence of $(0, 1, \\ldots, M - 1)$.\n*   $\\sum\\limits_{i=1}^{N} a_i = X$.\n*   $\\sum\\limits_{i=1}^{N} a_i b_i = Y$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq M \\leq 2 \\times 10^5$\n*   $1 \\leq X, Y \\leq 2 \\times 10^5$\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $M$ $X$ $Y$"},{"iden":"sample input 1","content":"3 4 3 4"},{"iden":"sample output 1","content":"5\n\nHere are the five pairs $(A, B)$ satisfying the conditions:\n\n*   $A = (0, 2, 1)$, $B = (0, 1, 2)$\n*   $A = (1, 0, 2)$, $B = (0, 1, 2)$\n*   $A = (1, 1, 1)$, $B = (0, 1, 3)$\n*   $A = (1, 2, 0)$, $B = (0, 2, 3)$\n*   $A = (2, 1, 0)$, $B = (1, 2, 3)$"},{"iden":"sample input 2","content":"1 1 1 1"},{"iden":"sample output 2","content":"0\n\nThere are no pairs $(A, B)$ satisfying the conditions."},{"iden":"sample input 3","content":"12345 67890 9876 54321"},{"iden":"sample output 3","content":"150392014\n\nFind the count modulo $998244353$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}