import sys input = sys.stdin.readline from collections import * MAX = 10**6+10 MOD = 998244353 fact = [0]*MAX #fact[i]: i! inv = [0]*MAX #inv[i]: iの逆元 finv = [0]*MAX #finv[i]: i!の逆元 fact[0] = 1 fact[1] = 1 finv[0] = 1 finv[1] = 1 inv[1] = 1 for i in range(2, MAX): fact[i] = fact[i-1]*i%MOD inv[i] = MOD-inv[MOD%i]*(MOD//i)%MOD finv[i] = finv[i-1]*inv[i]%MOD N, M = map(int, input().split()) A = [M//N for _ in range(N)] for i in range(M%N): A[i] += 1 ans = fact[M] for Ai in A: ans *= finv[Ai] ans %= MOD print(ans)