import sys from operator import itemgetter from collections import defaultdict, deque import heapq import bisect stdin=sys.stdin sys.setrecursionlimit(10 ** 8) ip=lambda: int(sp()) fp=lambda: float(sp()) lp=lambda:list(map(int,stdin.readline().split())) sp=lambda:stdin.readline().rstrip() Yp=lambda:print('Yes') Np=lambda:print('No') inf = 1 << 60 eps = 1e-9 sortkey = itemgetter(0) mod = 10 ** 9 + 7 class Comb(): def __init__(self, N, mod): self.N = N self.mod = mod self.fa = self.fa_fainv()[0] self.fainv = self.fa_fainv()[1] def fa_fainv(self): fa = [1] for i in range(1, self.N + 1): fa.append(fa[-1] * i % self.mod) fainv = [pow(fa[-1],self.mod - 2,self.mod)] for i in range(1, self.N + 1)[::-1]: fainv.append(fainv[-1] * i % self.mod) fainv = fainv[::-1] return fa, fainv def calcu_comb(self, a, b): if b == 0: return 1 return self.fa[a] * self.fainv[a - b] * self.fainv[b] % self.mod ############################################################### comb = Comb(2 * 10 ** 6 + 5, mod) A, B, X, Y = lp() x = (B + 2) // 2 y = B + 1- x xp = (x + 1) // 2 xm = x - xp yp = (y + 1) // 2 ym = y - yp ans = 0 for i in range(A + 1): x_move = i y_move = A - i if abs(X - x_move) % 2 != 0 or abs(Y - y_move) % 2 != 0 or x_move < abs(X) or y_move < abs(Y): continue now_xp = (x_move + X) // 2 now_xm = x_move - now_xp now_yp = (y_move + Y) // 2 now_ym = y_move - now_yp if now_xp > 0 and xp <= 0: continue if now_xm > 0 and xm <= 0: continue if now_yp > 0 and yp <= 0: continue if now_ym > 0 and ym < 0: continue p = comb.calcu_comb(now_xp + xp - 1,xp - 1) q = comb.calcu_comb(now_xm + xm - 1,xm - 1) r = comb.calcu_comb(now_yp + yp - 1,yp - 1) s = comb.calcu_comb(now_ym + ym - 1,ym - 1) res = p * q * r * s % mod ans += res ans %= mod print(ans)