MOD = 998244353 fact = [1] * 220000 for i in range(1, 220000): fact[i] = fact[i-1] * i % MOD N, K = map(int, input().split()) if K == 2: exit(-1) print(fact[N-K] * K % MOD)