a,b,x,y = map(int,input().split()) mod = 10**9+7 ### for bigger prime fact = [1,1] finv = [1,1] inv = [0,1] for i in range(2,2*10**6+5): fact.append((fact[-1]*i)%mod) inv.append((inv[mod%i]*(mod-mod//i))%mod) finv.append((finv[-1]*inv[-1])%mod) def nCr(n,r,mod): if r > n: return 0 else: return fact[n]*finv[r]%mod*finv[n-r]%mod ans = 0 r = (b+4)//4 u = (b+3)//4 l = (b+2)//4 d = (b+1)//4 for i in range(a+1): if i < x: continue dif = i-x left = a-i-dif if l == 0: base = nCr(i+r-1,i,mod) else: base = nCr(i+r-1,i,mod)*nCr(dif+l-1,dif,mod)%mod if left < abs(y): continue if y >= 0: left -= y if left%2: continue need = y+left//2 else: left += y if left%2: continue need = -y+left//2 if r == 0: ans += base continue if l == 0: base *= nCr(need+u-1,need,mod) else: base *= nCr(need+u-1,need,mod)*nCr(left//2+d-1,d-1,mod)%mod base %= mod ans += base ans %= mod print(ans)