package no2xxx; import java.io.PrintWriter; import java.util.Arrays; import java.util.Scanner; public class No2582_2 { static Scanner in; static PrintWriter out; static String INPUT = ""; static void solve() { int n = ni(), K = ni(); final int mod = 998244353; int[][] fif = enumFIF(n+K+2, mod); // 1/1 + 1/2*x^1 + 1/6*x^2 + ... // (e^x-1)/x // (e^x-1)^n/x^n // e^(xi) のn+Kがわかればよい // i^t/t! // i^(n+K)/(n+K)! long ans = 0; for(int i = 0;i <= n;i++){ long c = C(n, i, mod, fif) * pm1(n-i, mod) % mod; ans += c * pow(i, n+K, mod); ans %= mod; } ans %= mod; ans = ans * fif[1][n+K] % mod; out.println(ans * fif[0][K] % mod * pow(invl(n, mod), K, mod) % mod); } static long pm1(long x, int mod) { return x % 2 == 0 ? 1 : mod-1; } public static long invl(long a, long mod) { long b = mod; long p = 1, q = 0; while (b > 0) { long c = a / b; long d; d = a; a = b; b = d % b; d = p; p = q; q = d - c * q; } return p < 0 ? p + mod : p; } public static long C(int n, int r, int mod, int[][] fif) { if (n < 0 || r < 0 || r > n) return 0; return (long) fif[0][n] * fif[1][r] % mod * fif[1][n - r] % mod; } public static long pow(long a, long n, long mod) { // a %= mod; long ret = 1; int x = 63 - Long.numberOfLeadingZeros(n); for (; x >= 0; x--) { ret = ret * ret % mod; if (n << 63 - x < 0) ret = ret * a % mod; } return ret; } public static int[][] enumFIF(int n, int mod) { int[] f = new int[n + 1]; int[] invf = new int[n + 1]; f[0] = 1; for (int i = 1; i <= n; i++) { f[i] = (int) ((long) f[i - 1] * i % mod); } long a = f[n]; long b = mod; long p = 1, q = 0; while (b > 0) { long c = a / b; long d; d = a; a = b; b = d % b; d = p; p = q; q = d - c * q; } invf[n] = (int) (p < 0 ? p + mod : p); for (int i = n - 1; i >= 0; i--) { invf[i] = (int) ((long) invf[i + 1] * (i + 1) % mod); } return new int[][]{f, invf}; } public static void main(String[] args) throws Exception { in = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(INPUT); out = new PrintWriter(System.out); solve(); out.flush(); } static int ni() { return Integer.parseInt(in.next()); } static long nl() { return Long.parseLong(in.next()); } static double nd() { return Double.parseDouble(in.next()); } static void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); } }