def nPr(n, r, mod): if ( r<0 or r>n ): return 0 return g1[n] * g2[n-r] % mod def nCr(n, r, mod): if ( r<0 or r>n ): return 0 r = min(r, n-r) return (g1[n] * g2[r] % mod) * g2[n-r] % mod MOD = 998244353 N, P = map(int, input().split()) g1 = [1, 1] # 元テーブル g2 = [1, 1] #逆元テーブル inverse = [0, 1] #逆元テーブル計算用テーブル fact = [1, 1] fact_inv = [1, 1] for i in range( 2, N + 1 ): g1.append( ( g1[-1] * i ) % MOD ) inverse.append( ( -inverse[MOD % i] * (MOD//i) ) % MOD ) g2.append( (g2[-1] * inverse[-1]) % MOD ) fact.append( (fact[-1] * i) % MOD ) fact_inv.append(fact_inv[-1] * inverse[-1] % MOD) all = fact[N] ng = 1 for i in range(1, N+1): if P*i>N: break tmp = 1 j = 0 while j