{"raw_statement":[{"iden":"problem statement","content":"You are given integers $W,H,L,R,D,U$.\nA town of Kyoto is on the two-dimensional plane.\nIn the town, there is exactly one block at each lattice point $(x,y)$ that satisfies all of the following conditions. There are no blocks at any other points.\n\n*   $0\\leq x\\leq W$\n*   $0\\leq y\\leq H$\n*   $x<L$ or $R<x$ or $y<D$ or $U<y$\n\nSnuke traveled through the town as follows.\n\n*   First, he chooses one block and stands there.\n*   Then, he performs the following operation any number of times (possibly zero):\n    *   Move one unit in the positive direction of the $x$\\-axis or the positive direction of the $y$\\-axis. However, the point after moving must also have a block.\n\nPrint the number, modulo $998244353$, of possible paths that Snuke could have taken."},{"iden":"constraints","content":"*   $0\\leq L\\leq R\\leq W\\leq 10^6$\n*   $0\\leq D\\leq U\\leq H\\leq 10^6$\n*   There is at least one block.\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$W$ $H$ $L$ $R$ $D$ $U$"},{"iden":"sample input 1","content":"4 3 1 2 2 3"},{"iden":"sample output 1","content":"192\n\nThe following are examples of possible paths. Here, a path is represented by listing the lattice points visited in order.\n\n*   $(3,0)$\n*   $(0,0)\\rightarrow (1,0)\\rightarrow (2,0)\\rightarrow (2,1)\\rightarrow (3,1)\\rightarrow (3,2)\\rightarrow (4,2)\\rightarrow (4,3)$\n*   $(0,1)\\rightarrow (0,2)$\n\nThere are $192$ possible paths."},{"iden":"sample input 2","content":"10 12 4 6 8 11"},{"iden":"sample output 2","content":"4519189"},{"iden":"sample input 3","content":"192 25 0 2 0 9"},{"iden":"sample output 3","content":"675935675\n\nDo not forget to print the number of paths modulo $998244353$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}