def cominit(n, mod): global fac, finv fac = [1] * n finv = [1] * n for i in range(2, n): fac[i] = (fac[i-1] * i) % mod finv[i] = (finv[i-1] * pow(i, mod-2, mod)) % mod def comb(n, k): global mod if n < k: return 0 if n < 0 or k < 0: return 0 return (fac[n] * finv[n-k] % mod) * finv[k] % mod mod = 998244353 cominit(400000, mod) n, m, a, b = map(int, input().split()) ans = 0 for i in range(m): if a * (n - 1) + i > b: break ans += (m - (a * (n - 1) + i)) * fac[n] * comb(n-1+i-1, i) ans %= mod print(ans)