n, m = map(int, input().split()) mod = 998244353 k = max(n, m) fact = [1] * (k + 1) inv = [1] * (k + 1) finv = [1] * (k + 1) for i in range(2, k + 1): fact[i] = fact[i - 1] * i % mod inv[i] = mod - inv[mod % i] * (mod // i) % mod finv[i] = finv[i - 1] * inv[i] % mod def comb(x, y): return fact[x] * finv[y] % mod * finv[x - y] % mod A = [m // n for _ in range(n)] for i in range(m % n): A[i] += 1 ans = 1 curr = m for i in range(n): ans *= comb(curr, A[i]) ans %= mod curr -= A[i] print(ans)