#include #define rep(i, l, r) for (int i = (l); i < (r); i++) using namespace std; typedef long long ll; vector f(2000001, 1); ll MOD = 1000000007; ll mod_pow(ll x, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1) res = res * x % mod; x = x * x % mod; n >>= 1; } return res; } ll comb(ll x, ll y) { ll ret = f[x]; ret = ret * mod_pow(f[y], MOD - 2, MOD) % MOD; ret = ret * mod_pow(f[x - y], MOD - 2, MOD) % MOD; return ret; } int main() { ll A, B, X, Y; rep(i, 0, 2000000) f[i + 1] = f[i] * (i + 1) % MOD; cin >> A >> B >> X >> Y; if (A < abs(X) + abs(Y)) { cout << 0 << endl; return 0; } if (A % 2 != (X + Y) % 2) { cout << 0 << endl; return 0; } if (B == 0) { if (X == A) cout << 1 << endl; else cout << 0 << endl; return 0; } if (B == 1) { if (X >= 0 && Y >= 0 && X + Y == A) cout << 1 << endl; else cout << 0 << endl; return 0; } if (B == 2) { if (Y >= 0 && abs(X) + Y <= A) cout << 1 << endl; else cout << 0 << endl; return 0; } if (B == 3) { cout << (A - abs(X) - abs(Y)) / 2 + 1 << endl; return 0; } ll R = (B + 4) / 4, U = (B + 3) / 4, L = (B + 2) / 4, D = (B + 1) / 4; ll ans = 0, C = (A - abs(X) - abs(Y)) / 2; rep(i, 0, C + 1) { //cout << "i=" << i << endl; ll P = 1; if (X > 0) { P = P * comb(R - 1 + X + i, R - 1) % MOD; //cout << "ans=" << ans << endl; P = P * comb(L - 1 + i, L - 1) % MOD; //cout << "ans=" << ans << endl; } else { P = P * comb(R - 1 + i, R - 1) % MOD; //cout << "ans=" << ans << endl; P = P * comb(L - 1 - X + i, L - 1) % MOD; //cout << "ans=" << ans << endl; } if (Y > 0) { P = P * comb(U - 1 + Y + C - i, U - 1) % MOD; //cout << "ans=" << ans << endl; P = P * comb(D - 1 + C - i, D - 1) % MOD; //cout << "ans=" << ans << endl; } else { P = P * comb(U - 1 + C - i, U - 1) % MOD; //cout << "ans=" << ans << endl; P = P * comb(D - 1 - Y + C - i, D - 1) % MOD; //cout << "ans=" << ans << endl; } ans = (ans + P) % MOD; } cout << ans << endl; //cout << "R=" << R << " U=" << U << " L=" << L << " D=" << D << endl; }