mod = 10 ** 9 + 7 n = 2 * 10 ** 6 + 5 fact = [1] * (n + 1) invfact = [1] * (n + 1) for i in range(1, n): fact[i + 1] = ((i+1) * fact[i]) % mod invfact[n] = pow(fact[n], mod - 2, mod) for i in range(n - 1, -1, -1): invfact[i] = invfact[i + 1] * (i + 1) % mod def comb(n, r): if n < 0 or r < 0 or n - r < 0: return 0 return fact[n] * invfact[r] * invfact[n - r] % mod A, B, X, Y = map(int, input().split()) L = [0] * 4 if X >= 0: L[0] = X else: L[2] = -X if Y >= 0: L[1] = Y else: L[3] = -Y V = [B//4] * 4 for i in range(B%4 + 1): V[i] += 1 ans = 0 N = A - sum(L) if N < 0 or N % 2: print(0) exit() N //= 2 def f(L, temp, V): val = 1 for i in range(4): a = L[i] + temp[i] if V[i] == a == 0: continue val *= comb(V[i] - 1 + a, a) val %= mod return val for i in range(N + 1): temp = [i, N-i, i, N-i] ans += f(L, temp, V) ans %= mod print(ans)