mod = 998244353 num = 1000001 fact = [0]*num inv = [0]*num fact_inv = [0]*num def comb_init(): fact[0] = fact[1] = 1 fact_inv[0] = fact_inv[1] = 1 inv[1] = 1 for i in range(2, num): fact[i] = fact[i-1] * i % mod inv[i] = mod - inv[mod%i] * (mod // i) % mod fact_inv[i] = fact_inv[i-1] * inv[i] % mod comb_init() # def comb(n, m): # if m > n - m: # return comb(n, n - m) # return fact[n] * fact_inv[m] * fact_inv[n-m] % mod n, m = map(int, input().split(" ")) avg = m // n res = m % n ans = fact[m] for i in range(n - res): ans *= fact_inv[avg] ans %= mod for i in range(n-res, n): ans *= fact_inv[avg+1] ans %= mod print(ans)