Gaius Julius Caesar, a famous general, loved to line up his soldiers. Overall the army had *n*<sub class="lower-index">1</sub> footmen and *n*<sub class="lower-index">2</sub> horsemen. Caesar thought that an arrangement is not beautiful if somewhere in the line there are strictly more that *k*<sub class="lower-index">1</sub> footmen standing successively one after another, or there are strictly more than *k*<sub class="lower-index">2</sub> horsemen standing successively one after another. Find the number of beautiful arrangements of the soldiers. 

Note that all *n*<sub class="lower-index">1</sub> + *n*<sub class="lower-index">2</sub> warriors should be present at each arrangement. All footmen are considered indistinguishable among themselves. Similarly, all horsemen are considered indistinguishable among themselves.
The only line contains four space-separated integers *n*<sub class="lower-index">1</sub>, *n*<sub class="lower-index">2</sub>, *k*<sub class="lower-index">1</sub>, *k*<sub class="lower-index">2</sub> (1 ≤ *n*<sub class="lower-index">1</sub>, *n*<sub class="lower-index">2</sub> ≤ 100, 1 ≤ *k*<sub class="lower-index">1</sub>, *k*<sub class="lower-index">2</sub> ≤ 10) which represent how many footmen and horsemen there are and the largest acceptable number of footmen and horsemen standing in succession, correspondingly.
2 1 1 10
1
2 3 1 2
5
2 4 1 1
0
10 10 5 7
173349
12 15 7 2
171106
20 8 4 8
162585
15 8 2 6
156
100 100 10 10
950492
20 15 10 9
26057516
18 4 3 1
0
19 12 5 7
77429711
20 4 9 4
5631
24 30 5 1
0
56 37 4 1
84920121
28 65 5 9
83961789
67 26 6 1
89553795
57 30 5 9
17123805
56 40 3 2
69253068
34 57 1 1
0
78 21 10 1
96098560
46 46 2 5
84310381
34 55 2 9
13600171
46 51 4 5
25703220
64 23 3 6
7467801
67 24 6 3
3793964
78 14 3 9
0
56 34 8 10
92618496
57 25 10 4
4458038
1 2 1 1
1
1 1 1 1
2
2 1 1 1
1
99 100 10 10
65210983
100 99 10 10
65210983
100 100 9 10
67740290
1 2 10 10
3
1 3 10 10
4
2 2 10 10
6
2 2 1 2
3
# -*- coding : utf-8 -*-
# @Time: 2023/10/10 20:07
# @Author: yefei.wang
# @File: 118D.py
import sys
from collections import Counter

# sys.stdin = open('./../input.txt', 'r')
I = lambda: int(input())
MI = lambda: map(int, input().split())
LI = lambda: list(map(int, input().split()))
mod = 10 ** 9 + 7

n1, n2, k1, k2 = MI()
n = n1 + n2
k = k1 + k2
# (x, y, 0 or 1, c)
mod = 10 ** 8
dp = Counter()

dp[(0, 0, 0, 0)] = 1
# dp[(0, 0, 1, 0)] = 1

for k in range(1, n1 + n2 + 1):
    for j in range(max(k, n2 + 1)):
        i = k - j
        # footman + footman
        for x in range(k1):
            dp[(i, j, 0, x + 1)] += dp[(i - 1, j, 0, x)]
            dp[(i, j, 0, x + 1)] %= mod
        # footman + horseman
        for x in range(k1 + 1):
            dp[(i, j, 1, 1)] += dp[(i, j - 1, 0, x)]
            dp[(i, j, 1, 1)] %= mod

        # horseman + horseman
        for x in range(0, k2):
            dp[(i, j, 1, x + 1)] += dp[(i, j - 1, 1, x)]
            dp[(i, j, 1, x + 1)] %= mod
        # horseman + footman
        for x in range(0, k2 + 1):
            dp[(i, j, 0, 1)] += dp[(i - 1, j, 1, x)]
            dp[(i, j, 0, 1)] %= mod

ans = 0
for k, v in dp.items():
    if k[0] == n1 and k[1] == n2:
        ans += dp[k]
print(ans)
