MOD = 998244353 n, m = map(int, input().split()) l = max(n, m) fact = [1 for _ in range(l + 1)] inv = [1 for _ in range(l + 1)] ifact = [1 for _ in range(l + 1)] for x in range(2, l + 1): fact[x] = (fact[x - 1] * x) % MOD inv[x] = (- (MOD // x) * inv[MOD % x]) % MOD ifact[x] = (ifact[x - 1] * inv[x]) % MOD a = [m // n for i in range(n)] for i in range(m % n): a[i] += 1 ans = 1 cur = m for i in range(n): ans = (ans * fact[cur] * ifact[cur - a[i]] * ifact[a[i]]) % MOD cur -= a[i] print(ans)