#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define MN 20005
#define Mod 998244353
int ksm(int a,int x){
	LL ans=1,w=a;
	while(x){
		if(x&1)ans=ans*w%Mod;
		w=w*w%Mod;
		x>>=1;
	}
	return ans;
}
int n,m;
LL f[205][MN],fac[MN],dfac[MN];
int C(int n,int m){
	if(n>m)return 0;
	return fac[m]*dfac[n]%Mod*dfac[m-n]%Mod;
}
int N,r[MN];
LL g[MN],F[MN];
const int G=3,invG=ksm(3,Mod-2);
void NTT(LL f[],int op){
	for(int i=0;i<N;++i)
		if(i<r[i])swap(f[i],f[r[i]]);
	for(register int len=1;len<N;len<<=1){
		int p=len<<1;
		LL tmp=ksm(op?G:invG,(Mod-1)/p);
		for(register int i=0;i<N;i+=p){
			register LL buf=1;
			for(int l=i;l<i+len;++l){
				register LL TMP=buf*f[l+len]%Mod;
				f[l+len]=(f[l]-TMP+Mod)%Mod;
				f[l]=(f[l]+TMP)%Mod;
				buf=buf*tmp%Mod;
			}
		}
	}
	if(!op){
		int invn=ksm(N,Mod-2);
		for(int i=0;i<N;++i)
			f[i]=f[i]*invn%Mod;
	}
}
int main(){
//	freopen("matrix.in","r",stdin);
//	freopen("matrix.out","w",stdout);
	scanf("%d%d",&n,&m);
	f[0][0]=1;
	N=1;
	while(N<=n*2+2)N<<=1;
	fac[0]=1;for(int i=1;i<=N;++i)fac[i]=fac[i-1]*i%Mod;
	dfac[N]=ksm(fac[N],Mod-2);
	for(int i=N-1;i>=0;--i)dfac[i]=dfac[i+1]*(i+1)%Mod;
	for(int i=0;i<N;++i)r[i]=(r[i>>1]>>1)|((i&1)?(N>>1):0);
	for(int i=1;i<=n;++i)g[i]=dfac[i+2];
	NTT(g,1);
	for(int i=1;i<=m;++i){
		for(int j=0;j<=N;++j)
			F[j]=f[i-1][j]*dfac[j]%Mod;
		NTT(F,1);
		for(int j=0;j<=N;++j)
			F[j]=F[j]*g[j]%Mod;
		NTT(F,0);
		for(int j=0;j<=n;++j){
			f[i][j]=f[i-1][j]*(1+j+C(2,j));
			f[i][j]=(f[i][j]+F[j]*fac[j+2])%Mod;
		}
	}
	LL ans=0;
	for(int i=0;i<=n;++i){
		ans=(ans+f[m][i]*C(i,n))%Mod;
	}
	printf("%lld",ans);
	return 0;
}

### Prompt

Please provide a Cpp coded solution to the problem described below:

We have an N \times M grid. The square at the i-th row and j-th column will be denoted as (i,j). Particularly, the top-left square will be denoted as (1,1), and the bottom-right square will be denoted as (N,M). Takahashi painted some of the squares (possibly zero) black, and painted the other squares white.

We will define an integer sequence A of length N, and two integer sequences B and C of length M each, as follows:

* A_i(1\leq i\leq N) is the minimum j such that (i,j) is painted black, or M+1 if it does not exist.
* B_i(1\leq i\leq M) is the minimum k such that (k,i) is painted black, or N+1 if it does not exist.
* C_i(1\leq i\leq M) is the maximum k such that (k,i) is painted black, or 0 if it does not exist.



How many triples (A,B,C) can occur? Find the count modulo 998244353.

Constraints

* 1 \leq N \leq 8000
* 1 \leq M \leq 200
* N and M are integers.



Partial Score

* 1500 points will be awarded for passing the test set satisfying N\leq 300.

Constraints

* 1 \leq N \leq 8000
* 1 \leq M \leq 200
* N and M are integers.

Input

Input is given from Standard Input in the following format:


N M

Output

Print the number of triples (A,B,C), modulo 998244353.

Examples

Input

2 3


Output

64


Input

4 3


Output

2588


Input

17 13


Output

229876268


Input

5000 100


Output

57613837

### Response

```cpp
#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define MN 20005
#define Mod 998244353
int ksm(int a,int x){
	LL ans=1,w=a;
	while(x){
		if(x&1)ans=ans*w%Mod;
		w=w*w%Mod;
		x>>=1;
	}
	return ans;
}
int n,m;
LL f[205][MN],fac[MN],dfac[MN];
int C(int n,int m){
	if(n>m)return 0;
	return fac[m]*dfac[n]%Mod*dfac[m-n]%Mod;
}
int N,r[MN];
LL g[MN],F[MN];
const int G=3,invG=ksm(3,Mod-2);
void NTT(LL f[],int op){
	for(int i=0;i<N;++i)
		if(i<r[i])swap(f[i],f[r[i]]);
	for(register int len=1;len<N;len<<=1){
		int p=len<<1;
		LL tmp=ksm(op?G:invG,(Mod-1)/p);
		for(register int i=0;i<N;i+=p){
			register LL buf=1;
			for(int l=i;l<i+len;++l){
				register LL TMP=buf*f[l+len]%Mod;
				f[l+len]=(f[l]-TMP+Mod)%Mod;
				f[l]=(f[l]+TMP)%Mod;
				buf=buf*tmp%Mod;
			}
		}
	}
	if(!op){
		int invn=ksm(N,Mod-2);
		for(int i=0;i<N;++i)
			f[i]=f[i]*invn%Mod;
	}
}
int main(){
//	freopen("matrix.in","r",stdin);
//	freopen("matrix.out","w",stdout);
	scanf("%d%d",&n,&m);
	f[0][0]=1;
	N=1;
	while(N<=n*2+2)N<<=1;
	fac[0]=1;for(int i=1;i<=N;++i)fac[i]=fac[i-1]*i%Mod;
	dfac[N]=ksm(fac[N],Mod-2);
	for(int i=N-1;i>=0;--i)dfac[i]=dfac[i+1]*(i+1)%Mod;
	for(int i=0;i<N;++i)r[i]=(r[i>>1]>>1)|((i&1)?(N>>1):0);
	for(int i=1;i<=n;++i)g[i]=dfac[i+2];
	NTT(g,1);
	for(int i=1;i<=m;++i){
		for(int j=0;j<=N;++j)
			F[j]=f[i-1][j]*dfac[j]%Mod;
		NTT(F,1);
		for(int j=0;j<=N;++j)
			F[j]=F[j]*g[j]%Mod;
		NTT(F,0);
		for(int j=0;j<=n;++j){
			f[i][j]=f[i-1][j]*(1+j+C(2,j));
			f[i][j]=(f[i][j]+F[j]*fac[j+2])%Mod;
		}
	}
	LL ans=0;
	for(int i=0;i<=n;++i){
		ans=(ans+f[m][i]*C(i,n))%Mod;
	}
	printf("%lld",ans);
	return 0;
}

```