#include <bits/stdc++.h>

#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)

using namespace std;

typedef long long ll;

const int mod = 998244353;

inline int inc(int a, int b) { return a += b - mod, a += a >> 31 & mod; }
inline int dec(int a, int b) { return a -= b, a += a >> 31 & mod; }
inline int mul(int a, int b) { return ll(a) * b % mod; }

inline int s_x(int p, int x) { return p & 1 ? x = -x, x += x >> 31 & mod : x; }

int qpow(int a, int b) {
	if (a == 0) return 0;
	b += b >> 31 & (mod - 1);
	int c = 1;
	for (; b; b >>= 1, a = mul(a, a)) {
		if (b & 1) c = mul(a, c);
	}
	return c;
}

const int maxn = (1 << 18) + 5;

int fac[maxn], fic[maxn], S_k[maxn];

int f[maxn], g[maxn], L, w;

void dft(int a[], int t) {
	L = 1 << w;
	for (int i = 1, r = 0; i < L; i++) {
		rep(j, 0, w - 1) {
			r ^= 1 << (w - 1 - j);
			if (i >> j & 1) break;
		}
		if (i < r) swap(a[i], a[r]);
	}
	for (int k = 1; k < L; k <<= 1) {
		int x = qpow(3, (mod - 1) / (k << 1) * t);
		for (int i = 0; i < L; i += k << 1) {
			int y = 1;
			rep(j, i, i + k - 1) {
				int q = mul(a[j + k], y);
				a[j + k] = dec(a[j], q);
				a[j] = inc(a[j], q);
				y = mul(x, y);
			}
		}
	}
	if (t == -1) {
		int i_L = qpow(L, mod - 2);
		rep(i, 0, L - 1) {
			a[i] = mul(a[i], i_L);
		}
	}
}

void init(int n) {
	fac[0] = 1;
	rep(i, 1, n) fac[i] = mul(fac[i - 1], i);
	fic[n] = qpow(fac[n], mod - 2);
	per(i, n, 1) fic[i - 1] = mul(fic[i], i);
	rep(i, 0, n) {
		f[i] = s_x(i, fic[i]);
	}
	rep(i, 0, n) {
		g[i] = mul(qpow(i, n), fic[i]);
	}
	for (; 1 << w <= n * 2; w++);
	dft(f, 1);
	dft(g, 1);
	rep(i, 0, L - 1) {
		f[i] = mul(f[i], g[i]);
	}
	dft(f, -1);
	rep(i, 0, n) {
		S_k[i] = f[i];
	}
	// rep(i, 0, n) {
	// 	printf("%d%c", S_k[i], " \n"[i == n]);
	// }
}

int n, k, a[maxn];

int main() {
	scanf("%d %d", &n, &k);
	init(k);
	int x = min(n, k);
	a[x] = qpow(inc(n, 1), n - x);
	per(i, x - 1, 1) {
		a[i] = mul(inc(n, 1), a[i + 1]);
	}
	int c = 1, ans = 0;
	rep(i, 1, k) {
		c = mul(c, n + 1 - i);
		ans = inc(ans, mul(mul(S_k[i], a[i]), c));
	}
	printf("%d\n", ans);
	return 0;
}