#include <bits/stdc++.h>

#define mp std::make_pair
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define gc getchar
#define pc putchar

typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef std::pair <int, int> pii;
typedef std::pair <ll, ll> pll;

const int mod = 998244353;
const int max_N = 102401;

int n, K;

ll fact[max_N], finv[max_N], invn;
int fact_size = -1;

int read_int() {
	char c = gc(); int ans = 0; bool neg = false;
	while (!isdigit(c)) neg |= (c == '-'), c = gc();
	while (isdigit(c)) ans = 10 * ans + c - '0', c = gc();
	return neg ? -ans : ans;
}

void write_int(int x) {
	if (x < 0) pc('-'), x = -x;
	if (x > 9) write_int(x / 10);
	pc(x % 10 + '0');
}

int min(int x, int y) {return x < y ? x : y;}
int max(int x, int y) {return x > y ? x : y;}
void _min(int &x, int y) {if (x > y) x = y;}
void _max(int &x, int y) {if (x < y) x = y;}

int plus(int x, int y) {return (x += y) >= mod ? x - mod : x;}
int minus(int x, int y) {return (x -= y) < 0 ? x + mod : x;}
int mul(int x, int y) {return (ll)x * y % mod;}
int fma(int x, int y, int z) {return (x + (ll)y * z) % mod;}
int fms(int x, int y, int z) {return (x + (ll)(mod - y) * z) % mod;}
int neg(int x) {return x == 0 ? 0 : mod - x;}
void _plus(int &x, int y) {if ((x += y) >= mod) x -= mod;}
void _minus(int &x, int y) {if ((x -= y) < 0) x += mod;}
void _mul(int &x, int y) {x = (ll)x * y % mod;}
void _fma(int &x, int y, int z) {x = (x + (ll)y * z) % mod;}
void _fms(int &x, int y, int z) {x = (x + (ll)(mod - y) * z) % mod;}
void _neg(int &x) {if (x) x = mod - x;}

ll sign(int x) {return x & 1 ? mod - 1 : 1;}
ll binom(int x, int y) {return x < y || y < 0 ? 0 : fact[x] * finv[y] % mod * finv[x - y] % mod;}

ll inv(int x) {
	if (x <= fact_size) return fact[x - 1] * finv[x] % mod;
	return x == 1 ? 1 : (mod - mod / x) * inv(mod % x) % mod;
}

ll power(ll x, int y, ll ans = 1) {
	for (; y; y >>= 1, x = x * x % mod)
		if (y & 1) ans = ans * x % mod;
	return ans;
}

void init_fact(int n) {
	if (n <= fact_size) return;
	if (fact_size == -1) fact[0] = finv[0] = 1, fact_size = 0;
	for (int i = fact_size + 1; i <= n; i++) fact[i] = fact[i - 1] * i % mod;
	finv[n] = inv(fact[n]);
	for (int i = n; i > fact_size + 1; i--) finv[i - 1] = finv[i] * i % mod;
	fact_size = n;
}

typedef std::vector <int> poly;

namespace poly_base {
	const int g = 3, max_L = 18, max_len = 1 << max_L;
	int W[max_len + 7], rev[max_len + 7];
}

void prepare() {
	using namespace poly_base;
	for (int i = 1; i < max_len; i++)
		rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << max_L - 1);
	ll wn = power(g, (mod - 1) / max_len);
	for (int i = max_len / 2, p = 1; i < max_len; i++, p = p * wn % mod) W[i] = p;
	for (int i = max_len / 2 - 1; i; i--) W[i] = W[i << 1];
}

void NTT(poly &A, int L, bool flag) {
	using namespace poly_base; static ull F[max_len + 7], tmp;
	for (int i = 0, o = max_L - L; i < A.size(); i++) F[rev[i] >> o] = A[i];
	for (int l = 1; l < A.size(); l <<= 1) {
		for (int i = 0; i < A.size(); i += 2 * l) {
			ull *p1 = F + i, *p2 = p1 + l;
			for (int j = 0; j < l; j++)
				tmp = *p2 * W[j + l] % mod, *p2 = *p1 + mod - tmp, *p1 += tmp, p1++, p2++;
		}
		if (l == 32768) for (int i = 0; i < A.size(); i++) F[i] %= mod;
	}
	if (flag) {
		A[0] = F[0] * (tmp = inv(A.size())) % mod;
		for (int i = 1; i < A.size(); i++) A[i] = F[A.size() - i] * tmp % mod;
	}
	else for (int i = 0; i < A.size(); i++) A[i] = F[i] % mod;
}

poly &operator *= (poly &A, poly B) {
	int deg = A.size() + B.size() - 1, L = 0;
	while ((1 << L) < deg) L++;
	A.resize(1 << L), B.resize(1 << L);
	NTT(A, L, false), NTT(B, L, false);
	for (int i = 0; i < A.size(); i++) A[i] = (ll)A[i] * B[i] % mod;
	return NTT(A, L, true), A.resize(deg), A;
}
poly operator * (poly A, poly B) {return A *= B;}

poly get_S2(int n) {
	poly A(n + 1), B(n + 1);
	for (int i = 0; i <= n; i++) A[i] = sign(i) * finv[i] % mod;
	for (int i = 0; i <= n; i++) B[i] = power(i, n) * finv[i] % mod;
	return A *= B, A.resize(n + 1), A;
}

int main() {
	n = read_int(), K = read_int();
	init_fact(K); prepare(); invn = inv(n % mod);
	poly S2 = get_S2(K);

	int ans = 0;
	for (int i = 0, j = 1; i <= min(n, K); i++)
		ans = (ans + (ll)S2[i] * j % mod * power(invn, i) % mod * power(invn + 1, n - i)) % mod, _mul(j, n - i);
	return write_int(power(n, n, ans)), 0;
}
