We have a large square grid with H rows and W columns.
Iroha is now standing in the top-left cell.
She will repeat going right or down to the adjacent cell, until she reaches the bottom-right cell.
However, she cannot enter the cells in the intersection of the bottom A rows and the leftmost B columns. (That is, there are A×B forbidden cells.) There is no restriction on entering the other cells.
Find the number of ways she can travel to the bottom-right cell.
Since this number can be extremely large, print the number modulo 10^9+7.

-----Constraints-----
 -  1 ≦ H, W ≦ 100,000
 -  1 ≦ A < H
 -  1 ≦ B < W

-----Input-----
The input is given from Standard Input in the following format:
H W A B

-----Output-----
Print the number of ways she can travel to the bottom-right cell, modulo 10^9+7.

-----Sample Input-----
2 3 1 1

-----Sample Output-----
2

We have a 2×3 grid, but entering the bottom-left cell is forbidden. The number of ways to travel is two: "Right, Right, Down" and "Right, Down, Right".

Difficulty: MEDIUM_HARD

Starter code:

Solutions:
from operator import mul
from functools import reduce

def cmb(n, r, p):
	if r < 0 or n < r:
		return 0
	r = min(r, n - r)
	return fact[n] * factinv[r] * factinv[n - r] % p
p = 10 ** 9 + 7
N = 10 ** 6
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1]
for i in range(2, N + 1):
	fact.append(fact[-1] * i % p)
	inv.append(-inv[p % i] * (p // i) % p)
	factinv.append(factinv[-1] * inv[-1] % p)
in1 = input().split()
H = int(in1[0])
W = int(in1[1])
A = int(in1[2])
B = int(in1[3])
allCNT = 0
for idx1 in range(W - B):
	beforeCNT = cmb(H - A + B - 1 + idx1, H - A - 1, p)
	afterCNT = cmb(W + A - B - 2 - idx1, A - 1, p)
	allCNT = (allCNT + beforeCNT * afterCNT % p) % p
print(allCNT)


(h, w, a, b) = map(int, input().split())

def cmb1(n, r, mod):
	if r < 0 or r > n:
		return 0
	r = min(r, n - r)
	return g1[n] * g2[r] * g2[n - r] % mod
mod = 10 ** 9 + 7
N = 10 ** 6
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
for i in range(2, N + 1):
	g1.append(g1[-1] * i % mod)
	inverse.append(-inverse[mod % i] * (mod // i) % mod)
	g2.append(g2[-1] * inverse[-1] % mod)
ans = 0
for i in range(b, w):
	ans += cmb1(i + h - 1 - a, i, mod) * cmb1(w - 1 - i + a - 1, a - 1, mod)
	ans %= mod
print(ans)


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

class Combination:

	def __init__(self, n_max, mod=10 ** 9 + 7):
		self.mod = mod
		self.modinv = self.make_modinv_list(n_max)
		(self.fac, self.facinv) = self.make_factorial_list(n_max)

	def __call__(self, n, r):
		return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n - r] % self.mod

	def make_factorial_list(self, n):
		fac = [1]
		facinv = [1]
		for i in range(1, n + 1):
			fac.append(fac[i - 1] * i % self.mod)
			facinv.append(facinv[i - 1] * self.modinv[i] % self.mod)
		return (fac, facinv)

	def make_modinv_list(self, n):
		modinv = [0] * (n + 1)
		modinv[1] = 1
		for i in range(2, n + 1):
			modinv[i] = self.mod - self.mod // i * modinv[self.mod % i] % self.mod
		return modinv
comb = Combination(1000000)
MOD = 10 ** 9 + 7
ans = 0
for i in range(B, W):
	ans += comb(H - A - 1 + i, i) * comb(A - 1 + W - 1 - i, A - 1)
	ans %= MOD
print(ans)


(H, W, A, B) = map(int, open(0).read().split())
MOD = 10 ** 9 + 7
factorials = [1] * (H + W + 1)
inv_factorials = [1] * (H + W + 1)
for i in range(H + W):
	factorials[i + 1] = factorials[i] * (i + 1) % MOD
inv_factorials = list(map(lambda n: pow(n, -1, MOD), factorials))

def modcomb(m, n, mod):
	return factorials[m] * inv_factorials[n] % MOD * inv_factorials[m - n] % MOD
total = modcomb(H + W - 2, W - 1, MOD)
for i in range(B):
	total -= modcomb(H - A - 1 + i, i, MOD) * modcomb(A - 1 + W - 1 - i, W - 1 - i, MOD) % MOD
	total %= MOD
print(total)


(H, W, A, B) = map(int, input().split())
mod = 10 ** 9 + 7
F = [1] * 200010
p = 1
for i in range(1, len(F)):
	F[i] = p = p * i % mod

def comb(n, k):
	return F[n] * pow(F[n - k], mod - 2, mod) * pow(F[k], mod - 2, mod) % mod
ans = 0
for h in range(H - A):
	x = comb(B - 1 + h, h)
	y = comb(W + H - B - h - 2, H - h - 1)
	ans += x * y
	ans %= mod
print(ans)


import sys

def comb(n, r, fact, revfact, mod):
	return fact[n] * revfact[n - r] * revfact[r] % mod

def solve():
	(H, W, A, B) = map(int, input().split())
	mod = 7 + 10 ** 9
	fact = [1] * (H + W + 4)
	revfact = [1] * (H + W + 4)
	for i in range(1, H + W + 4):
		fact[i] = i * fact[i - 1] % mod
	revfact[H + W + 3] = pow(fact[H + W + 3], mod - 2, mod)
	for i in reversed(range(1, H + W + 3)):
		revfact[i] = (i + 1) * revfact[i + 1] % mod
	ans = 0
	for j in range(B + 1, W + 1):
		up = comb(H - A + j - 2, j - 1, fact, revfact, mod)
		down = comb(A + W - j - 1, A - 1, fact, revfact, mod)
		ans += up * down % mod
		ans %= mod
	print(ans)
	return 0

def __starting_point():
	solve()
__starting_point()


import sys
sys.setrecursionlimit(10000000)
MOD = 10 ** 9 + 7
INF = 10 ** 15

def main():
	(H, W, A, B) = map(int, input().split())
	MAXN = H + W + 3
	factorial = [1]
	for i in range(1, MAXN + 1):
		factorial.append(factorial[-1] * i % MOD)
	inv_factorial = [-1] * (MAXN + 1)
	inv_factorial[-1] = pow(factorial[-1], MOD - 2, MOD)
	for i in range(MAXN - 1, -1, -1):
		inv_factorial[i] = inv_factorial[i + 1] * (i + 1) % MOD
	fact = lambda N: factorial[N]
	nck = lambda N, K: 0 if K > N or K < 0 else factorial[N] * inv_factorial[N - K] * inv_factorial[K] % MOD
	dist = lambda sy, sx, gy, gx: nck(gy - sy + gx - sx, gy - sy)
	ans = 0
	if H - A < W - B:
		(H, W) = (W, H)
		(A, B) = (B, A)
	for i in range(W - B):
		x = B + i + 1
		y = H - A - i
		ans += dist(1, 1, y, x) * dist(y, x, H, W) % MOD
		ans %= MOD
	print(ans)

def __starting_point():
	main()
__starting_point()


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

def c(n, k):
	if n < k:
		return 0
	if n < 0 or k < 0:
		return 0
	return fac[n] * (finv[k] * finv[n - k] % pr) % pr
a = 0
while 1:
	a = (a + c(H - A - 1 + B, B) * c(A + W - B - 1, A)) % pr
	A += 1
	B += 1
	if A == H or B == W:
		break
print(a)


MOD = 10 ** 9 + 7
MAX = 2 * 10 ** 5
fac = [1, 1] + [0] * MAX
finv = [1, 1] + [0] * MAX
inv = [0, 1] + [0] * MAX
for i in range(2, MAX + 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 comb(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
(H, W, A, B) = list(map(int, input().split()))
ans = 0
for i in range(1, H - A + 1):
	cnt = comb(i - 1 + B - 1, i - 1)
	cnt *= comb(H - i + W - B - 1, H - i)
	ans += cnt
	ans %= MOD
print(ans)


import sys
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 1000000007

class Combination(object):

	def __init__(self, N, mod=MOD):
		(fac, finv, inv) = ([0] * (N + 1), [0] * (N + 1), [0] * (N + 1))
		fac[:2] = (1, 1)
		finv[:2] = (1, 1)
		inv[1] = 1
		for i in range(2, N + 1):
			fac[i] = fac[i - 1] * i % mod
			inv[i] = -inv[mod % i] * (mod // i) % mod
			finv[i] = finv[i - 1] * inv[i] % mod
		self.N = N
		self.MOD = mod
		self.fac = fac
		self.finv = finv
		self.inv = inv

	def __call__(self, n, k):
		if n < k:
			return 0
		if n < 0 or k < 0:
			return 0
		fac = self.fac
		finv = self.finv
		mod = self.MOD
		return fac[n] * (finv[k] * finv[n - k] % mod) % mod

def solve(H: int, W: int, A: int, B: int):
	cmb = Combination(H + W + 1, MOD)
	ans = 0
	for i in range(B, W):
		buf = cmb(H - A - 1 + i, i)
		buf *= cmb(A + W - i - 2, W - i - 1)
		buf %= MOD
		ans += buf
		ans %= MOD
	print(ans)
	return

def main():

	def iterate_tokens():
		for line in sys.stdin:
			for word in line.split():
				yield word
	tokens = iterate_tokens()
	H = int(next(tokens))
	W = int(next(tokens))
	A = int(next(tokens))
	B = int(next(tokens))
	solve(H, W, A, B)

def __starting_point():
	main()
__starting_point()


import sys
import numpy as np
from heapq import heappush, heappop
from bisect import bisect_left as bi_l, bisect_right as bi_r
from collections import deque, Counter, defaultdict
from itertools import combinations, product
import string
inf = float('inf')
MOD = 10 ** 9 + 7

class NumberTheory:

	def __init__(self, n=2 * 10 ** 6, numpy=True):
		self.n = n
		self.np_flg = numpy
		(self.is_prime_number, self.prime_numbers) = self.sieve_of_eratosthenes(n)

	def sieve_of_eratosthenes(self, n):
		if self.np_flg:
			sieve = np.ones(n + 1, dtype=np.int64)
			sieve[:2] = 0
			for i in range(2, int(n ** 0.5) + 1):
				if sieve[i]:
					sieve[i * 2::i] = 0
			prime_numbers = np.flatnonzero(sieve)
		else:
			sieve = [1] * (n + 1)
			sieve[0] = sieve[1] = 0
			for i in range(2, int(n ** 0.5) + 1):
				if not sieve[i]:
					continue
				for j in range(i * 2, n + 1, i):
					sieve[j] = 0
			prime_numbers = [i for i in range(2, n + 1) if sieve[i]]
		return (sieve, prime_numbers)

	def prime_factorize(self, n):
		res = dict()
		if n < 2:
			return res
		border = int(n ** 0.5)
		for p in self.prime_numbers:
			if p > border:
				break
			while n % p == 0:
				res[p] = res.get(p, 0) + 1
				n //= p
			if n == 1:
				return res
		res[n] = 1
		return res

	def prime_factorize_factorial(self, n):
		res = dict()
		for i in range(2, n + 1):
			for (p, c) in self.prime_factorize(i).items():
				res[p] = res.get(p, 0) + c
		return res

	@staticmethod
	def gcd(a, b):
		return gcd(b, a % b) if b else abs(a)

	@staticmethod
	def lcm(a, b):
		return abs(a // gcd(a, b) * b)

	@staticmethod
	def find_divisors(n):
		divisors = []
		for i in range(1, int(n ** 0.5) + 1):
			if n % i:
				continue
			divisors.append(i)
			j = n // i
			if j != i:
				divisors.append(j)
		return divisors

	@staticmethod
	def base_convert(n, b):
		if not n:
			return [0]
		res = []
		while n:
			(n, r) = divmod(n, b)
			if r < 0:
				n += 1
				r -= b
			res.append(r)
		return res

class UnionFind:

	def __init__(self, n=10 ** 6):
		self.root = list(range(n))
		self.height = [0] * n
		self.size = [1] * n

	def find_root(self, u):
		if self.root[u] == u:
			return u
		self.root[u] = self.find_root(self.root[u])
		return self.root[u]

	def unite(self, u, v):
		ru = self.find_root(u)
		rv = self.find_root(v)
		if ru == rv:
			return
		hu = self.height[ru]
		hv = self.height[rv]
		if hu >= hv:
			self.root[rv] = ru
			self.size[ru] += self.size[rv]
			self.height[ru] = max(hu, hv + 1)
		else:
			self.root[ru] = rv
			self.size[rv] += self.size[ru]

class Combinatorics:

	def __init__(self, N=10 ** 9, n=10 ** 6, mod=10 ** 9 + 7, numpy=True):
		self.mod = mod
		self.nCr = dict()
		self.np_flg = numpy
		self.make_mod_tables(N, n)
	sys.setrecursionlimit(10 ** 6)

	def choose(self, n, r, mod=None):
		if r > n or r < 0:
			return 0
		if r == 0:
			return 1
		if (n, r) in self.nCr:
			return self.nCr[n, r]
		if not mod:
			self.nCr[n, r] = self.choose(n - 1, r) + self.choose(n - 1, r - 1)
		else:
			self.nCr[n, r] = (self.choose(n - 1, r, mod) + self.choose(n - 1, r - 1, mod)) % mod
		return self.nCr[n, r]

	def cumprod(self, a):
		p = self.mod
		l = len(a)
		sql = int(np.sqrt(l) + 1)
		a = np.resize(a, sql ** 2).reshape(sql, sql)
		for i in range(sql - 1):
			a[:, i + 1] *= a[:, i]
			a[:, i + 1] %= p
		for i in range(sql - 1):
			a[i + 1] *= a[i, -1]
			a[i + 1] %= p
		return np.ravel(a)[:l]

	def make_mod_tables(self, N, n):
		p = self.mod
		if self.np_flg:
			fac = np.arange(n + 1)
			fac[0] = 1
			fac = self.cumprod(fac)
			ifac = np.arange(n + 1, 0, -1)
			ifac[0] = pow(int(fac[-1]), p - 2, p)
			ifac = self.cumprod(ifac)[n::-1]
			n_choose = np.arange(N + 1, N - n, -1)
			n_choose[0] = 1
			n_choose[1:] = self.cumprod(n_choose[1:]) * ifac[1:n + 1] % p
		else:
			fac = [None] * (n + 1)
			fac[0] = 1
			for i in range(n):
				fac[i + 1] = fac[i] * (i + 1) % p
			ifac = [None] * (n + 1)
			ifac[n] = pow(fac[n], p - 2, p)
			for i in range(n, 0, -1):
				ifac[i - 1] = ifac[i] * i % p
			n_choose = [None] * (n + 1)
			n_choose[0] = 1
			for i in range(n):
				n_choose[i + 1] = n_choose[i] * (N - i) % p
			for i in range(n + 1):
				n_choose[i] = n_choose[i] * ifac[i] % p
		(self.fac, self.ifac, self.mod_n_choose) = (fac, ifac, n_choose)

	def mod_choose(self, n, r):
		return self.fac[n] * self.ifac[r] % self.mod * self.ifac[n - r] % self.mod

def z_algorithm(s):
	n = len(s)
	a = [0] * n
	a[0] = n
	l = r = -1
	for i in range(1, n):
		if r >= i:
			a[i] = min(a[i - l], r - i)
		while i + a[i] < n and s[i + a[i]] == s[a[i]]:
			a[i] += 1
		if i + a[i] >= r:
			(l, r) = (i, i + a[i])
	return a

class ABC001:

	def A():
		(h1, h2) = map(int, sys.stdin.read().split())
		print(h1 - h2)

	def B():
		pass

	def C():
		pass

	def D():
		pass

class ABC002:

	def A():
		(x, y) = map(int, sys.stdin.readline().split())
		print(max(x, y))

	def B():
		vowels = set('aeiou')
		s = sys.stdin.readline().rstrip()
		t = ''
		for c in s:
			if c in vowels:
				continue
			t += c
		print(t)

	def C():
		(*coords,) = map(int, sys.stdin.readline().split())

		def triangle_area(x0, y0, x1, y1, x2, y2):
			x1 -= x0
			x2 -= x0
			y1 -= y0
			y2 -= y0
			return abs(x1 * y2 - x2 * y1) / 2
		print(triangle_area(*coords))

	def D():
		(n, m) = map(int, sys.stdin.readline().split())
		edges = set()
		for _ in range(m):
			(x, y) = map(int, sys.stdin.readline().split())
			x -= 1
			y -= 1
			edges.add((x, y))
		cand = []
		for i in range(1, 1 << n):
			s = [j for j in range(n) if i >> j & 1]
			for (x, y) in combinations(s, 2):
				if (x, y) not in edges:
					break
			else:
				cand.append(len(s))
		print(max(cand))

class ABC003:

	def A():
		n = int(sys.stdin.readline().rstrip())
		print((n + 1) * 5000)

	def B():
		atcoder = set('atcoder')
		(s, t) = sys.stdin.read().split()
		for i in range(len(s)):
			if s[i] == t[i]:
				continue
			if s[i] == '@' and t[i] in atcoder:
				continue
			if t[i] == '@' and s[i] in atcoder:
				continue
			print('You will lose')
			return
		print('You can win')

	def C():
		(n, k, *r) = map(int, sys.stdin.read().split())
		res = 0
		for x in sorted(r)[-k:]:
			res = (res + x) / 2
		print(res)

	def D():
		pass

class ABC004:

	def A():
		print(int(sys.stdin.readline().rstrip()) * 2)

	def B():
		c = [sys.stdin.readline().rstrip() for _ in range(4)]
		for l in c[::-1]:
			print(l[::-1])

	def C():
		n = int(sys.stdin.readline().rstrip())
		n %= 30
		res = list(range(1, 7))
		for i in range(n):
			i %= 5
			(res[i], res[i + 1]) = (res[i + 1], res[i])
		print(''.join(map(str, res)))

	def D():
		pass

class ABC005:

	def A():
		(x, y) = map(int, sys.stdin.readline().split())
		print(y // x)

	def B():
		(n, *t) = map(int, sys.stdin.read().split())
		print(min(t))

	def C():
		t = int(sys.stdin.readline().rstrip())
		n = int(sys.stdin.readline().rstrip())
		a = [int(x) for x in sys.stdin.readline().split()]
		m = int(sys.stdin.readline().rstrip())
		b = [int(x) for x in sys.stdin.readline().split()]
		i = 0
		for p in b:
			if i == n:
				print('no')
				return
			while p - a[i] > t:
				i += 1
				if i == n:
					print('no')
					return
			if a[i] > p:
				print('no')
				return
			i += 1
		print('yes')

	def D():
		n = int(sys.stdin.readline().rstrip())
		d = np.array([sys.stdin.readline().split() for _ in range(n)], np.int64)
		s = d.cumsum(axis=0).cumsum(axis=1)
		s = np.pad(s, 1)
		max_del = np.zeros((n + 1, n + 1), dtype=np.int64)
		for y in range(1, n + 1):
			for x in range(1, n + 1):
				max_del[y, x] = np.amax(s[y:n + 1, x:n + 1] - s[0:n - y + 1, x:n + 1] - s[y:n + 1, 0:n - x + 1] + s[0:n - y + 1, 0:n - x + 1])
		res = np.arange(n ** 2 + 1)[:, None]
		i = np.arange(1, n + 1)
		res = max_del[i, np.minimum(res // i, n)].max(axis=1)
		q = int(sys.stdin.readline().rstrip())
		p = np.array(sys.stdin.read().split(), dtype=np.int64)
		print(*res[p], sep='\n')

class ABC006:

	def A():
		n = sys.stdin.readline().rstrip()
		if '3' in n:
			print('YES')
		elif int(n) % 3 == 0:
			print('YES')
		else:
			print('NO')

	def B():
		mod = 10007
		t = [0, 0, 1]
		for _ in range(1001001):
			t.append(t[-1] + t[-2] + t[-3])
			t[-1] %= mod
		n = int(sys.stdin.readline().rstrip())
		print(t[n - 1])

	def C():
		(n, m) = map(int, sys.stdin.readline().split())
		cnt = [0, 0, 0]
		if m == 1:
			cnt = [-1, -1, -1]
		else:
			if m & 1:
				m -= 3
				cnt[1] += 1
				n -= 1
			cnt[2] = m // 2 - n
			cnt[0] = n - cnt[2]
		if cnt[0] < 0 or cnt[1] < 0 or cnt[2] < 0:
			print(-1, -1, -1)
		else:
			print(*cnt, sep=' ')

	def D():
		(n, *c) = map(int, sys.stdin.read().split())
		lis = [inf] * n
		for x in c:
			lis[bi_l(lis, x)] = x
		print(n - bi_l(lis, inf))

class ABC007:

	def A():
		n = int(sys.stdin.readline().rstrip())
		print(n - 1)

	def B():
		s = sys.stdin.readline().rstrip()
		if s == 'a':
			print(-1)
		else:
			print('a')

	def C():
		(r, c) = map(int, sys.stdin.readline().split())
		(sy, sx) = map(int, sys.stdin.readline().split())
		(gy, gx) = map(int, sys.stdin.readline().split())
		sy -= 1
		sx -= 1
		gy -= 1
		gx -= 1
		maze = [sys.stdin.readline().rstrip() for _ in range(r)]
		queue = deque([(sy, sx)])
		dist = np.full((r, c), np.inf)
		dist[sy, sx] = 0
		while queue:
			(y, x) = queue.popleft()
			for (i, j) in [(-1, 0), (1, 0), (0, -1), (0, 1)]:
				i += y
				j += x
				if maze[i][j] == '#' or dist[i, j] != np.inf:
					continue
				dist[i, j] = dist[y, x] + 1
				queue.append((i, j))
		print(int(dist[gy, gx]))

	def D():
		pass

class ABC008:

	def A():
		(s, t) = map(int, sys.stdin.readline().split())
		print(t - s + 1)

	def B():
		(n, *s) = sys.stdin.read().split()
		res = defaultdict(int)
		for name in s:
			res[name] += 1
		print(sorted(res.items(), key=lambda x: x[1])[-1][0])

	def C():
		(n, *a) = map(int, sys.stdin.read().split())
		a = np.array(a)
		c = n - np.count_nonzero(a[:, None] % a, axis=1)
		print(np.sum((c + 1) // 2 / c))

	def D():
		pass

class ABC009:

	def A():
		n = int(sys.stdin.readline().rstrip())
		print((n + 1) // 2)

	def B():
		(n, *a) = map(int, sys.stdin.read().split())
		print(sorted(set(a))[-2])

	def C():
		(n, k) = map(int, sys.stdin.readline().split())
		s = list(sys.stdin.readline().rstrip())
		cost = [1] * n
		r = k
		for i in range(n - 1):
			q = []
			for j in range(i + 1, n):
				if s[j] < s[i] and cost[i] + cost[j] <= r:
					heappush(q, (s[j], cost[i] + cost[j], -j))
			if not q:
				continue
			(_, c, j) = heappop(q)
			j = -j
			(s[i], s[j]) = (s[j], s[i])
			r -= c
			cost[i] = cost[j] = 0
		print(''.join(s))

	def D():
		pass

class ABC010:

	def A():
		print(sys.stdin.readline().rstrip() + 'pp')

	def B():
		(n, *a) = map(int, sys.stdin.read().split())
		tot = 0
		for x in a:
			c = 0
			while x % 2 == 0 or x % 3 == 2:
				x -= 1
				c += 1
			tot += c
		print(tot)

	def C():
		(sx, sy, gx, gy, t, v, n, *xy) = map(int, sys.stdin.read().split())
		(x, y) = np.array(xy).reshape(-1, 2).T

		def dist(x1, y1, x2, y2):
			return np.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
		ans = 'YES' if (dist(sx, sy, x, y) + dist(x, y, gx, gy) <= v * t).any() else 'NO'
		print(ans)

	def D():
		pass

class ABC011:

	def A():
		n = int(sys.stdin.readline().rstrip())
		print(n % 12 + 1)

	def B():
		s = sys.stdin.readline().rstrip()
		print(s[0].upper() + s[1:].lower())

	def C():
		(n, *ng) = map(int, sys.stdin.read().split())
		ng = set(ng)
		if n in ng:
			print('NO')
		else:
			r = 100
			while n > 0:
				if r == 0:
					print('NO')
					return
				for i in range(3, 0, -1):
					if n - i in ng:
						continue
					n -= i
					r -= 1
					break
				else:
					print('NO')
					return
			print('YES')

	def D():
		pass

class ABC041:

	def A():
		(s, i) = sys.stdin.read().split()
		i = int(i)
		print(s[i - 1])

	def B():
		(a, b, c) = map(int, sys.stdin.readline().split())
		ans = a * b % MOD * c % MOD
		print(ans)

	def C():
		(n, *a) = map(int, sys.stdin.read().split())
		for (i, h) in sorted(enumerate(a), key=lambda x: -x[1]):
			print(i + 1)

	def D():
		(n, m, *xy) = map(int, sys.stdin.read().split())
		(*xy,) = zip(*[iter(xy)] * 2)
		edges = [0] * n
		for (x, y) in xy:
			x -= 1
			y -= 1
			edges[x] |= 1 << y
		comb = [None] * (1 << n)
		comb[0] = 1

		def count(edges, bit):
			if comb[bit] is not None:
				return comb[bit]
			comb[bit] = 0
			for i in range(n):
				if bit >> i & 1 and (not edges[i]):
					nxt_bit = bit & ~(1 << i)
					nxt_edges = edges.copy()
					for j in range(n):
						nxt_edges[j] &= ~(1 << i)
					cnt = count(nxt_edges, nxt_bit)
					comb[bit] += cnt
			return comb[bit]
		print(count(edges, (1 << n) - 1))

class ABC042:

	def A():
		a = [int(x) for x in sys.stdin.readline().split()]
		c = Counter(a)
		print('YES' if c[5] == 2 and c[7] == 1 else 'NO')

	def B():
		(n, l, *s) = sys.stdin.read().split()
		print(''.join(sorted(s)))

	def C():
		(n, k, *d) = sys.stdin.read().split()
		l = len(n)
		ok = sorted(set(string.digits) - set(d))
		cand = [int(''.join(p)) for p in product(ok, repeat=l)] + [int(min((x for x in ok if x > '0')) + min(ok) * l)]
		print(cand[bi_l(cand, int(n))])

	def D():
		pass
	(h, w, a, b) = map(int, sys.stdin.read().split())
	combinatorics = Combinatorics(mod=MOD)
	tot = combinatorics.mod_choose(h + w - 2, h - 1)
	for i in range(h - a, h):
		tot -= combinatorics.mod_choose(i + b - 1, i) * combinatorics.mod_choose(h - i + w - b - 2, h - 1 - i)
		tot %= MOD
	print(tot)

class ABC170:

	def A():
		x = [int(x) for x in sys.stdin.readline().split()]
		for i in range(5):
			if x[i] != i + 1:
				print(i + 1)
				break

	def B():
		(x, y) = map(int, sys.stdin.readline().split())
		print('Yes' if 2 * x <= y <= 4 * x and y % 2 == 0 else 'No')

	def C():
		(x, n, *p) = map(int, sys.stdin.read().split())
		a = list(set(range(102)) - set(p))
		a = [(abs(y - x), y) for y in a]
		print(sorted(a)[0][1])

	def D():
		(n, *a) = map(int, sys.stdin.read().split())
		cand = set(a)
		cnt = 0
		for (x, c) in sorted(Counter(a).items()):
			cnt += c == 1 and x in cand
			cand -= set(range(x * 2, 10 ** 6 + 1, x))
		print(cnt)

	def E():
		(n, q) = map(int, sys.stdin.readline().split())
		queue = []
		num_kindergarten = 2 * 10 ** 5
		queue_kindergarten = [[] for _ in range(num_kindergarten)]
		highest_kindergarten = [None] * num_kindergarten
		where = [None] * n
		rate = [None] * n

		def entry(i, k):
			where[i] = k
			while queue_kindergarten[k]:
				(r, j) = heappop(queue_kindergarten[k])
				if where[j] != k or j == i:
					continue
				if rate[i] >= -r:
					highest_kindergarten[k] = rate[i]
					heappush(queue, (rate[i], k, i))
				heappush(queue_kindergarten[k], (r, j))
				break
			else:
				highest_kindergarten[k] = rate[i]
				heappush(queue, (rate[i], k, i))
			heappush(queue_kindergarten[k], (-rate[i], i))

		def transfer(i, k):
			now = where[i]
			while queue_kindergarten[now]:
				(r, j) = heappop(queue_kindergarten[now])
				if where[j] != now or j == i:
					continue
				if highest_kindergarten[now] != -r:
					highest_kindergarten[now] = -r
					heappush(queue, (-r, now, j))
				heappush(queue_kindergarten[now], (r, j))
				break
			else:
				highest_kindergarten[now] = None
			entry(i, k)

		def inquire():
			while True:
				(r, k, i) = heappop(queue)
				if where[i] != k or r != highest_kindergarten[k]:
					continue
				heappush(queue, (r, k, i))
				return r
		for i in range(n):
			(a, b) = map(int, sys.stdin.readline().split())
			rate[i] = a
			entry(i, b - 1)
		for _ in range(q):
			(c, d) = map(int, sys.stdin.readline().split())
			transfer(c - 1, d - 1)
			print(inquire())

	def F():
		pass

class ABC171:

	def A():
		c = sys.stdin.readline().rstrip()
		print('A' if c < 'a' else 'a')

	def B():
		(n, k, *p) = map(int, sys.stdin.read().split())
		print(sum(sorted(p)[:k]))

	def C():
		n = int(sys.stdin.readline().rstrip())
		n -= 1
		l = 1
		while True:
			if n < pow(26, l):
				break
			n -= pow(26, l)
			l += 1
		res = ''.join([chr(ord('a') + d % 26) for d in NumberTheory.base_convert(n, 26)][::-1])
		res = 'a' * (l - len(res)) + res
		print(res)

	def D():
		n = int(sys.stdin.readline().rstrip())
		a = [int(x) for x in sys.stdin.readline().split()]
		s = sum(a)
		cnt = Counter(a)
		q = int(sys.stdin.readline().rstrip())
		for _ in range(q):
			(b, c) = map(int, sys.stdin.readline().split())
			s += (c - b) * cnt[b]
			print(s)
			cnt[c] += cnt[b]
			cnt[b] = 0

	def E():
		(n, *a) = map(int, sys.stdin.read().split())
		s = 0
		for x in a:
			s ^= x
		b = map(lambda x: x ^ s, a)
		print(*b, sep=' ')

	def F():
		pass

class ABC172:

	def A():
		pass

	def B():
		pass

	def C():
		pass

	def D():
		pass

	def E():
		pass

	def F():
		pass

class ABC173:

	def A():
		n = int(sys.stdin.readline().rstrip())
		charge = (n + 999) // 1000 * 1000 - n
		print(charge)

	def B():
		(n, *s) = sys.stdin.read().split()
		c = Counter(s)
		for v in 'AC, WA, TLE, RE'.split(', '):
			print(f'{v} x {c[v]}')

	def C():
		(h, w, k) = map(int, sys.stdin.readline().split())
		c = [sys.stdin.readline().rstrip() for _ in range(h)]
		tot = 0
		for i in range(1 << h):
			for j in range(1 << w):
				cnt = 0
				for y in range(h):
					for x in range(w):
						if i >> y & 1 or j >> x & 1:
							continue
						cnt += c[y][x] == '#'
				tot += cnt == k
		print(tot)

	def D():
		(n, *a) = map(int, sys.stdin.read().split())
		a.sort(reverse=True)
		res = a[0] + sum(a[1:1 + (n - 2) // 2]) * 2 + a[1 + (n - 2) // 2] * (n & 1)
		print(res)

	def E():
		MOD = 10 ** 9 + 7
		(n, k, *a) = map(int, sys.stdin.read().split())
		minus = [x for x in a if x < 0]
		plus = [x for x in a if x > 0]
		if len(plus) + len(minus) // 2 * 2 >= k:
			(*minus,) = map(abs, minus)
			minus.sort(reverse=True)
			plus.sort(reverse=True)
			cand = []
			if len(minus) & 1:
				minus = minus[:-1]
			for i in range(0, len(minus) - 1, 2):
				cand.append(minus[i] * minus[i + 1] % MOD)
			if k & 1:
				res = plus[0]
				plus = plus[1:]
			else:
				res = 1
			if len(plus) & 1:
				plus = plus[:-1]
			for i in range(0, len(plus) - 1, 2):
				cand.append(plus[i] * plus[i + 1] % MOD)
			cand.sort(reverse=True)
			for x in cand[:k // 2]:
				res *= x
				res %= MOD
			print(res)
		elif 0 in a:
			print(0)
		else:
			cand = sorted(map(abs, a))
			res = 1
			for i in range(k):
				res *= cand[i]
				res %= MOD
			res = MOD - res
			print(res)
			pass

	def F():
		pass

def __starting_point():
	ABC042.D()
__starting_point()


(h, w, a, b) = map(int, input().split())
n = 2 * 10 ** 5
k = 2 * 10 ** 5
mod = 10 ** 9 + 7
modinv_table = [-1] * (k + 1)
modinv_table[1] = 1
for i in range(2, k + 1):
	modinv_table[i] = -modinv_table[mod % i] * (mod // i) % mod

def prepare_binomial_coefficients(n, k):
	for i in range(1, n + 1):
		bc_num[i] = i * bc_num[i - 1] % mod
	bc_num[0] = 0
	for i in range(1, k + 1):
		bc_den[i] = modinv_table[i] * bc_den[i - 1] % mod
	return

def binomial_coefficients(n, k):
	if n == 0 and k == 0:
		return 1
	return bc_num[n] * bc_den[k] * bc_den[n - k] % mod
bc_num = [1] * (n + 1)
bc_den = [1] * (n + 1)
prepare_binomial_coefficients(n, n)
mids = [0] * (w - b)
dis_mid = h - a - 1
for i in range(w - b):
	mids[i] = binomial_coefficients(dis_mid + i + b, i + b)
mids_down = [0] * (w - b)
dis_mid = a
for i in range(w - b):
	mids_down[i] = binomial_coefficients(dis_mid + w - b - i - 1, w - b - i - 1)
for i in range(w - b - 1):
	mids_down[i] -= mids_down[i + 1]
for i in range(w - b):
	mids[i] = mids[i] * mids_down[i] % mod
print(sum(mids) % mod)


import sys

def get_ints():
	return list(map(int, sys.stdin.readline().strip().split()))

def mul(x, y, mod):
	x %= mod
	y %= mod
	return x * y % mod

def div(x, y, mod):
	x %= mod
	y %= mod
	return x * mod_pow(y, mod - 2, mod) % mod

def mod_pow(a, p, mod):
	if p == 0:
		return 1
	if p % 2 == 0:
		root = mod_pow(a, p / 2, mod)
		return root * root % mod
	else:
		return a * mod_pow(a, p - 1, mod) % mod

def pre_factorial_divs(n, mod, factorials):
	factorial_divs = [0] * (n + 1)
	factorial_divs[n] = div(1, factorials, mod)
	for i in reversed(list(range(n))):
		factorial_divs[i] = mul(factorial_divs[i + 1], i + 1, mod)
	return factorial_divs

def pre_factorials(n, mod):
	factorials = [0] * (n + 1)
	factorials[0] = 1
	for i in range(n):
		factorials[i + 1] = (i + 1) * factorials[i] % mod
	return factorials

def fast_fast_fermat_comb(a, b, mod, factorials, factorial_divs):
	if len(factorials) == 0:
		raise
	af = factorials[a]
	bf = factorial_divs[b]
	abf = factorial_divs[a - b]
	return mul(mul(af, bf, mod), abf, mod)

def main():
	(h, w, a, b) = get_ints()
	ans = 0
	mod = 10 ** 9 + 7
	factorials = pre_factorials(h + w - 2, mod)
	factorial_divs = pre_factorial_divs(h + w - 2, mod, factorials[h + w - 2])
	for i in range(h - a):
		x = fast_fast_fermat_comb(b - 1 + i, b - 1, mod, factorials, factorial_divs)
		y = fast_fast_fermat_comb(h + w - 3 - (b - 1 + i), w - b - 1, mod, factorials, factorial_divs)
		ans += x * y % mod
		ans %= mod
	print(ans)

def __starting_point():
	main()
__starting_point()


(H, W, A, B) = list(map(int, input().split()))
mod = 10 ** 9 + 7
C = [1, 1]
inv = [0, 1]
Cinv = [1, 1]
for i in range(2, H + W + 1):
	C.append(C[-1] * i % mod)
	inv.append(-inv[mod % i] * (mod // i) % mod)
	Cinv.append(Cinv[-1] * inv[-1] % mod)
ans = 0
for i in range(H - A):
	a = C[i + B - 1] * C[H - 1 - i + W - B - 1] % mod
	a = a * Cinv[B - 1] % mod
	a = a * Cinv[i] % mod
	a = a * Cinv[W - B - 1] % mod
	a = a * Cinv[H - i - 1] % mod
	ans += a
	ans %= mod
print(ans)


def ext_euclid(a, b):
	if b == 0:
		return (1, 0, a)
	(y, x, v) = ext_euclid(b, a % b)
	y -= a // b * x
	return (x, y, v)

def mod_inv(a, mod):
	(x, _, _) = ext_euclid(a, mod)
	return x % mod

def comb_list_1(H, W, A, B, mod, modinv_list):
	ret = [0 for _ in range(H - A)]
	c = 1
	for h in range(H - A):
		ret[h] = c
		c *= h + B
		c *= modinv_list[h + 1]
		c %= mod
	return ret

def comb_list_2(H, W, A, B, mod, modinv_list):
	ret = [0 for _ in range(H - A)]
	c = 1
	for a in range(1, A + 1):
		c *= a + W - B - 1
		c *= modinv_list[a]
		c %= mod
	for h in range(H - A - 1, -1, -1):
		ret[h] = c
		c *= H - h + W - B - 1
		c *= modinv_list[H - h]
		c %= mod
	return ret

def main():
	MOD = 10 ** 9 + 7
	(H, W, A, B) = list(map(int, input().split(' ')))
	modinv_list = [None] + [mod_inv(h, MOD) for h in range(1, H + 1)]
	combs_1 = comb_list_1(H, W, A, B, MOD, modinv_list)
	combs_2 = comb_list_2(H, W, A, B, MOD, modinv_list)
	ans = 0
	for (c1, c2) in zip(combs_1, combs_2):
		ans += c1 * c2
		ans %= MOD
	print(ans)

def __starting_point():
	main()
__starting_point()


import sys

def comb(n, r, mod=None):
	if r == 0 or r == n:
		return 1
	r = min([r, n - r])
	(x, y) = (1, 1)
	ans = 1
	for i in range(1, r + 1):
		if mod:
			x *= n + 1 - i
			y *= i
			x %= mod
			y %= mod
		else:
			ans *= n + 1 - i
			ans //= i
	ans = x * pow(y, mod - 2, mod) % mod if mod else ans
	return ans

def main():
	input = sys.stdin.readline
	(h, w, a, b) = map(int, input().split())
	mod = pow(10, 9) + 7
	(bef, aft) = (1, comb(h + w - b - 2, h - 1, mod))
	ans = 0
	for i in range(h - a):
		ans += bef * aft
		ans %= mod
		bef = bef * (i + b) * pow(i + 1, mod - 2, mod) % mod
		aft = aft * (h - i - 1) * pow(h - i + w - b - 2, mod - 2, mod) % mod
	print(ans)

def __starting_point():
	main()
__starting_point()


mod = 10 ** 9 + 7
(h, w, a, b) = map(int, input().split())

def comb(n, r):
	if n < r:
		return 0
	if n < 0 or r < 0:
		return 0
	return fa[n] * fi[r] % mod * fi[n - r] % mod
fa = [1] * (h + w + 1)
fi = [1] * (h + w + 1)
for i in range(1, h + w + 1):
	fa[i] = fa[i - 1] * i % mod
	fi[i] = pow(fa[i], mod - 2, mod)
ans = 0
for i in range(h - a):
	ans += comb(b + i - 1, b - 1) * comb(h + w - b - i - 2, w - b - 1)
	ans %= mod
print(ans % mod)


class Factorial:

	def __init__(self, n, mod=10 ** 9 + 7):
		self.fac = [0] * (n + 1)
		self.ifac = [0] * (n + 1)
		self.fac[0] = 1
		self.ifac[0] = 1
		self.mod = mod
		modmod = self.mod - 2
		for i in range(n):
			self.fac[i + 1] = self.fac[i] * (i + 1) % self.mod
			self.ifac[i + 1] = self.ifac[i] * pow(i + 1, modmod, self.mod) % self.mod

	def comb(self, n, r):
		if n == 0 and r == 0:
			return 1
		if n < r or n < 0:
			return 0
		tmp = self.ifac[n - r] * self.ifac[r] % self.mod
		return tmp * self.fac[n] % self.mod

	def perm(self, n, r):
		if n == 0 and r == 0:
			return 1
		if n < r or n < 0:
			return 0
		return self.fac[n] * self.ifac[n - r] % self.mod
(h, w, a, b) = list(map(int, input().split()))
mod = 10 ** 9 + 7
fact = Factorial(h + w + 1)
ans = 0
(c, d) = (h - a, w - b)
for i in range(b + 1, w + 1):
	d = w - i + 1
	ans = (ans + fact.comb(i + c - 2, c - 1) * fact.comb(a + d - 2, a - 1)) % mod
print(ans)


(H, W, A, B) = map(int, input().split())
mod = int(1000000000.0) + 7

def inved(a):
	(x, y, u, v, k, l) = (1, 0, 0, 1, a, mod)
	while l != 0:
		(x, y, u, v) = (u, v, x - u * (k // l), y - v * (k // l))
		(k, l) = (l, k % l)
	return x % mod
fact = [1 for _ in range(H + W + A + B + 1)]
invf = [1 for _ in range(H + W + A + B + 1)]
for i in range(H + W + A + B):
	fact[i + 1] = fact[i] * (i + 1) % mod
invf[-1] = inved(fact[-1])
for i in range(H + W + A + B, 0, -1):
	invf[i - 1] = invf[i] * i % mod
S = 0
for i in range(H - A):
	S += fact[i + B - 1] * invf[i] * fact[H - i + W - B - 2] * invf[H - 1 - i] % mod
	S %= mod
S *= invf[B - 1] * invf[W - B - 1] % mod
S %= mod
print(S)


MOD = 10 ** 9 + 7
UPPERLIMIT = 2 * 10 ** 5 + 1
MODMUL = [1, 1] + [0] * (UPPERLIMIT - 1)
for i in range(2, UPPERLIMIT + 1):
	MODMUL[i] = MODMUL[i - 1] * i % MOD
MODDIV = [1] * UPPERLIMIT + [pow(MODMUL[-1], MOD - 2, MOD)]
for i in range(UPPERLIMIT, 0, -1):
	MODDIV[i - 1] = MODDIV[i] * i % MOD
(H, W, A, B) = map(int, input().split())
ans = MODMUL[H + W - 2] * MODDIV[H - 1] % MOD * MODDIV[W - 1] % MOD
x = [MODMUL[H - A + B + i - 1] * MODDIV[B - 1] * MODDIV[H - A + i] % MOD for i in range(A)]
y = [MODMUL[W + A - B - i - 1] * MODDIV[W - B] * MODDIV[A - i - 1] % MOD for i in range(A)]
for i in range(A - 1, 0, -1):
	x[i] -= x[i - 1]
for i in range(A):
	ans -= x[i] * y[i] % MOD
	ans %= MOD
print(ans)


import math
import time
DIV_VALUE = 10 ** 9 + 7

def calcModOfPow(a, n, p):
	btm = a
	ans = 1
	while n != 0:
		if n & 1:
			ans = ans * btm % p
		n = n >> 1
		btm = btm ** 2 % p
	return ans

def calcModOfInv(a, p):
	b = p
	x = 1
	y = 0
	while b:
		div = a // b
		a -= div * b
		[a, b] = [b, a]
		x -= div * y
		[x, y] = [y, x]
	x %= p
	if x < 0:
		x += p
	return x

class FirstHalf:

	def __init__(self, H, W, A, B):
		self.H = H
		self.W = W
		self.A = A
		self.B = B
		self.k = 0
		self.div = 0
		self.sup = 0
		self.numOfCases = 1

	def getNumOfCases(self):
		if self.k != 0:
			self.numOfCases = self.numOfCases * (self.B + self.k - 1) * calcModOfInv(self.k, DIV_VALUE) % DIV_VALUE
		self.k += 1
		return self.numOfCases

class SecondHalf:

	def __init__(self, H, W, A, B):
		self.H = H
		self.W = W
		self.A = A
		self.B = B
		self.k = 0
		self.div = 0
		self.numOfCases = 1
		totalval = self.H + self.W - self.B - 2
		loopval = self.H - 1 if self.H < self.W - self.B else self.W - self.B - 1
		for top in range(totalval, totalval - loopval, -1):
			self.numOfCases *= top
			self.numOfCases %= DIV_VALUE
		for bottom in range(loopval, 0, -1):
			self.numOfCases *= calcModOfInv(bottom, DIV_VALUE)
			self.numOfCases %= DIV_VALUE

	def getNumOfCases(self):
		if self.k != 0:
			self.numOfCases = self.numOfCases * (self.H - self.k) * calcModOfInv(self.H + self.W - self.B - self.k - 1, DIV_VALUE) % DIV_VALUE
		self.k += 1
		return self.numOfCases

def __starting_point():
	[H, W, A, B] = [int(ipt) for ipt in input().split()]
	start = time.time()
	fstHlf = FirstHalf(H, W, A, B)
	sndHlf = SecondHalf(H, W, A, B)
	totalCases = 0
	mid = time.time()
	for _ in range(H - A):
		totalCases += fstHlf.getNumOfCases() * sndHlf.getNumOfCases()
		totalCases %= DIV_VALUE
	end = time.time()
	print(totalCases)
__starting_point()


import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7

class CmbMod:

	def __init__(self, n, p):
		self.n = n
		self.p = p
		self.fact = [1, 1]
		self.factinv = [1, 1]
		self.inv = [0, 1]

	def cmb_mod(self, n, r):
		(numer, denom) = (1, 1)
		for i in range(r):
			numer = numer * (n - i) % self.p
			denom = denom * (i + 1) % self.p
		return numer * pow(denom, self.p - 2, self.p) % self.p

	def prep(self):
		for i in range(2, self.n + 1):
			self.fact.append(self.fact[-1] * i % self.p)
			self.inv.append(-self.inv[self.p % i] * (self.p // i) % self.p)
			self.factinv.append(self.factinv[-1] * self.inv[-1] % self.p)

	def cmb_mod_with_prep(self, n, r):
		if r < 0 or n < r:
			return 0
		r = min(r, n - r)
		return self.fact[n] * self.factinv[r] * self.factinv[n - r] % self.p

def resolve():
	(H, W, A, B) = list(map(int, input().split()))
	H -= 1
	W -= 1
	cmb = CmbMod(H + W, mod)
	cmb.prep()
	total = cmb.cmb_mod_with_prep(H + W, H)
	for w in range(B):
		tmp = cmb.cmb_mod_with_prep(H - A + w, w) * cmb.cmb_mod_with_prep(A - 1 + W - w, A - 1) % mod
		total -= tmp
		total %= mod
	print(total)

def __starting_point():
	resolve()
__starting_point()


def cmb(n, r, mod):
	if r < 0 or r > n:
		return 0
	r = min(r, n - r)
	return g1[n] * g2[r] * g2[n - r] % mod
mod = 10 ** 9 + 7
size = 2 * 10 ** 5
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
for i in range(2, size + 1):
	g1.append(g1[-1] * i % mod)
	inverse.append(-inverse[mod % i] * (mod // i) % mod)
	g2.append(g2[-1] * inverse[-1] % mod)
(H, W, A, B) = map(int, input().split())
ans = 0
for i in range(W - B):
	ans += cmb(H - A - 1 + (B + i), B + i, mod) * cmb(A - 1 + W - B - 1 - i, A - 1, mod)
	ans %= mod
print(ans)


import math
import heapq
import bisect
import numpy as np
from collections import Counter, deque
import itertools
MOD = 10 ** 9 + 7
(H, W, A, B) = map(int, input().split())

def comb(a, b):
	p = fac[a - b] * fac[b] % MOD
	return fac[a] * pow(p, MOD - 2, MOD) % MOD
fac = [1]
for i in range(H + W):
	fac.append(fac[-1] * (i + 1) % MOD)
ans = 0
for i in range(W - B):
	p = comb(H - A - 1 + B + i, B + i) * comb(W - B - i - 2 + A, A - 1)
	ans += p % MOD
	ans %= MOD
print(ans)


N = 2 * 10 ** 5 + 3
mod = 10 ** 9 + 7
fac = [1] * (N + 1)
for i in range(1, N + 1):
	fac[i] = fac[i - 1] * i % mod
inv_fac = [1] * (N + 1)
inv_fac[N] = pow(fac[N], mod - 2, mod)
for i in range(N - 1, 0, -1):
	inv_fac[i] = inv_fac[i + 1] * (i + 1) % mod

def nCr(n, r):
	if n < 0 or r < 0 or r > n:
		return 0
	return fac[n] * inv_fac[r] % mod * inv_fac[n - r] % mod
(h, w, a, b) = map(int, input().split())
ans = nCr(h + w - 2, h - 1)
for i in range(b):
	ans = (ans - nCr(h - a + i - 1, i) * nCr(a + w - i - 2, a - 1)) % mod
print(ans)


(h, w, a, b) = map(int, input().split())
inv = [0] * (2 * max(h, w) + 1)
fact = [0] * (2 * max(h, w) + 1)
inv[0] = 1
fact[0] = 1
mod = 10 ** 9 + 7
for i in range(1, 2 * max(h, w) + 1):
	fact[i] = fact[i - 1] * i % mod
inv[-1] = pow(fact[-1], mod - 2, mod)
for i in range(2 * max(h, w), 0, -1):
	inv[i - 1] = inv[i] * i % mod
ans = 0
for yoko in range(b + 1, w + 1):
	re = fact[yoko - 1 + h - 1 - a] * inv[h - 1 - a] * inv[yoko - 1] % mod
	rr = fact[w - yoko + a - 1] * inv[w - yoko] * inv[a - 1] % mod
	ans = (ans + re * rr % mod) % mod
print(ans)


(h, w, a, b) = list(map(int, input().split()))
p = 10 ** 9 + 7

def modp_factorial(n):
	s = 1
	for x in range(1, h + 1):
		s = s * x % p
	return s

def modp_prod(lst):
	s = 1
	for x in lst:
		s = s * x % p
	return s

def inv(n):
	s = 1
	q = p - 2
	while q > 0:
		if q & 1:
			s = s * n % p
		n = n * n % p
		q >>= 1
	return s
l = [1]
f = 1
for x in range(1, h + w):
	f = f * x % p
	l.append(f)
invl = [inv(l[-1])]
for n in range(h + w - 1, 1, -1):
	invl.append(invl[-1] * n % p)
invl.append(1)
invl.reverse()
s = 0
for x in range(1, h - a + 1):
	s = (s + modp_prod([l[x + b - 2], invl[x - 1], invl[b - 1], l[w - b + h - x - 1], invl[h - x], invl[w - b - 1]])) % p
print(s)


P = 10 ** 9 + 7
fac = [1]
ifac = [1]
ff = 1
for i in range(1, 200001):
	ff *= i
	ff %= P
	fac.append(ff)
	ifac.append(pow(ff, P - 2, P))

def ncr(n, r):
	return fac[n] * ifac[r] % P * ifac[n - r] % P
(h, w, a, b) = list(map(int, input().split()))
s = 0
nC = b - 1
kC = 0
nD = w - b - 1 + h - 1
kD = h - 1
for i in range(h - a):
	C = ncr(nC, kC)
	D = ncr(nD, kD)
	s = (s + C * D) % P
	nC += 1
	kC += 1
	kD -= 1
	nD -= 1
print(s)


class Combination:

	def __init__(self, size, mod=10 ** 9 + 7):
		self.size = size + 2
		self.mod = mod
		self.fact = [1, 1] + [0] * size
		self.factInv = [1, 1] + [0] * size
		self.inv = [0, 1] + [0] * size
		for i in range(2, self.size):
			self.fact[i] = self.fact[i - 1] * i % self.mod
			self.inv[i] = -self.inv[self.mod % i] * (self.mod // i) % self.mod
			self.factInv[i] = self.factInv[i - 1] * self.inv[i] % self.mod

	def npr(self, n, r):
		if n < r or n < 0 or r < 0:
			return 0
		return self.fact[n] * self.factInv[n - r] % self.mod

	def ncr(self, n, r):
		if n < r or n < 0 or r < 0:
			return 0
		return self.fact[n] * (self.factInv[r] * self.factInv[n - r] % self.mod) % self.mod

	def nhr(self, n, r):
		return self.ncr(n + r - 1, n - 1)

	def factN(self, n):
		if n < 0:
			return 0
		return self.fact[n]
(H, W, A, B) = list(map(int, input().split()))
comb = Combination(H + W + 100)
MOD = 10 ** 9 + 7
ans = 0
for w in range(B + 1, W + 1):
	ans += comb.ncr(H - A + w - 2, w - 1) * comb.ncr(A + W - w - 1, A - 1)
print(ans % MOD)


(H, W, A, B) = list(map(int, input().split()))
mod = 10 ** 9 + 7
U = 2 * 10 ** 5
factorial = [1 for _ in range(U + 1)]
for i in range(1, U + 1):
	factorial[i] = factorial[i - 1] * i % mod
inverse = [1 for _ in range(U + 1)]
inverse[U] = pow(factorial[U], mod - 2, mod)
for i in range(U, 0, -1):
	inverse[i - 1] = inverse[i] * i % mod

def comb(n, k):
	if k < 0 or k > n:
		return 0
	x = factorial[n]
	x *= inverse[k]
	x %= mod
	x *= inverse[n - k]
	x %= mod
	return x
ans = 0
for i in range(H - A):
	x = comb(B - 1 + i, i)
	a = H - 1 - i
	b = W - 1 - B
	x *= comb(a + b, a)
	x %= mod
	ans += x
ans %= mod
print(ans)


(H, W, A, B) = [int(_) for _ in input().split()]
mod = 10 ** 9 + 7
f = [1] * (3 * 10 ** 6 + 10)
for i in range(1, 3 * 10 ** 6 + 10):
	f[i] = i * f[i - 1] % mod
fi = {}

def comb(n, r):
	if r not in fi:
		fi[r] = pow(f[r], mod - 2, mod)
	if n - r not in fi:
		fi[n - r] = pow(f[n - r], mod - 2, mod)
	return f[n] * fi[r] * fi[n - r] % mod
ans = 0
for x in range(H - A):
	ans += comb(B - 1 + x, x) * comb(H - x - 2 + W - B, W - B - 1)
	ans %= mod
print(ans)


mod = 10 ** 9 + 7
(h, w, a, b) = map(int, input().split())

def comb(a, b):
	p = fac[a - b] * fac[b] % mod
	return fac[a] * pow(p, mod - 2, mod) % mod
fac = [1]
for i in range(h + w):
	fac.append(fac[-1] * (i + 1) % mod)
ans = 0
for i in range(w - b):
	p = comb(h - a - 1 + b + i, b + i) * comb(w - b - i - 2 + a, a - 1)
	ans += p % mod
	ans %= mod
print(ans)


MODD = 10 ** 9 + 7

def modinv(a, m) -> int:
	b = m
	u = 1
	v = 0
	while b:
		t = a // b
		a -= t * b
		(a, b) = (b, a)
		u -= t * v
		(u, v) = (v, u)
	u %= m
	if u < 0:
		u += m
	return u
fac = [1] * 200001
infac = [1] * 200001
aaa = 1
for i in range(1, 200001):
	aaa = aaa * i % MODD
	fac[i] = aaa
	infac[i] = modinv(aaa, MODD)
import math as m

def perm(x, y, z) -> int:
	return fac[x] * infac[y] * infac[z] % MODD
(h, w, a, b) = [int(x) for x in input().split()]
A = h - a
B = b - 1
C = h - 1
D = w - b - 1
j = 0
k = B
kl = C
jl = D
ans = 0
for i in range(A):
	ans += perm(B + i, B, i) * perm(C + D - i, C - i, D)
print(ans % MODD)


def cmb(n, r):
	if r < 0 or n < r:
		return 0
	r = min(r, n - r)
	return fact[n] * factinv[r] * factinv[n - r] % mod
N = 2 * 10 ** 5 + 1000
mod = pow(10, 9) + 7
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1]
for i in range(2, N + 1):
	fact.append(fact[-1] * i % mod)
	inv.append(-inv[mod % i] * (mod // i) % mod)
	factinv.append(factinv[-1] * inv[-1] % mod)
(h, w, a, b) = map(int, input().split())
ans = 0
for i in range(h - a):
	ans += cmb(b - 1 + i, i) * cmb(w - b - 1 + h - i - 1, w - b - 1) % (10 ** 9 + 7)
print(ans % (10 ** 9 + 7))


def gcd(b, m):
	if b == 0:
		return m
	return gcd(m % b, b)

def modInverse(b, m):
	g = gcd(b, m)
	if g != 1:
		return -1
	else:
		return pow(b, m - 2, m)

def modDivide(a, b, m):
	a = a % m
	inv = modInverse(b, m)
	if inv == -1:
		print('Division not defined')
	else:
		return inv * a % m
MOD = 10 ** 9 + 7
(H, W, A, B) = list(map(int, input().split(' ')))
DP = []
j = 1
for i in range(1, 200002):
	j *= i
	j %= MOD
	DP.append(j)

def factorial(i):
	if i == 0:
		return 1
	nonlocal DP
	return DP[i - 1]

def move2(H, W, A, B):
	numPaths = 0
	h = H - A
	w = W - (W - B) + 1
	a = A + 1
	pttp = 0
	for b in range(w, W + 1):
		ttp = factorial(h + b - 2) * modInverse(factorial(h - 1) * factorial(b - 1) % MOD, MOD) % MOD
		tpttp = ttp
		ttp -= pttp
		pttp = tpttp
		btp = factorial(a + (W - b + 1) - 2) * modInverse(factorial(a - 1) * factorial(W - b) % MOD, MOD) % MOD
		numPaths += ttp * btp
	return numPaths
ways = move2(H, W, A, B)
print(ways % (10 ** 9 + 7))


(h, w, a, b) = map(int, input().split())
MOD = 10 ** 9 + 7
N = h + w + 10
fact = [0 for _ in range(N)]
invfact = [0 for _ in range(N)]
fact[0] = 1
for i in range(1, N):
	fact[i] = fact[i - 1] * i % MOD
invfact[N - 1] = pow(fact[N - 1], MOD - 2, MOD)
for i in range(N - 2, -1, -1):
	invfact[i] = invfact[i + 1] * (i + 1) % MOD

def nCk(n, k):
	if k < 0 or n < k:
		return 0
	else:
		return fact[n] * invfact[k] * invfact[n - k] % MOD
ans = 0
a += 1
b += 1
n = h - a + b - 1
n2 = w - b + a - 1
while a <= h and b <= w:
	ans += nCk(n, b - 1) * nCk(n2, w - b)
	ans %= MOD
	a += 1
	b += 1
print(ans)


class nCrMod:

	def __init__(self, mod):
		self.mod = mod
		self.fac = [1, 1]
		self.finv = [1, 1]
		self.inv = [0, 1]

	def prep(self, n):
		mod = self.mod
		(f, fi) = (self.fac[-1], self.finv[-1])
		for i in range(len(self.fac), n + 1):
			fn = f * i % mod
			v = -self.inv[mod % i] * (mod // i) % mod
			fin = fi * v % mod
			(f, fi) = (fn, fin)
			self.fac.append(f)
			self.finv.append(fi)
			self.inv.append(v)

	def __call__(self, n, r):
		if len(self.fac) <= n:
			self.prep(n)
		return self.fac[n] * self.finv[r] * self.finv[n - r] % self.mod

def main():
	(H, W, A, B) = list(map(int, input().split()))
	mod = 10 ** 9 + 7
	nCr = nCrMod(mod)
	r = 0
	a = H - A - 1
	for i in range(B, W):
		r = (r + nCr(a + i, i) * nCr(A - 1 + W - i - 1, W - i - 1)) % mod
	return r
print(main())


(H, W, A, B) = list(map(int, input().split()))
MOD = 1000000007
fac = [1, 1]
inverse = [0, 1]
ifac = [1, 1]
for i in range(2, H + W):
	fac.append(fac[-1] * i % MOD)
	inverse.append(-inverse[MOD % i] * (MOD // i) % MOD)
	ifac.append(ifac[-1] * inverse[i] % MOD)

def f(n):
	return fac[B + n + H - A - 1] * fac[W - B - 1 - n + A - 1] * ifac[B + n] * ifac[H - A - 1] * ifac[W - B - 1 - n] * ifac[A - 1]

def sigma(func, frm, to):
	result = 0
	for i in range(frm, to + 1):
		result += func(i)
	return result
print(sigma(f, 0, W - B - 1) % MOD)


def combmod(n, r, p):
	if r < 0 or n < r:
		return 0
	return fact[n] * finv[r] * finv[n - r] % p
p = 10 ** 9 + 7
N = 10 ** 6
fact = [1, 1]
finv = [1, 1]
inv = [0, 1]
for i in range(2, N + 1):
	fact.append(fact[-1] * i % p)
	inv.append(-inv[p % i] * (p // i) % p)
	finv.append(finv[-1] * inv[-1] % p)
(h, w, a, b) = (int(x) for x in input().split())
ans = 0
for j in range(b, w):
	ans += combmod(h - a - 1 + j, j, p) * combmod(a + w - 2 - j, w - 1 - j, p)
print(ans % p)


import sys
from math import factorial
MOD = 10 ** 9 + 7

def combInit(n):
	fact = [1]
	finv = [1]
	for i in range(1, n + 1):
		fact.append(fact[i - 1] * i % MOD)
		finv.append(pow(fact[i], MOD - 2, MOD))
	return [fact, finv]

def comb(n, k, f):
	if n < k:
		return 0
	elif n < 0 or k < 0:
		return 0
	else:
		return f[0][n] * (f[1][k] * f[1][n - k] % MOD) % MOD

def perm(n, r):
	return factorial(n) // factorial(r)

def gcb(a, b):
	if b == 0:
		return a
	else:
		return gcb(b, a % b)

def lcm(a, b):
	d = gcb(a, b)
	return int(a / d * b)

def surP(x):
	return x % MOD

def main():
	(h, w, a, b) = list(map(int, input().split()))
	f = combInit(h + w)
	res = 0
	for i in range(b, w):
		res += comb(h - 1 - a + i, i, f) * comb(a - 1 + (w - 1 - i), w - 1 - i, f)
	out = surP(res)
	print('{}'.format(out))

def __starting_point():
	main()
__starting_point()


memo = [0] * (10 ** 6 + 1)
memo[0] = memo[1] = 1
mod = 10 ** 9 + 7
for i in range(2, 10 ** 6 + 1):
	memo[i] = memo[i - 1] * i % mod

def comb(n, k, p):
	return memo[n] * pow(memo[k], p - 2, p) * pow(memo[n - k], p - 2, p) % mod
(h, w, a, b) = map(int, input().split())
ans = 0
for i in range(h - a):
	ans += comb(b + i - 1, i, mod) * comb(h - i - 1 + w - b - 1, w - b - 1, mod) % mod
	ans %= mod
print(ans)


(h, w, a, b) = list(map(int, input().split()))
mod = 10 ** 9 + 7
fact = [1, 1]
finv = [1, 1]
inv = [0, 1]
for i in range(2, h + w + 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] * finv[n - r] % mod
ans = 0
for i in range(100000):
	x = h - a - i
	y = b + 1 + i
	if 0 >= x or y > w:
		break
	ans += nCr(h + w - x - y, h - x, mod) * nCr(x + y - 2, x - 1, mod) % mod
	ans %= mod
print(ans)


(h, w, a, b) = map(int, input().split())
import math
ans = 0
mod = 10 ** 9 + 7
l = [i for i in range(1, h + w + 2)]
for i in range(1, len(l) - 1):
	l[i + 1] = l[i + 1] * l[i] % mod
l = [1] + l
gyakugen = [pow(l[i], mod - 2, mod) for i in range(1, len(l))]
gyakugen = [1] + gyakugen
for p in range(1, w - b + 1):
	ans += l[h - a - 1 + b + p - 1] * l[w - (b + p) + a - 1] * gyakugen[h - a - 1] * gyakugen[b + p - 1] * gyakugen[a - 1] * gyakugen[w - (b + p)]
print(int(ans) % mod)


class ModInt:

	def __init__(self, num, mod):
		self.num = num
		self.mod = mod

	def __str__(self):
		return str(self.num)

	def __repr__(self):
		return 'ModInt(num: {}, mod: {}'.format(self.num, self.mod)

	def __add__(self, other):
		ret = self.num + other.num
		ret %= self.mod
		return ModInt(ret, self.mod)

	def __sub__(self, other):
		ret = self.num - other.num
		ret %= self.mod
		return ModInt(ret, self.mod)

	def __mul__(self, other):
		ret = self.num * other.num
		ret %= self.mod
		return ModInt(ret, self.mod)

	def pow(self, times):
		pw = pow(self.num, times, self.mod)
		return ModInt(pw, self.mod)

	def inverse(self):
		return self.pow(self.mod - 2)

	def __truediv__(self, other):
		num = self * other.inverse()
		return ModInt(num, self.mod)
(h, w, a, b) = list(map(int, input().split()))
mod = 10 ** 9 + 7
fact = [ModInt(1, mod)]
inv = [ModInt(1, mod).inverse()] * (h + w - 1)

def comb(n, r):
	return fact[n] * inv[r] * inv[n - r]
for i in range(1, h + w - 1):
	fact.append(fact[-1] * ModInt(i, mod))
inv[h + w - 2] = fact[-1].inverse()
for i in range(h + w - 2, 0, -1):
	inv[i - 1] = inv[i] * ModInt(i, mod)
ans = ModInt(0, mod)
for hi in range(h - a):
	ans += comb(hi + b - 1, hi) * comb(h - hi - 1 + w - b - 1, w - b - 1)
print(ans)


(H, W, A, B) = [int(_) for _ in input().split()]
mod = 10 ** 9 + 7
X = [i for i in range(H + W + 1)]
X[0] = 1
for i in range(2, H + W + 1):
	X[i] = X[i - 1] * i % mod
Y = X.copy()
Y[-1] = pow(Y[-1], mod - 2, mod)
for i in range(H + W, 1, -1):
	Y[i - 1] = i * Y[i] % mod

def comb(x, y):
	return X[x] * Y[y] * Y[x - y] % mod
ans = 0
for i in range(B, min(B + H - A, W)):
	ans += comb(H - A + B - 1, i) * comb(W + A - B - 1, W - i - 1)
	ans %= mod
print(ans)


import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce

def input():
	return sys.stdin.readline().strip()

def INT():
	return int(input())

def MAP():
	return list(map(int, input().split()))

def LIST():
	return list(map(int, input().split()))

def ZIP(n):
	return list(zip(*(MAP() for _ in range(n))))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
lim = 2 * 10 ** 5
fact = [1] * (lim + 1)
for n in range(1, lim + 1):
	fact[n] = n * fact[n - 1] % mod
fact_inv = [1] * (lim + 1)
fact_inv[lim] = pow(fact[lim], mod - 2, mod)
for n in range(lim, 0, -1):
	fact_inv[n - 1] = n * fact_inv[n] % mod

def C(n, r):
	return fact[n] * fact_inv[r] % mod * fact_inv[n - r] % mod
(H, W, A, B) = MAP()
ans = 0
for n in range(B, W):
	way = C(H - A - 1 + n, n) * C(W - n - 1 + A - 1, A - 1) % mod
	ans = (ans + way) % mod
print(ans)


(h, w, a, b) = map(int, input().split())
mod = 10 ** 9 + 7
fac = [1, 1]
inv = [1, 1]
finv = [1, 1]
for i in range(2, h + w + 5):
	fac.append(fac[i - 1] * i % mod)
	inv.append(mod - inv[mod % i] * (mod // i) % mod)
	finv.append(finv[i - 1] * inv[i] % mod)

def nck(n, k):
	if n < k:
		return 0
	if n < 0 or k < 0:
		return 0
	return fac[n] * (finv[k] * finv[n - k] % mod) % mod
ans = 0
for i in range(h - a):
	ans += nck(i + b - 1, b - 1) * nck(h - 1 - i + w - b - 1, w - b - 1) % mod
	ans %= mod
print(ans)


def cmb(n, r, p):
	if r < 0 or n < r:
		return 0
	r = min(r, n - r)
	return fact[n] * factinv[r] * factinv[n - r] % p
p = 10 ** 9 + 7
N = 3 * 10 ** 5
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1]
for i in range(2, N + 1):
	fact.append(fact[-1] * i % p)
	inv.append(-inv[p % i] * (p // i) % p)
	factinv.append(factinv[-1] * inv[-1] % p)

def __starting_point():
	(H, W, A, B) = list(map(int, input().split()))
	p = 10 ** 9 + 7
	ans = 0
	for i in range(H - A):
		if i == 0:
			ans += cmb(B + i, i, p) * cmb(H + W - B - 2 - i, H - 1 - i, p)
			ans %= p
		else:
			ans += cmb(B + i - 1, i, p) * cmb(H + W - B - 2 - i, H - 1 - i, p)
			ans %= p
	print(ans)
__starting_point()


import math
(h, w, a, b) = list(map(int, input().split()))
p = 10 ** 9 + 7

def cmb(n, k, mod, fac, ifac):
	k = min(k, n - k)
	return fac[n] * ifac[k] * ifac[n - k] % mod

def make_tables(mod, n):
	fac = [1, 1]
	ifac = [1, 1]
	inverse = [0, 1]
	for i in range(2, n + 1):
		fac.append(fac[-1] * i % mod)
		inverse.append(-inverse[mod % i] * (mod // i) % mod)
		ifac.append(ifac[-1] * inverse[-1] % mod)
	return (fac, ifac)
(fac, ifac) = make_tables(p, h + w - 2)
total = 0
for i in range(b, w):
	r1 = cmb(h - a - 1 + i, i, p, fac, ifac)
	r3 = cmb(a - 1 + w - 1 - i, a - 1, p, fac, ifac)
	total = total + r1 * r3
print(total % p)


class Data:

	def __init__(self):
		self.power = 1
		self.rev = 1

class Combi:

	def __init__(self, N, mod):
		self.lists = [Data() for _ in range(N + 1)]
		self.mod = mod
		for i in range(2, N + 1):
			self.lists[i].power = self.lists[i - 1].power * i % self.mod
		self.lists[N].rev = pow(self.lists[N].power, self.mod - 2, self.mod)
		for j in range(N, 0, -1):
			self.lists[j - 1].rev = self.lists[j].rev * j % self.mod

	def combi(self, K, R):
		if K < R:
			return 0
		else:
			return self.lists[K].power * self.lists[K - R].rev * self.lists[R].rev % self.mod
(h, w, a, b) = list(map(int, input().split()))
ans = 0
mod = 10 ** 9 + 7
C = Combi(w + h + 2, mod)
for i in range(h - a):
	ans += C.combi(b + i - 1, i) * C.combi(w + h - 2 - b - i, h - 1 - i) % mod
print(ans % mod)


class Calc:

	def __init__(self, max_value, mod):
		fact = [-1] * (max_value + 1)
		fact[0] = 1
		fact[1] = 1
		for x in range(2, max_value + 1):
			fact[x] = x * fact[x - 1] % mod
		invs = [1] * (max_value + 1)
		invs[max_value] = pow(fact[max_value], mod - 2, mod)
		for x in range(max_value - 1, 0, -1):
			invs[x] = invs[x + 1] * (x + 1) % mod
		self.fact = fact
		self.invs = invs
		self.mod = mod

	def combination(self, n, r):
		if n - r < r:
			return self.combination(n, n - r)
		if r < 0:
			return 0
		if r == 0:
			return 1
		if r == 1:
			return n
		return self.fact[n] * self.invs[r] * self.invs[n - r] % self.mod

def main():
	MOD = 10 ** 9 + 7
	(H, W, A, B) = list(map(int, input().split()))
	calc = Calc(max_value=H + W, mod=MOD)
	ans = 0
	for x in range(B, W):
		v = calc.combination(n=H - A - 1 + x, r=x)
		u = calc.combination(n=A - 1 + (W - 1 - x), r=A - 1)
		ans = (ans + v * u) % MOD
	print(ans)

def __starting_point():
	main()
__starting_point()


class Combination:

	def __init__(self, N, MOD=10 ** 9 + 7):
		self.MOD = MOD
		(self.fact, self.inv) = self._make_factorial_list(N)

	def __call__(self, n, k):
		if k < 0 or k > n:
			return 0
		res = self.fact[n] * self.inv[k] % self.MOD
		res = res * self.inv[n - k] % self.MOD
		return res

	def _make_factorial_list(self, N):
		fact = [1] * (N + 1)
		inv = [1] * (N + 1)
		MOD = self.MOD
		for i in range(1, N + 1):
			fact[i] = fact[i - 1] * i % MOD
		inv[N] = pow(fact[N], MOD - 2, MOD)
		for i in range(N, 0, -1):
			inv[i - 1] = inv[i] * i % MOD
		return (fact, inv)

def __starting_point():
	(H, W, A, B) = list(map(int, input().split()))
	mod = 10 ** 9 + 7
	comb = Combination(2 * 10 ** 5 + 10, mod)
	ans = 0
	x = H - A
	y = B + 1
	while x > 0 and y <= W:
		path1 = comb(x + y - 2, x - 1)
		path2 = comb(H - x + W - y, H - x)
		ans = (ans + path1 * path2) % mod
		x -= 1
		y += 1
	print(ans)
__starting_point()


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

def mod(num):
	return num % (10 ** 9 + 7)
n = H + W + 1
fac = [0] * n
rev = [0] * n
fac[0] = 1
for i in range(1, n):
	fac[i] = mod(fac[i - 1] * i)
rev[n - 1] = pow(fac[n - 1], 10 ** 9 + 5, 10 ** 9 + 7)
for i in range(n - 2, 0, -1):
	rev[i] = mod(rev[i + 1] * (i + 1))
rev[0] = 1
t1 = [0] * (W - B)
for i in range(W - B):
	t1[i] = mod(fac[H - A - 1 + i + B] * mod(rev[B + i] * rev[H - A - 1]))
res = 0
for i in range(W - B):
	r = t1[i] * mod(fac[A - 1 + W - B - 1 - i] * mod(rev[A - 1] * rev[W - B - 1 - i]))
	res = mod(res + r)
print(res)


LIMIT = 2 * 10 ** 5
fac = [0] * (LIMIT + 10)
fac[0] = 1
inv = [0] * (LIMIT + 10)
MOD = 1000000007
n = 1
for i in range(1, LIMIT + 1):
	n *= i
	n %= MOD
	fac[i] = n
inv[LIMIT] = pow(fac[LIMIT], MOD - 2, MOD)
for i in range(LIMIT, -1, -1):
	inv[i - 1] = inv[i] * i % MOD

def C(n, r):
	return fac[n] * inv[n - r] * inv[r] % MOD
(H, W, A, B) = list(map(int, input().split()))
ans = 0
B1 = B - 1
WB1 = W - B - 1
for i in range(H - A):
	ans += C(i + B1, B1) * C(H - i - 1 + WB1, WB1)
	ans %= MOD
print(ans)


M = 10 ** 9 + 7
(H, W, A, B) = map(int, input().split())
C = 1
ans = 1
for I in range(H - 1):
	ans = C = C * (W + H - B - 2 - I) * pow(I + 1, M - 2, M) % M
for I in range(1, H - A):
	C = C * (B - 1 + I) * (H - I) * pow(I * (W + H - B - 1 - I), M - 2, M) % M
	ans += C
print(ans % M)


(H, W, A, B) = list(map(int, input().split()))
C = H - A
D = W - B
p = 1000000007

def power(a, b):
	if b == 0:
		return 1
	elif b % 2 == 0:
		return power(a, b // 2) ** 2 % p
	else:
		return power(a, b // 2) ** 2 * a % p
f = [1]
for i in range(H + W):
	f.append(f[i] * (i + 1) % p)
I_f = [0] * (H + W + 1)
I_f[H + W] = power(f[H + W], p - 2)
for i in reversed(list(range(H + W))):
	I_f[i] = I_f[i + 1] * (i + 1) % p

def combi(a, b):
	return f[a + b] * I_f[a] * I_f[b] % p
x = 0
for i in range(C):
	x = (x + combi(i, B - 1) * combi(D - 1, H - i - 1)) % p
print(x)


def main():

	def cmb(n, r, mod):
		if r < 0 or r > n:
			return 0
		r = min(r, n - r)
		return g1[n] * g2[r] * g2[n - r] % mod
	mod = 10 ** 9 + 7
	N = 10 ** 6
	g1 = [1, 1]
	g2 = [1, 1]
	inverse = [0, 1]
	for i in range(2, N + 1):
		g1.append(g1[-1] * i % mod)
		inverse.append(-inverse[mod % i] * (mod // i) % mod)
		g2.append(g2[-1] * inverse[-1] % mod)
	(H, W, A, B) = list(map(int, input().split()))
	ans = cmb(H + W - 2, min(H, W) - 1, mod)
	tmp = 0
	for i in range(B):
		t = cmb(H - A - 1 + i, i, mod)
		t *= cmb(W - 1 - i + A - 1, A - 1, mod)
		tmp += t
		tmp %= mod
	print((ans - tmp) % mod)
main()


class Combination:

	def __init__(self, N, MOD=10 ** 9 + 7):
		self.MOD = MOD
		(self.fact, self.inv) = self._make_factorial_list(N)

	def __call__(self, n, k):
		if k < 0 or k > n:
			return 0
		res = self.fact[n] * self.inv[k] % self.MOD
		res = res * self.inv[n - k] % self.MOD
		return res

	def _make_factorial_list(self, N):
		fact = [1] * (N + 1)
		inv = [1] * (N + 1)
		MOD = self.MOD
		for i in range(1, N + 1):
			fact[i] = fact[i - 1] * i % MOD
		inv[N] = pow(fact[N], MOD - 2, MOD)
		for i in range(N, 0, -1):
			inv[i - 1] = inv[i] * i % MOD
		return (fact, inv)

def __starting_point():
	(H, W, A, B) = list(map(int, input().split()))
	mod = 10 ** 9 + 7
	comb = Combination(2 * 10 ** 5 + 10, mod)
	ans = 0
	h1 = H - A
	w1 = B + 1
	while True:
		X = comb(h1 + w1 - 2, h1 - 1)
		h2 = H - h1
		w2 = W - w1
		Y = comb(h2 + w2, h2)
		ans += X * Y % mod
		ans %= mod
		h1 -= 1
		w1 += 1
		if h1 <= 0 or w1 > W:
			break
	print(ans)
__starting_point()


from sys import stdin
input = stdin.readline
MAX = 510000
MOD = 10 ** 9 + 7

def MakeTable():
	(fac[0], fac[1]) = (1, 1)
	(finv[0], finv[1]) = (1, 1)
	inv[1] = 1
	for i in range(2, MAX):
		fac[i] = fac[i - 1] * i % MOD
		inv[i] = MOD - inv[MOD % i] * (MOD // i) % MOD
		finv[i] = finv[i - 1] * inv[i] % MOD

def COM(n, k):
	if n < k:
		return 0
	elif n < 0 or k < 0:
		return 0
	else:
		return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD
(H, W, A, B) = map(int, input().split())
fac = [0] * MAX
finv = [0] * MAX
inv = [0] * MAX
N = min(H - A, W - B)
(x, y) = (0, 0)
result = 0
MakeTable()
for _ in range(N):
	n1 = H - A - 1 + B + x - y
	n2 = A + W - 1 - B - x + y
	result += COM(n1, B + x) * COM(n2, A + y) % MOD
	x += 1
	y += 1
print(result % MOD)


(h, w, a, b) = map(int, input().split())
mod = 10 ** 9 + 7
n = h + w
f = [1 for _ in range(n)]
f_inv = [1 for _ in range(n)]
for i in range(1, n):
	f[i] = f[i - 1] * i % mod
	f_inv[i] = pow(f[i], mod - 2, mod)

def comb(n, k):
	return f[n] * f_inv[k] % mod * f_inv[n - k] % mod
ans = comb(h + w - 2, h - 1)
for i in range(b):
	ans -= comb(h - a + i - 1, i) * comb(a + w - i - 2, a - 1) % mod
	ans %= mod
print(ans)


mod = 10 ** 9 + 7
N = 10 ** 6
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1]
for i in range(2, N + 1):
	fact.append(fact[-1] * i % mod)
	inv.append(-inv[mod % i] * (mod // i) % mod)
	factinv.append(factinv[-1] * inv[-1] % mod)

def combi_mod(n, r, p):
	if r < 0 or n < r:
		return 0
	r = min(r, n - r)
	return fact[n] * factinv[r] * factinv[n - r] % p
(H, W, A, B) = list(map(int, input().split()))
if B < W / 2:
	not_ans = 0
	total = combi_mod(H - 1 + (W - 1), H - 1, mod)
	for i in range(B):
		sq1h = H - A
		sq1w = i + 1
		sq2h = A
		sq2w = W - i
		n = combi_mod(sq1h - 1 + (sq1w - 1), sq1h - 1, mod) * combi_mod(sq2h - 1 + (sq2w - 1), sq2h - 1, mod) % mod
		not_ans = (not_ans + n) % mod
	ans = (total - not_ans) % mod
	print(ans)
else:
	ans = 0
	for i in range(B, W):
		sq1h = H - A
		sq1w = i + 1
		sq2h = A
		sq2w = W - i
		n = combi_mod(sq1h - 1 + (sq1w - 1), sq1h - 1, mod) * combi_mod(sq2h - 1 + (sq2w - 1), sq2h - 1, mod)
		ans = (ans + n) % mod
	ans %= mod
	print(ans)


MOD = 10 ** 9 + 7
(h, w, a, b) = map(int, input().split())
n = h + w
fac = [1] * (n + 1)
fac_inv = [0] * (n + 1)
for i in range(n):
	fac[i + 1] = fac[i] * (i + 1) % MOD
fac_inv[-1] = pow(fac[-1], MOD - 2, MOD)
for i in range(n, 0, -1):
	fac_inv[i - 1] = fac_inv[i] * i % MOD

def comb(n, k):
	if k < 0 or k > n:
		return 0
	x = fac[n] * (fac_inv[k] * fac_inv[n - k]) % MOD % MOD
	return x
ans = 0
for i in range(w - b):
	ans += comb(h - a - 1 + b + i, b + i) * comb(a - 1 + (w - b - i - 1), a - 1) % MOD
	ans %= MOD
print(ans)


(H, W, A, B) = map(int, open(0).read().split())
MOD = 10 ** 9 + 7

def modcomb(m, n, mod):
	if n > m - n:
		n = m - n
	p = 1
	q = 1
	for i in range(n):
		p = p * (m - i) % mod
		q = q * (i + 1) % mod
	result = p * pow(q, mod - 2, mod) % mod
	return result
total = modcomb(H + W - 2, W - 1, MOD)
tmp = modcomb(A + W - 2, W - 1, MOD)
total -= tmp
for i in range(B - 1):
	a = H - A + i
	b = i + 1
	c = W - i - 1
	d = W + A - 2 - i
	tmp = tmp * a * c % MOD
	tmp = tmp * pow(b, -1, MOD) % MOD
	tmp = tmp * pow(d, -1, MOD) % MOD
	total = (total - tmp) % MOD
print(total)


def prepare(n, MOD):
	f = 1
	factorials = [1]
	for m in range(1, n + 1):
		f *= m
		f %= MOD
		factorials.append(f)
	inv = pow(f, MOD - 2, MOD)
	invs = [1] * (n + 1)
	invs[n] = inv
	for m in range(n, 1, -1):
		inv *= m
		inv %= MOD
		invs[m - 1] = inv
	return (factorials, invs)
(h, w, a, b) = list(map(int, input().split()))
MOD = 10 ** 9 + 7
(facts, invs) = prepare(h + w, MOD)
ans = 0
ib = invs[b - 1]
iwb = invs[w - b - 1]
for down in range(h - a):
	left_pattern = facts[b - 1 + down] * ib * invs[down] % MOD
	right_pattern = facts[h - 1 - down + w - b - 1] * invs[h - 1 - down] * iwb % MOD
	ans = (ans + left_pattern * right_pattern) % MOD
print(ans)


mod = 10 ** 9 + 7
fact = [1]
inv = [1]
for i in range(200000):
	fact.append(fact[i] * (i + 1) % mod)
	inv.append(pow(fact[i + 1], mod - 2, mod))

def ncr(n, r):
	if n < 0 or r < 0 or n - r < 0:
		return 0
	return fact[n] * inv[r] * inv[n - r] % mod
(h, w, a, b) = list(map(int, input().split()))
ans = ncr(h + w - 2, h - 1)
for i in range(min(a, b)):
	ans -= ncr(h - a + b - 1, h - a + i) * ncr(w - b + a - 1, w - b + i)
print(ans % mod)


(h, w, a, b) = list(map(int, input().split()))
fac = [0] * 200001
inv = [0] * 200001
fac[0] = 1
ans = 0
for i in range(1, 200001):
	fac[i] = fac[i - 1] * i % 1000000007
inv[200000] = pow(fac[200000], 1000000005, 1000000007)
for i in range(199999, 0, -1):
	inv[i] = inv[i + 1] * (i + 1) % 1000000007
	inv[0] = 1
for i in range(h - a):
	if i == 0:
		if h == 1:
			x = 1
		else:
			x = fac[w - b + h - 2 - i] * inv[w - 1 - b] * inv[h - 1 - i] % 1000000007
	else:
		x = fac[b - 1 + i] * inv[b - 1] * inv[i] % 1000000007 * (fac[w - b + h - 2 - i] * inv[w - b - 1] * inv[h - 1 - i] % 1000000007)
	ans = (ans + x) % 1000000007
print(ans)


class CombinationFermat:

	def __init__(self):
		MOD = 10 ** 9 + 7
		MAX = 2 * 10 ** 5
		self.fac = [0] * MAX
		self.finv = [0] * MAX
		self.inv = [0] * MAX
		self.fac[0] = self.fac[1] = 1
		self.finv[0] = self.finv[1] = 1
		self.inv[1] = 1
		for i in range(2, MAX):
			self.fac[i] = self.fac[i - 1] * i % MOD
			self.inv[i] = MOD - self.inv[MOD % i] * (MOD // i) % MOD
			self.finv[i] = self.finv[i - 1] * self.inv[i] % MOD

	def comb(self, n: int, r: int) -> int:
		MOD = 10 ** 9 + 7
		if n < r:
			return 0
		if n < 0 or r < 0:
			return 0
		return self.fac[n] * (self.finv[r] * self.finv[n - r] % MOD) % MOD
(H, W, A, B) = list(map(int, input().split()))
c = CombinationFermat()
ans = 0
MOD = 10 ** 9 + 7
for i in range(H - A):
	x = c.comb(B - 1 + i, i)
	a = H - 1 - i
	b = W - 1 - B
	x *= c.comb(a + b, a)
	x %= MOD
	ans += x
ans %= MOD
print(ans)


mod = 10 ** 9 + 7
(h, w, a, b) = map(int, input().split())
fact = [1] * (h + w + 1)
invf = [1] * (h + w + 1)
invn = [1] * (h + w + 1)
for i in range(2, h + w + 1):
	fact[i] = fact[i - 1] * i % mod
	invn[i] = -invn[mod % i] * (mod // i) % mod
	invf[i] = invf[i - 1] * invn[i] % mod
count = 0
for i in range(min(h - a, w - b)):
	count += fact[h + b - a - 1] * invf[h - a - i - 1] * invf[b + i] * fact[w + a - b - 1] * invf[a + i] * invf[w - b - i - 1]
	count %= mod
print(count)


def permutation(n, k, mod):
	s = 1
	for _ in range(k):
		s *= n
		s %= mod
		n -= 1
	return s

def factorial(n, mod):
	s = 1
	for i in range(1, n + 1):
		s *= i
		s %= mod
	return s
(h, w, a, b) = map(int, input().split())
mod = pow(10, 9) + 7
x = h - a + b - 1
y = w - b + a - 2
p = permutation(x, h - a - 1, mod) * permutation(y, a - 1, mod) % mod
ans = p
for _ in range(w - b - 1):
	x += 1
	p = p * x * (y - (a - 1)) * pow((x - (h - a - 1)) * y, mod - 2, mod) % mod
	y -= 1
	ans += p
	ans %= mod
ans = ans * pow(factorial(a - 1, mod), mod - 2, mod) * pow(factorial(h - a - 1, mod), mod - 2, mod) % mod
print(ans)


import sys
from functools import lru_cache
sys.setrecursionlimit(10 ** 9)

def mul(x, y, mod):
	x %= mod
	y %= mod
	return x * y % mod

def div(x, y, mod):
	x %= mod
	y %= mod
	return x * mod_pow(y, mod - 2, mod) % mod

@lru_cache(maxsize=None)
def mod_pow(a, p, mod):
	if p == 0:
		return 1
	if p % 2 == 0:
		root = mod_pow(a, p / 2, mod)
		return root * root % mod
	else:
		return a * mod_pow(a, p - 1, mod) % mod

def dnm(n, mod, factorials):
	denominators = [0] * (n + 1)
	denominators[n] = div(1, factorials, mod)
	for i in reversed(range(n)):
		denominators[i] = mul(denominators[i + 1], i + 1, mod)
	return denominators

def nmr(n, mod):
	factorials = [0] * (n + 1)
	factorials[0] = 1
	for i in range(n):
		factorials[i + 1] = (i + 1) * factorials[i] % mod
	return factorials

def cmb(a, b, mod, factorials, factorial_divs):
	if len(factorials) == 0:
		raise
	af = factorials[a]
	bf = factorial_divs[b]
	abf = factorial_divs[a - b]
	return mul(mul(af, bf, mod), abf, mod)
MOD = 10 ** 9 + 7
(H, W, A, B) = map(int, input().split())
ans = 0
n = nmr(H + W - 2, MOD)
d = dnm(H + W - 2, MOD, n[H + W - 2])
for i in range(H - A):
	x = cmb(B - 1 + i, B - 1, MOD, n, d)
	y = cmb(H + W - 3 - (B - 1 + i), W - B - 1, MOD, n, d)
	ans += x * y % MOD
	ans %= MOD
print(ans)


(h, w, a, b) = map(int, input().split())
mod = pow(10, 9) + 7

def cmb(n, r, mod):
	if r < 0 or r > n:
		return 0
	r = min(r, n - r)
	return g1[n] * g2[r] * g2[n - r] % mod
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
for i in range(2, 200000 + 1):
	g1.append(g1[-1] * i % mod)
	inverse.append(-inverse[mod % i] * (mod // i) % mod)
	g2.append(g2[-1] * inverse[-1] % mod)
ans = 0
for k in range(1, h - a + 1):
	tmp = cmb(k - 1 + b - 1, k - 1, mod)
	tmp *= cmb(h - k + w - b - 1, h - k, mod)
	ans += tmp
	ans %= mod
print(ans)


(h, w, a, b) = list(map(int, input().split()))
MOD = 1000000007

def modPow(a, x, p):
	res = 1
	while x > 0:
		if x % 2 != 0:
			res = res * a % p
		a = a * a % p
		x /= 2
	return res
fact = [None] * 220000
for i in range(1, 220000):
	fact[0] = 1
	fact[i] = i * fact[i - 1] % MOD

def ncr(n, r):
	den = fact[n - r] * fact[r] % MOD
	return fact[n] * pow(den, MOD - 2, MOD) % MOD

def number_of_paths(h, w):
	n = h + w - 2
	r = h - 1
	return ncr(n, r)
ans = 0
for i in range(b + 1, w + 1):
	ans += number_of_paths(h - a, i) * number_of_paths(a, w - i + 1)
print(int(ans % MOD))


(h, w, a, b) = map(int, input().split())
mx = max(h, w)
mod = 10 ** 9 + 7
fac = [1] * (h + w + 1)
for i in range(1, h + w + 1):
	fac[i] = fac[i - 1] * i % mod
rev = [1] * (mx + 1)
rev[-1] = pow(fac[mx], mod - 2, mod)
for i in range(mx - 1, -1, -1):
	rev[i] = rev[i + 1] * (i + 1) % mod
const = rev[h - a - 1] * rev[a - 1] % mod
ans = 0
for i in range(b, w):
	ans += fac[h - a + i - 1] * rev[i] * fac[a + w - 2 - i] * rev[w - i - 1] % mod
print(ans * const % mod)


from math import comb
(h, w, a, b) = list(map(int, input().split()))
s = 0
nC = b - 1
kC = 0
nD = w - b - 1 + h - 1
kD = h - 1
p = 1000000007
fac = [1]
ff = 1
for i in range(1, 200001):
	ff *= i
	ff %= p
	fac.append(ff)

def ncr(n, r, p):
	return fac[n] * pow(fac[r], p - 2, p) % p * pow(fac[n - r], p - 2, p) % p
for i in range(h - a):
	C = ncr(nC, kC, 1000000007)
	D = ncr(nD, kD, 1000000007)
	s = (s + C * D) % 1000000007
	nC += 1
	kC += 1
	kD -= 1
	nD -= 1
print(s)


MOD = 10 ** 9 + 7

def prepare(n):
	nonlocal MOD
	modFacts = [0] * (n + 1)
	modFacts[0] = 1
	for i in range(n):
		modFacts[i + 1] = modFacts[i] * (i + 1) % MOD
	invs = [1] * (n + 1)
	invs[n] = pow(modFacts[n], MOD - 2, MOD)
	for i in range(n, 1, -1):
		invs[i - 1] = invs[i] * i % MOD
	return (modFacts, invs)

def pathVar(sx, sy, gx, gy):
	x = gx - sx
	y = gy - sy
	rst = modFacts[x + y]
	rst *= invs[x] * invs[y]
	rst %= MOD
	return rst
(H, W, A, B) = list(map(int, input().split()))
(modFacts, invs) = prepare(H + W)
cnt = 0
while A > 0 and B > 0:
	x = H - A
	y = B - 1
	path1 = pathVar(0, 0, x, y)
	path2 = pathVar(x, y, H - 1, W - 1)
	cnt += path1 * path2
	cnt %= MOD
	A -= 1
	B -= 1
ans = pathVar(0, 0, H - 1, W - 1)
print((ans - cnt) % MOD)


MOD = 10 ** 9 + 7
fac = [1 for k in range(200010)]
inv = [1 for k in range(200010)]
finv = [1 for k in range(200010)]
for k in range(2, 200010):
	fac[k] = fac[k - 1] * k % MOD
	inv[k] = (MOD - inv[MOD % k] * (MOD // k)) % MOD
	finv[k] = finv[k - 1] * inv[k] % MOD

def nCr(n, r):
	return fac[n] * finv[r] * finv[n - r] % MOD
(H, W, A, B) = list(map(int, input().split()))
ans = 0
for k in range(W - B):
	ans += nCr(A + W - B - k - 2, A - 1) * nCr(B + k + 1 + H - A - 2, H - A - 1)
	ans %= MOD
print(ans)


import math
(h, w, a, b) = list(map(int, input().split()))
mod = pow(10, 9) + 7

def divmod(num, mod=10 ** 9 + 7):
	return pow(num, mod - 2, mod)

def comb(a, b):
	p = fact[a - b] * fact[b] % mod
	return fact[a] * divmod(p) % mod
fact = [1]
for i in range(1, h + w):
	fact.append(i * fact[i - 1] % mod)
ans = 0
for j in range(h - a):
	tmp = comb(b - 1 + j, j) * comb(w + h - b - 2 - j, w - b - 1) % mod
	ans += tmp
	ans = ans % mod
print(int(ans))


import math
p = 1000000007
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
for i in range(2, 2 * 10 ** 5 + 1):
	g1.append(g1[-1] * i % p)
	inverse.append(-inverse[p % i] * (p // i) % p)
	g2.append(g2[-1] * inverse[-1] % p)

def cmb2(n, r, mod):
	if r < 0 or r > n:
		return 0
	r = min(r, n - r)
	return g1[n] * g2[r] * g2[n - r] % mod

def chwp(h, w, p):
	if h == 1 or w == 1:
		return 1
	else:
		return cmb2(h + w - 2, h - 1, p)
(h, w, a, b) = map(int, input().split())
ans = 0
for i in range(1, h - a + 1):
	ans = (ans + chwp(i, b, p) * chwp(h - i + 1, w - b, p)) % p
print(ans)


class Combination:

	def __init__(self, N: int, P: int):
		self.N = N
		self.P = P
		self.fact = [1, 1]
		self.factinv = [1, 1]
		self.inv = [0, 1]
		for i in range(2, N + 1):
			self.fact.append(self.fact[-1] * i % P)
			self.inv.append(-self.inv[P % i] * (P // i) % P)
			self.factinv.append(self.factinv[-1] * self.inv[-1] % P)

	def getComb(self, n: int, k: int):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		return self.fact[n] * self.factinv[k] * self.factinv[n - k] % self.P

def main():
	(H, W, A, B) = map(int, input().split())
	MOD = 10 ** 9 + 7
	COMB = Combination(H + W, MOD)
	ans = 0
	for i in range(1, H - A + 1):
		tmp = COMB.getComb(i - 1 + (B - 1), i - 1)
		tmp *= COMB.getComb(H - i + (W - B - 1), H - i)
		ans = (ans + tmp) % MOD
	print(ans)

def __starting_point():
	main()
__starting_point()