#include using namespace std; using ll = long long; ll const m = 998244353; ll mpow(ll a, ll n) { ll ret = 1; while (n) { if (n & 1) { ret *= a; ret %= m; } a = (a * a) % m; n >>= 1; } return ret; } ll fct(ll a) { return (a ? (a * fct(a - 1)) % m : 1); } int main () { ll N, M; cin >> N >> M; ll ans = fct(M); ll q = M / N, r = M % N; ans *= mpow(fct(q + 1), m - 1 - r); ans %= m; ans *= mpow(fct(q), m - 1 - (N - r)); ans %= m; cout << ans << endl; }