import sys input = sys.stdin.readline class ModInt: mod = 998244353 def __init__(self, x): self.x = x % ModInt.mod @classmethod def set_mod(cls, mod: int) -> None: ModInt.mod = mod def __str__(self): return str(self.x) __repr__ = __str__ def __add__(self, other): return (ModInt(self.x + other.x) if isinstance(other, ModInt) else ModInt(self.x + other)) def __sub__(self, other): return (ModInt(self.x - other.x) if isinstance(other, ModInt) else ModInt(self.x - other)) def __mul__(self, other): return (ModInt(self.x * other.x) if isinstance(other, ModInt) else ModInt(self.x * other)) def __truediv__(self, other): return (ModInt(self.x * pow(other.x, ModInt.mod - 2, ModInt.mod)) if isinstance(other, ModInt) else ModInt(self.x * pow(other, ModInt.mod - 2, ModInt.mod))) def __pow__(self, other): return ModInt(pow(self.x, other.x, ModInt.mod)) if isinstance(other, ModInt) else ModInt(pow(self.x, other, ModInt.mod)) __radd__ = __add__ def __rsub__(self, other): return (ModInt(other.x - self.x) if isinstance(other, ModInt) else ModInt(other - self.x)) __rmul__ = __mul__ def __rtruediv__(self, other): return (ModInt(other.x * pow(self.x, ModInt.mod - 2, ModInt.mod)) if isinstance(other, ModInt) else ModInt(other * pow(self.x, ModInt.mod - 2, ModInt.mod))) def __rpow__(self, other): return ModInt(pow(other.x, self.x, ModInt.mod)) if isinstance(other, ModInt) else ModInt(pow(other, self.x, ModInt.mod)) def __iadd__(self, other): self = self + other return self def __isub__(self, other): self = self - other return self def __imul__(self, other): self = self * other return self def __itruediv__(self, other): self = self / other return self @classmethod def nCk(cls, n, k): if(isinstance(n, ModInt)): n = n.x if(isinstance(k, ModInt)): k = k.x r = min(n - k, k) ret = ModInt(1) for i in range(n - r + 1, n + 1): ret *= i d = ModInt(1) for i in range(2, r + 1): d *= i ret /= d return ret """ Main Code """ n, m = map(int, input().split()) a = [0] * n t = m i = 0 while(t > 0): a[i % n] += 1 t -= 1 i += 1 # print(a) ans = ModInt(1) for i in range(2, m + 1): ans *= i for k in a: ans /= k print(ans)