#include <bits/stdc++.h>
using namespace std;
// #define int long long
#define sz(a) (int)((a).size())
#define all(x) (x).begin(), (x).end()
mt19937_64 RNG(chrono::steady_clock::now().time_since_epoch().count());
using pii = pair<int, int>;
using ll = long long;
using ld = long double;
using pll = pair<ll, ll>;
const ld eps = 1e-9;
const int mod = 998244353;
const ll INF = 1e18;
const int N = 5e3 + 10;
#ifdef yb
#include "debugtemplate.cpp"
#else
#define debug(...)
#endif
#include<atcoder/modint>
using namespace atcoder;
using mint = static_modint<mod>;
using vm = vector<mint>;
std::ostream& operator << (std::ostream& out, const mint& rhs) {
return out<<rhs.val();
}
// using mint = modint;
// mint::set_mod(M);
// int x.val() : returns value stored in variable
// when using (a / b or a /= b) : gcd(b.val(), mod ) = 1
// modint x.pow(ll n) : returns x^n
// modint x.inv() : returns modulo inverse
vector<mint> fact(1, 1);
vector<mint> ifact(1, 1);
mint C(int n, int k) {
if (k < 0 || k > n) {
return 0;
}
while ((int) fact.size() < n + 1) {
fact.push_back(fact.back() * (int) fact.size());
ifact.push_back(1 / fact.back());
}
return fact[n] * ifact[k] * ifact[n - k];
}
mint D (int n, int k) {
// n slots are constrained and k are free
mint ret = 0;
C(n + k, 0);
for (int i = 0; i <= n; i++) {
mint here = fact[n + k - i];
here *= C(n, i);
if (i & 1)
ret -= here;
else
ret += here;
}
return ret;
}
mint Solutions (int n, int sum, int ub = 1e9 + 7) {
// x_1 + ... + x_n = sum
// 0 <= x_i <= ub : pie
mint ret = 0;
for (int i = 0; i <= n; i++) {
int nsum = sum - i * (ub + 1);
if (nsum < 0)
break;
if (i & 1) {
ret -= C(n, i) * C (nsum + n - 1, n - 1);
}
else {
ret += C(n, i) * C(nsum + n - 1, n - 1);
}
}
return ret;
}
void Solve() {
int a, b, c, d; cin >> a >> b >> c >> d;
mint ans = 0;
for (int i = 0; i <= c; i++) {
ans += C(a + b + i, b) * C(c - i + d - 1, d - 1);
}
cout << ans << endl;
}
int32_t main() {
auto begin = std::chrono::high_resolution_clock::now();
ios_base::sync_with_stdio(0);
cin.tie(0);
#ifndef ONLINE_JUDGE
freopen("error.txt", "w", stderr);
#endif
int _ = 1;
// cin >> _;
cout << fixed;
cout << setprecision(20);
for(int i = 1; i <= _; i++)
{
// cout << "Case #" << i << ": ";
Solve();
}
auto end = std::chrono::high_resolution_clock::now();
auto elapsed = std::chrono::duration_cast<std::chrono::nanoseconds>(end - begin);
cerr << "Time measured: " << elapsed.count() * 1e-9 << " seconds.\n";
return 0;
}