#include using namespace std; using ll = long long; ll const m = 998244353; ll mpow(ll a, ll n) { ll ret = 1; while (n) { if (n & 1) ret = (ret * a) % m; a = (a * a) % m; n >>= 1; } return ret; } int main () { int X, Y, Z, W; cin >> X >> Y >> Z >> W; if (W == 0) { swap(X, Y); swap(Z, W); } int dx = X - Z - 1, dy = Y - W; ll ans = dx + 1; for (int i = 1; i <= dx + dy; i ++) { ans = (ans * i) % m; } cout << ans << endl; }