class facmod: def __init__(self, N: int, md: int): assert N < md self.md = md self.facs = [1] * (N + 1) self.facinvs = [1] * (N + 1) for i in range(1, N + 1): self.facs[i] = self.facs[i - 1] * i % md self.facinvs[N] = pow(self.facs[i], md - 2, md) for i in range(N - 1, 0, -1): self.facinvs[i] = self.facinvs[i + 1] * (i + 1) % md def nCr(self, n: int, r: int) -> int: if n < 0 or r < 0 or n < r: return 0 return (self.facs[n] * self.facinvs[r]) % md * self.facinvs[n - r] % md md = 1000000007 A, B, X, Y = map(int, input().split()) fac = facmod(A + B + abs(X) + abs(Y), md) ret = 0 nxplus = (B + 4) // 4 nyplus = (B + 3) // 4 nxminus = (B + 2) // 4 nyminus = (B + 1) // 4 for xplus in range(A + 1): xminus = xplus - X rem = A - xplus - xminus yplus = (rem + Y) // 2 yminus = (rem - Y) // 2 if xminus < 0 or yplus < 0 or yminus < 0 or yplus - yminus != Y: continue if xplus + xminus + yplus + yminus != A: continue if nyplus == 0 and yplus > 0: continue if nxminus == 0 and xminus > 0: continue if nyminus == 0 and yminus > 0: continue tmp = 1 if xplus: tmp *= fac.nCr(nxplus - 1 + xplus, xplus) if yplus: tmp = tmp * fac.nCr(nyplus - 1 + yplus, yplus) % md if xminus: tmp = tmp * fac.nCr(nxminus - 1 + xminus, xminus) % md if yminus: tmp = tmp * fac.nCr(nyminus - 1 + yminus, yminus) % md ret += tmp print(ret % md)