#include using namespace std; using ll = long long; using pll = pair; #define drep(i, cc, n) for (ll i = (cc); i <= (n); ++i) #define rep(i, n) drep(i, 0, n - 1) #define all(a) (a).begin(), (a).end() #define pb push_back #define fi first #define se second const ll MOD = 1000000007; const ll MOD2 = 998244353; const ll INF = 1LL << 60; const ll N_MAX = 2e5; ll pow_mod(ll x, ll n, ll mod){ ll ret = 1; while(n > 0){ if(n & 1) ret = (ret*x)%mod; x = x*x%mod; n >>=1; } return ret; } int main(){ ll n, k; cin >> n >> k; vector inv(n+1, 0); for(ll i=1; i<=n; i++) inv[i] = pow_mod(i, MOD2-2, MOD2); vector> dp(k+1, vector(n+1, 0)); dp[0][0] = 1; for(ll i=1; i<=k; i++){ ll sum = (dp[i-1][i-1]*inv[n-(i-1)])%MOD2; for(ll j=i; j<=n; j++){ dp[i][j] = sum; sum += (dp[i-1][j]*inv[n-j])%MOD2; sum %= MOD2; } } ll P = 0, Q = 0; for(ll i=0; i<=k; i++){ P += dp[i][n]; P %= MOD2; Q += dp[i][n]; Q %= MOD2; } for(ll j=0; j<=n-1; j++){ Q += dp[k][j]; Q %= MOD2; } ll inv_Q = pow_mod(Q, MOD2-2, MOD2); cout << (P*inv_Q)%MOD2 << endl; }