MOD = 10**9+7



def add(a,b):

  return (a+b) % MOD



def mul(a,b):

  return (a*b) % MOD



def pow(a,n):

  ans = 1

  mag = a

  for b in reversed(str(bin(n))):

    if b == 'b': break

    if b == '1':

      ans = mul(ans, mag)

    mag = mul(mag, mag)

  return ans



def inv(a):

  return pow(a, MOD-2)



H,W,A,B = list(map(int,input().split()))



factorical = [1]

factorical_inv = [1]

for n in range (1,H+W+1):

  f = mul(factorical[n-1], n)

  factorical.append(f)

  if(n <= max(H,W)):

    factorical_inv.append(inv(f))



def ncr(n,r):

  return mul(mul(factorical[n], factorical_inv[n-r]), factorical_inv[r])



def paths(w,h):

  return ncr(w+h,w)



ans = 0

for i in range(W-B):

  p = mul(paths(H-A-1, B+i), paths(A-1, W-B-1-i))

  ans = add(ans, p)

print(ans)
H,W,A,B = list(map(int,input().split()))



N = H+W+10

MOD = 10**9+7



fac = [1,1] + [0]*N

finv = [1,1] + [0]*N

inv = [0,1] + [0]*N

for i in range(2,N+2):

    fac[i] = fac[i-1] * i % MOD

    inv[i] = -inv[MOD%i] * (MOD // i) % MOD

    finv[i] = finv[i-1] * inv[i] % MOD



def ncr(n,r):

    if n < r: return 0

    if n < 0 or r < 0: return 0

    return fac[n] * (finv[r] * finv[n-r] % MOD) % MOD



ans = 0

for i in range(W-B):

    ans += ncr(H-1-A+B+i, H-1-A) * ncr(A-1+W-1-B-i, A-1)

    ans %= MOD

print(ans)
MOD = 10**9 + 7


def add(a, b):
    return (a + b) % MOD


def mul(a, b):
    return (a * b) % MOD


def pow(a, n):
    ans = 1
    mag = a
    for b in reversed(str(bin(n))):
        if b == "b":
            break
        if b == "1":
            ans = mul(ans, mag)
        mag = mul(mag, mag)
    return ans


def inv(a):
    return pow(a, MOD - 2)


H, W, A, B = list(map(int, input().split()))
factorical = [1]
factorical_inv = [1]
for n in range(1, H + W + 1):
    f = mul(factorical[n - 1], n)
    factorical.append(f)
    if n <= max(H, W):
        factorical_inv.append(inv(f))


def ncr(n, r):
    return mul(mul(factorical[n], factorical_inv[n - r]), factorical_inv[r])


def paths(w, h):
    return ncr(w + h, w)


ans = 0
for i in range(W - B):
    p = mul(paths(H - A - 1, B + i), paths(A - 1, W - B - 1 - i))
    ans = add(ans, p)
print(ans)

H, W, A, B = list(map(int, input().split()))
N = H + W + 10
MOD = 10**9 + 7
fac = [1, 1] + [0] * N
finv = [1, 1] + [0] * N
inv = [0, 1] + [0] * N
for i in range(2, N + 2):
    fac[i] = fac[i - 1] * i % MOD
    inv[i] = -inv[MOD % i] * (MOD // i) % MOD
    finv[i] = finv[i - 1] * inv[i] % MOD


def ncr(n, r):
    if n < r:
        return 0
    if n < 0 or r < 0:
        return 0
    return fac[n] * (finv[r] * finv[n - r] % MOD) % MOD


ans = 0
for i in range(W - B):
    ans += ncr(H - 1 - A + B + i, H - 1 - A) * ncr(A - 1 + W - 1 - B - i, A - 1)
    ans %= MOD
print(ans)

+H, W, A, B = list(map(int, input().split())) +N = H + W + 10 - - -def add(a, b): -    return (a + b) % MOD - - -def mul(a, b): -    return (a * b) % MOD - - -def pow(a, n): -    ans = 1 -    mag = a -    for b in reversed(str(bin(n))): -        if b == "b": -            break -        if b == "1": -            ans = mul(ans, mag) -        mag = mul(mag, mag) -    return ans - - -def inv(a): -    return pow(a, MOD - 2) - - -H, W, A, B = list(map(int, input().split())) -factorical = [1] -factorical_inv = [1] -for n in range(1, H + W + 1): -    f = mul(factorical[n - 1], n) -    factorical.append(f) -    if n <= max(H, W): -        factorical_inv.append(inv(f)) +fac = [1, 1] + [0] * N +finv = [1, 1] + [0] * N +inv = [0, 1] + [0] * N +for i in range(2, N + 2): +    fac[i] = fac[i - 1] * i % MOD +    inv[i] = -inv[MOD % i] * (MOD // i) % MOD +    finv[i] = finv[i - 1] * inv[i] % MOD -    return mul(mul(factorical[n], factorical_inv[n - r]), factorical_inv[r]) - - -def paths(w, h): -    return ncr(w + h, w) +    if n < r: +        return 0 +    if n < 0 or r < 0: +        return 0 +    return fac[n] * (finv[r] * finv[n - r] % MOD) % MOD -    p = mul(paths(H - A - 1, B + i), paths(A - 1, W - B - 1 - i)) -    ans = add(ans, p) +    ans += ncr(H - 1 - A + B + i, H - 1 - A) * ncr(A - 1 + W - 1 - B - i, A - 1) +    ans %= MOD