A,B,X,Y = map(int,input().split()) MOD = 10**9+7 factorial = [1, 1] inverse = [1, 1] invere_base = [0, 1] for i in range(2, 4*10**6 + 1): factorial.append((factorial[-1] * i) % MOD) invere_base.append((-invere_base[MOD % i] * (MOD // i)) % MOD) #逆元 inverse.append((inverse[-1] * invere_base[-1]) % MOD) #階乗逆元 #combination def nCr(n, r): if (r < 0 or r > n): return 0 r = min(r, n - r) return factorial[n] * inverse[r] % MOD * inverse[n - r] % MOD #permutation def nPr(n,r): if (r < 0 or r > n): return 0 return factorial[n] * inverse[n-r] % MOD up,down,right,left = [(B+1)//4]*4 if (B+1)%4 >= 1: right += 1 if (B+1)%4 >= 2: up += 1 if (B+1)%4 >= 3: left += 1 if (B+1)%4 >= 4: down += 1 ans = 0 for i in range(A+1): #左右にi割り振り j,k = 0,0 if i%2 == X%2 and i >= abs(X): if X >= 0: r = i+(X-i)//2 l = i-r else: l = i+(-X-i)//2 r = i-l t1,t2 = 0,0 if l == 0: t1 = 1 else: t1 = nCr(l+left-1,l) if r == 0: t2 = 1 else: t2 = nCr(r+right-1,r) j = t1*t2%MOD #上下にA-i if (A-i)%2 == Y%2 and (A-i) >= abs(Y): ii = A-i if Y >= 0: u = ii+(Y-ii)//2 d = ii-u else: d = ii+(-Y-ii)//2 u = ii-d t1,t2 = 0,0 if u == 0: t1 = 1 else: t1 = nCr(u+up-1,u) if d == 0: t2 = 1 else: t2 = nCr(d+down-1,d) k = t1*t2%MOD ans += j*k%MOD ans %= MOD print(ans)