Score : $500$ points
Consider placing $B$ black rooks and $W$ white rooks on a grid with $N$ horizontal rows and $M$ vertical columns.
A placement of the rooks satisfying all of the following conditions is called a good placement.
Here, 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.
How many good placements are there? Since this count can be enormous, print it modulo $998244353$.
Rooks in the same color are not distinguished.
Input is given from Standard Input in the following format:
$N$ $M$ $B$ $W$
Print the count modulo $998244353$.
2 2 1 1
4
There are four good placements as follows.
1 2 1 1
0
There may be no good placement.
40 40 30 30
467620384
Be sure to print the count modulo $998244353$.