#include <vector>
#include <cassert>
#include <iostream>

using namespace std;

typedef long long ll;

template <int MOD>
struct mint {
	static const int mod = MOD;
	int x;
	mint(): x(0) {}
	mint(ll v) {
		x = v % MOD;
		if(x < 0) x += MOD;
	}

	friend mint pow(mint a, ll p) {
		mint ans = 1;
		for(; p; p >>= 1, a *= a) if(p&1) ans *= a;
		return ans;
	}
	friend mint inv(mint a) { return pow(a, mod-2); }

	explicit operator int() const { return x; }
	friend bool operator==(const mint &a, const mint &b) { return a.x == b.x; }
	friend bool operator!=(const mint &a, const mint &b) { return a.x != b.x; }
	friend ostream& operator<<(ostream &stream, const mint &v) { return stream << v.x; }
	friend istream& operator>>(istream &stream, mint &v) { return stream >> v.x; }
	mint& operator+=(const mint &b) { if((x += b.x) >= mod) x -= mod; return *this; }
	mint& operator-=(const mint &b) { if((x -= b.x) < 0) x += mod; return *this; }
	mint& operator*=(const mint &b) { x = (1LL * x * b.x) % mod; return *this; }
	mint& operator/=(const mint &b) { return (*this) *= inv(b); }
	mint& operator++() { return (*this) += 1; }
	mint& operator--() { return (*this) -= 1; }
	mint operator-() { return -x; }
	friend mint operator+(mint a, const mint &b) { return a += b; }
	friend mint operator-(mint a, const mint &b) { return a -= b; }
	friend mint operator*(mint a, const mint &b) { return a *= b; }
	friend mint operator/(mint a, const mint &b) { return a /= b; }

	// use as follow after defining mi as mint<MOD>
	// template<> mi mi::g = mi::computeG();
	static mint g;
	static mint computeG() {
		vector<int> ps;
		int m2 = mod-1;
		for(int p = 2; p <= m2; ++p) if(m2 % p == 0) {
			ps.push_back(p);
			while(m2 % p == 0) m2 /= p;
		}
		mint G = 2;
		m2 = mod-1;
		while(true) {
			bool good = true;
			for(int p : ps) if(pow(G, m2/p) == 1) {
				good = false;
				break;
			}
			if(good) return G;
			else ++G;
		}
	}
};

template <typename T>
void NTT(vector<T> &P, bool invert=false) {
	int n = P.size();
	assert((T::mod-1) % n == 0);
	T g = pow(T::g, (T::mod-1) / n);
	if(invert) g = inv(g);

	// swap indices with their mirror binary
	for(int i = 1, j = 0; i < n; ++i) {
		int bit = n >> 1;
		for(; j&bit; bit >>= 1) j ^= bit;
		j ^= bit;
		if(i < j) swap(P[i], P[j]);
	}

	// Transform
	for(int len = 2; len <= n; len <<= 1) {
		int half = len >> 1;
		T wl = g;
		for(int i = len; i < n; i <<= 1) wl *= wl;
		for(int i = 0; i < n; i += len) {
			T w = 1;
			for(int j = 0; j < half; ++j) {
				T even = P[i+j];
				T odd = P[i+half+j] * w;
				P[i+j] = even + odd;
				P[i+half+j] = even - odd;
				w *= wl;
			}
		}
	}

	// Divide by n if inverse
	if(invert) {
		T inv_n = inv(T(n));
		for(T &x : P) x *= inv_n;
	}
}

template <typename T>
void NTT_mult_inplace(vector<T> &P, vector<T> &Q) {
	int size = 1, n = P.size() + Q.size() - 1;
	while(size < n) size <<= 1;
	P.resize(size, 0);
	Q.resize(size, 0);
	NTT<T>(P);
	NTT<T>(Q);
	for(int i = 0; i < size; ++i) P[i] *= Q[i];
	NTT<T>(P, true);
	P.resize(n);
}
const int MOD = 998244353;
typedef mint<MOD> mi;
template<> mi mi::g = mi::computeG();

int main() {
	int n, k;
	cin >> n >> k;

	vector<mi> P(k+1), Q(k+1);
	mi ifact = 1;
	for(int i = 0; i <= k; ++i) {
		P[i] = i&1 ? -ifact : ifact;
		Q[i] = pow(mi(i), k) * ifact;
		ifact /= (i+1);
	}
	NTT_mult_inplace<mi>(P, Q);

	mi term = pow(mi(n+1), n);
	mi inv_np1 = inv(mi(n+1));
	mi ans = 0;
	for(int i = 1; i <= k; ++i) {
		term *= inv_np1 * (n-i+1);
		ans += term * P[i];
	}
	cout << ans << endl;

	return 0;
}