from collections import *
import heapq
import bisect

INF = float("inf")
MOD = 998244353

X, Y, Z, W = map(int, input().split())
N = X - Z + Y - W
dp = [[0] * (X + 1) for _ in range(N + 1)]
dp[0][X] = 1
for i in range(N):
    for x in range(X + 1):
        if i + 1 != N and x == 0:
            continue
        if not (i + 1 != N and x + 1 == 1) and x + 1 <= X:
            dp[i + 1][x] += dp[i][x + 1] * (x + 1)
        if not (i + 1 != N and Y - i + X - x == 1):
            dp[i + 1][x] += dp[i][x] * (Y - i + X - x)
        dp[i + 1][x] %= MOD
# print(dp)
print(dp[N][Z])