{"raw_statement":[{"iden":"problem statement","content":"In the following undirected graph, count the number of walks from $S$ to $S$ that pass through the edges $ST$, $TU$, $UV$, $VS$ (in any direction) exactly $a$, $b$, $c$, $d$ times, respectively, modulo $998,244,353$.\n![image](https://img.atcoder.jp/agc051/48a379ab79ee4edf503b84c8b7984d50.png)"},{"iden":"notes","content":"A walk from $S$ to $S$ is a sequence of vertices $v_0 = S, v_1, \\ldots, v_k = S$ such that for each $i (0 \\leq i < k)$, there is an edge between $v_i$ and $v_{i+1}$. Two walks are considered distinct if they are distinct as sequences."},{"iden":"constraints","content":"*   $1 \\leq a, b, c, d \\leq 500,000$\n*   All values in the input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$a$ $b$ $c$ $d$"},{"iden":"sample input 1","content":"2 2 2 2"},{"iden":"sample output 1","content":"10\n\nThere are $10$ walks that satisfy the condition. One example of such a walk is $S$ $\\rightarrow$ $T$ $\\rightarrow$ $U$ $\\rightarrow$ $V$ $\\rightarrow$ $U$ $\\rightarrow$ $T$ $\\rightarrow$ $S$ $\\rightarrow$ $V$ $\\rightarrow$ $S$."},{"iden":"sample input 2","content":"1 2 3 4"},{"iden":"sample output 2","content":"0"},{"iden":"sample input 3","content":"470000 480000 490000 500000"},{"iden":"sample output 3","content":"712808431"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}