def horse_controlled(x, y, hx, hy):
horse_moves = [(2, 1), (1, 2), (-1, 2), (-2, 1), (-2, -1), (-1, -2), (1, -2), (2, -1)]
controlled_points = [(hx, hy)] + [(hx + dx, hy + dy) for dx, dy in horse_moves]
return (x, y) in controlled_points
def count_paths(n, m, hx, hy):
dp = [[0 for _ in range(m + 1)] for _ in range(n + 1)]
dp[0][0] = 1
for x in range(n + 1):
for y in range(m + 1):
if x == 0 and y == 0:
continue
if horse_controlled(x, y, hx, hy):
dp[x][y] = 0
else:
dp[x][y] = (dp[x - 1][y] if x > 0 else 0) + (dp[x][y - 1] if y > 0 else 0)
return dp[n][m]
n, m, hx, hy = map(int, input().split())
print(count_paths(n, m, hx, hy))