{"raw_statement":[{"iden":"problem statement","content":"Consider placing $B$ black rooks and $W$ white rooks on a grid with $N$ horizontal rows and $M$ vertical columns.\nA placement of the rooks satisfying all of the following conditions is called a _good placement_.\n\n*   All $B+W$ rooks are placed on the grid.\n*   At most one rook is placed in the same square.\n*   There is no pair of white rook and black rook attacking each other. That is, there is no pair of white rook and black rook such that one of them can reach the square in which the other is placed in one move.\n\nHere, in one move, a rook can reach any square that is on a horizontal or vertical line from its current position and is reachable without jumping over another rook.\nHow many good placements are there? Since this count can be enormous, print it modulo $998244353$.\nRooks in the same color are not distinguished."},{"iden":"constraints","content":"*   $1 \\leq N,M \\leq 50$\n*   $1 \\leq B,W \\leq 2500$\n*   $B+W \\leq N \\times M$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $M$ $B$ $W$"},{"iden":"sample input 1","content":"2 2 1 1"},{"iden":"sample output 1","content":"4\n\nThere are four good placements as follows.\n![image](https://img.atcoder.jp/ghi/00c6bee30b78604192be9b9f0701fc48.png)"},{"iden":"sample input 2","content":"1 2 1 1"},{"iden":"sample output 2","content":"0\n\nThere may be no good placement."},{"iden":"sample input 3","content":"40 40 30 30"},{"iden":"sample output 3","content":"467620384\n\nBe sure to print the count modulo $998244353$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}