#include<cstdio>
#include<vector>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
using namespace std;

// #define NDEBUG
#include<cassert>

#define rep(i, l, r) for(int i=(l), i##_end_=(r); i<=i##_end_; ++i)
#define drep(i, l, r) for(int i=(l), i##_end_=(r); i>=i##_end_; --i)
#define fi first
#define se second
#define mp(a, b) make_pair(a, b)
#define Endl putchar('\n')
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
template<class T>inline T fab(T x){ return x<0? -x: x; }
template<class T>inline T readin(T x){
    x=0; int f=0; char c;
    while((c=getchar())<'0' || '9'<c) if(c=='-') f=1;
    for(x=(c^48); '0'<=(c=getchar()) && c<='9'; x=(x<<1)+(x<<3)+(c^48));
    return f? -x: x;
}
template<class T>inline void writc(T x, char s='\n'){
    static int fwri_sta[1005], fwri_ed=0;
    if(x<0) putchar('-'), x=-x;
    do fwri_sta[++fwri_ed]=x%10, x/=10; while(x);
    while(putchar(fwri_sta[fwri_ed--]^48), fwri_ed);
    putchar(s);
}

const int mod=998244353;
const int primitive_root=3;
const int inverse_primitive_root=332748118;
const int maxk=1e5;

inline int qkpow(int a, int n){
    int ret=1;
    for(; n>0; n>>=1, a=1ll*a*a%mod)
        if(n&1) ret=1ll*ret*a%mod;
    return ret;
}

namespace poly{
    int G[2][55], n, invn;
    vector<int>rev;
    inline void initial(){
        rep(j, 1, 50){
            G[0][j]=qkpow(primitive_root, (mod-1)/(1<<j));
            G[1][j]=qkpow(inverse_primitive_root, (mod-1)/(1<<j));
        }
    }
    inline void prepare(int N){
        for(n=1; n<N; n<<=1);
        invn=qkpow(n, mod-2);
        rev.resize(n);
        rep(i, 0, n-1) rev[i]=(rev[i>>1]>>1)|((i&1)? (n>>1): 0);
    }
    inline void ntt(vector<int>&f, int opt){
        f.resize(n);
        rep(i, 0, n-1) if(i<rev[i])
            swap(f[i], f[rev[i]]);
        for(int p=2, cnt=1; p<=n; p<<=1, ++cnt){
            int len=p>>1, w=G[opt][cnt];
            for(int k=0; k<n; k+=p){
                int buf=1, tmp;
                for(int i=k; i<k+len; ++i, buf=1ll*buf*w%mod){
                    tmp=1ll*f[i+len]*buf%mod;
                    f[i+len]=(f[i]+mod-tmp)%mod;
                    f[i]=(f[i]+tmp)%mod;
                }
            }
        }
        if(opt==1){
            rep(i, 0, n-1)
                f[i]=1ll*f[i]*invn%mod;
        }
    }
}

int fac[maxk+5], finv[maxk+5], C[maxk+5];

inline void precalc(){
    fac[0]=1;
    rep(i, 1, maxk) fac[i]=1ll*fac[i-1]*i%mod;
    finv[maxk]=qkpow(fac[maxk], mod-2);
    drep(i, maxk-1, 1) finv[i]=1ll*finv[i+1]*(i+1)%mod;
    finv[0]=1;
}

int n, k;

vector<int>f, u;

signed main(){
    poly::initial(); // pay attention!
    precalc();
    n=readin(1), k=readin(1);
    C[0]=1;
    rep(i, 1, k) C[i]=1ll*C[i-1]*(n-i+1)%mod*qkpow(i, mod-2)%mod;
    f.resize(k+1); u.resize(k+1);
    rep(i, 0, k){
        f[i]=(i&1)? (mod-finv[i]): finv[i];
        u[i]=1ll*qkpow(i, k)*finv[i]%mod;
    }
    poly::prepare(k*2+5);
    poly::ntt(f, 0); poly::ntt(u, 0);
    rep(i, 0, poly::n-1) f[i]=1ll*f[i]*u[i]%mod;
    poly::ntt(f, 1);
    int ans=0;
    rep(i, 0, k) {
        ans=(ans+1ll*C[i]*f[i]%mod*fac[i]%mod*qkpow(n+1, n-i)%mod)%mod;
    }
    writc(ans);
    return 0;
}