#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include using namespace std; using uint = unsigned int; using ll = long long; using ull = unsigned long long; using ld = long double; using i128 = __int128_t; #define all(a) a.begin(), a.end() #define allr(a) a.rbegin(), a.rend() template int len(const A &a) { return a.size(); } template using vec = vector; template using vec2 = vec>; template using vec3 = vec>; template using vec4 = vec>; template using vec5 = vec>; #define VEC(T, a, ...) \ vec a(__VA_ARGS__) #define VEC2(T, a, n, ...) \ vector a(n, vec(__VA_ARGS__)); #define VEC3(T, a, n, m, ...) \ vector a( \ n, \ vector(m, vec(__VA_ARGS__)) \ ); #define VEC4(T, a, n, m, l, ...) \ vector a( \ n, \ vector( \ m, \ vector(l, vec(__VA_ARGS__)) \ ) \ ); #define eval_4(a, b, c, d, e, ...) e #define loop while (1) #define rep(n) \ for (int __ = 0; __ < n; __++) #define range_1(i, n) \ for (int i = 0; i < n; i++) #define range_2(i, a, b) \ for (ll i = a; i < b; i++) #define range_3(i, a, b, c) \ for (ll i = a; i < b; i += c) #define range(...) \ eval_4(__VA_ARGS__, range_3, range_2, range_1, rep)( \ __VA_ARGS__ \ ) #define ranger_1(i, n) \ for (int i = n; i--;) #define ranger_2(i, a, b) \ for (ll i = b; i-- > a;) #define ranger_3(i, a, b, c) \ for (ll i = b - 1; i >= a; i -= c) #define range_rev(...) \ eval_4(__VA_ARGS__, ranger_3, ranger_2, ranger_1)( \ __VA_ARGS__ \ ) #define iter(x, a) \ for (const auto &x : a) #define iter_mut(x, a) \ for (auto &&x : a) template istream & operator>>(istream &in, pair &p) { return in >> p.first >> p.second; } template ostream &operator<<( ostream &out, pair &p ) { out << p.first << ' ' << p.second; return out; } template void read_tup(istream &in, T &x) { if constexpr (tuple_size::value > k) { in >> get(x); read_tup(in, x); } } template istream &operator>>( istream &in, tuple &x ) { read_tup(in, x); return in; } template auto operator<<(ostream &out, vec a) -> ostream & { range(i, len(a)) { if (i) { out << ' '; } out << a[i]; } return out; } template auto operator<<(ostream &out, vec2 a) -> ostream & { iter_mut(x, a) out << x << '\n'; return out; } template auto operator>>(istream &in, vec &a) -> istream & { iter_mut(x, a) in >> x; return in; } template void in(T &...a) { (cin >> ... >> a); } template void out(T a, const U... b) { cout << a; ((cout << ' ' << b), ...); cout << '\n'; } vec iota(int n) { vec a(n); std::iota(all(a), 0); return a; } template using max_queue = priority_queue; template using min_queue = priority_queue, greater>; template T pop(queue &q) { T v = q.front(); q.pop(); return v; } template T pop(deque &q) { T v = q.front(); q.pop_front(); return v; } template T pop(vec &q) { T v = q.back(); q.pop_back(); return v; } template T pop(max_queue &q) { T v = q.top(); q.pop(); return v; } template T pop(min_queue &q) { T v = q.top(); q.pop(); return v; } template T max(const vec &a) { return *max_element(all(a)); } template T min(const vec &a) { return *min_element(all(a)); } int topbit(int x) { return 31 - __builtin_clz(x); } template bool operator==( const vec &a, const vec &b ) { int n = len(a); if (len(b) != n) { return false; } range(i, n) { if (a[i] != b[i]) { return false; } } return true; } template bool chmin(T &a, const U &b) { return b < a ? a = b, 1 : 0; } template bool chmax(T &a, const U &b) { return b > a ? a = b, 1 : 0; } int popcnt(int x) { return __builtin_popcount(x); } template T sum(const vec &a) { return accumulate(all(a), 0ll); } template void unique(vec &a) { sort(all(a)); a.erase(std::unique(all(a)), a.end()); } template int lb(const A &a, const T &x) { auto p = lower_bound(all(a), x); return distance(a.begin(), p); } template int ub(const A &a, const T &x) { auto p = upper_bound(all(a), x); return distance(a.begin(), p); } // define yes/no #define yesno(y, n) \ void yes(bool f = 1) { \ out(f ? #y : #n); \ } \ void no() { \ out(#n); \ } yesno(yes, no); // yesno(Yes, No); // yesno(YES, NO); // if p == -1, use set_mod template class modint { long v; static int mod; public: static void set_mod(int m) { mod = m; } static constexpr int m() { return p > 0 ? p : mod; } constexpr modint(): v() { } modint(long v): v(norm(v)) { } static long norm(long x) { if (x < -m() || x >= m()) { x %= m(); } if (x < 0) { x += m(); } return x; } int operator()() const { return v; } modint operator-() const { return modint(m() - v); } modint &operator+=(const modint &a) { if ((v += a.v) >= m()) { v -= m(); } return *this; } modint &operator-=(const modint &a) { return *this += -a; } modint &operator*=(const modint &a) { v = norm(v * a.v); return *this; } modint pow(long t) const { if (t < 0) { return pow(p - 2) * pow(-t); } if (t == 0) { return 1; } modint a = pow(t >> 1); a *= a; if (t & 1) { a *= *this; } return a; } modint inv() const { return pow(p - 2); } modint &operator/=(const modint &a) { return *this *= a.inv(); } auto operator++() -> modint & { return *this += 1; } auto operator--() -> modint & { return *this -= 1; } auto operator++(int) -> modint { modint a(*this); *this += 1; return a; } auto operator--(int) -> modint { modint a(*this); *this -= 1; return a; } friend modint operator+( const modint &a, const modint &b ) { return modint(a) += b; } friend modint operator-( const modint &a, const modint &b ) { return modint(a) -= b; } friend modint operator*( const modint &a, const modint &b ) { return modint(a) *= b; } friend modint operator/( const modint &a, const modint &b ) { return modint(a) /= b; } friend bool operator==( const modint &a, const modint &b ) { return a.v == b.v; } friend istream & operator>>(istream &in, modint &x) { in >> x.v; x.v = norm(x.v); return in; } friend ostream &operator<<( ostream &out, const modint &x ) { return out << x.v; } }; using mint1_000_000_007 = modint<1'000'000'007>; using mint998_244_353 = modint<998'244'353>; template <> int modint<-1>::mod = 1; using mint_runtime = modint<>; class comb { int p; public: vector f, fi, inv; comb(int p, int n) : p(p), f(n), fi(n), inv(n) { inv[1] = 1; for (int i = 2; i < n; i++) { int q = p / i; inv[i] = p - q * inv[p - q * i] % p; } f[0] = fi[0] = 1; for (int i = 1; i < n; i++) { f[i] = f[i - 1] * i % p; fi[i] = fi[i - 1] * inv[i] % p; } } auto pe(int n, int k) -> int { if (k < 0 || n < k) { return 0; } return f[n] * fi[n - k] % p; } auto c(int n, int k) -> int { if (k < 0 || n < k) { return 0; } return pe(n, k) * fi[k] % p; } auto h(int n, int k) -> int { return c(n - 1 + k, k); } auto ip(int n, int k) -> int { assert(0 <= k && k <= n); return fi[n] * f[n - k] % p; } auto ic(int n, int k) -> int { return ip(n, k) * f[k] % p; } }; void solve() { using mint = mint998_244_353; int x, y, z, w; in(x, y, z, w); const int p = 998'244'353; auto f = comb(p, 1 << 19); chmax(z, 1); chmax(w, 1); mint ans = f.f[x + y - z - w]; ans *= f.c(x, z); ans *= f.c(y, w); out(ans); } int main() { ios::sync_with_stdio(0); cin.tie(0); // cout << setprecision(16); int t = 1; // in(t); while (t--) { solve(); } }