N, M, A, B = map(int, input().split()) MOD = 998244353 MAX = 3 * 10 ** 5 + 10 # https://tjkendev.github.io/procon-library/python/math/factorial.html から拝借しています。 fact = [1] * (MAX + 1) rfact = [1] * (MAX + 1) r = 1 for i in range(1, MAX + 1): fact[i] = r = r * i % MOD rfact[MAX] = r = pow(fact[MAX], MOD - 2, MOD) for i in range(MAX, 0, -1): rfact[i - 1] = r = r * i % MOD def comb(n, k, error=0): if not 0 <= k <= n: return error return fact[n] * rfact[k] * rfact[n - k] % MOD ans = 0 for s1 in range(1, M + 1): sn = min(s1 + B, M) d = sn - s1 - A * (N - 1) if d < 0: continue ans += comb(d + N - 1, N - 1) ans %= MOD ans *= fact[N] ans %= MOD print(ans)