#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const LL MOD=998244353ll;
const int mx=2000001;
int n,m,fac[2000005],ifac[2000005];
int powM(int V,int T=MOD-2ll){
	int R=1;
	while(T){
		if(T&1) R=(LL)R*(LL)V%MOD;
		T>>=1;
		V=(LL)V*(LL)V%MOD;
	}
	return R;	
}
int C(int n,int m){
	if(n<m) return 0;
	if(!m) return 1;
	return (LL)fac[n]*(LL)ifac[m]%MOD*(LL)ifac[n-m]%MOD;
}
int main(){
	int i,j,k;
	scanf("%d%d",&n,&m);
	fac[0]=1;
	for(i=1;i<=mx;++i) fac[i]=(LL)fac[i-1]*(LL)i%MOD;
	ifac[mx]=powM(fac[mx]);
	for(i=mx-1;i>=0;--i) ifac[i]=(LL)ifac[i+1]*(LL)(i+1)%MOD;
	int res=0;
	for(i=n;i>=0;--i){
		if((i&1)!=(m&1)) continue;
		if(i>m) continue;
		for(j=0;j<=3 && j<=n-i;++j){
			for(k=0;k<=3 && k<=i;++k){
				int d=j*2*(m+1)+k*2*m;
				if(d+i>m*3) continue;
				int cur=(LL)C(n,i)*(LL)C((m*3-i-d)/2+n-1,n-1)%MOD*(LL)C(i,k)%MOD*(LL)C(n-i,j)%MOD;
				if((j+k)&1)
					res=(res+MOD-cur)%MOD;
				else
					res=(res+cur)%MOD;
			}
		}
		res%=MOD;
	}
	printf("%d\n",res);
	return 0;
}
### Prompt

Please formulate a cpp solution to the following problem:

We have a sequence of N integers: x=(x_0,x_1,\cdots,x_{N-1}). Initially, x_i=0 for each i (0 \leq i \leq N-1).

Snuke will perform the following operation exactly M times:

* Choose two distinct indices i, j (0 \leq i,j \leq N-1,\ i \neq j). Then, replace x_i with x_i+2 and x_j with x_j+1.



Find the number of different sequences that can result after M operations. Since it can be enormous, compute the count modulo 998244353.

Constraints

* 2 \leq N \leq 10^6
* 1 \leq M \leq 5 \times 10^5
* All values in input are integers.

Input

Input is given from Standard Input in the following format:


N M


Output

Print the number of different sequences that can result after M operations, modulo 998244353.

Examples

Input

2 2


Output

3


Input

3 2


Output

19


Input

10 10


Output

211428932


Input

100000 50000


Output

3463133

### Response

```cpp
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const LL MOD=998244353ll;
const int mx=2000001;
int n,m,fac[2000005],ifac[2000005];
int powM(int V,int T=MOD-2ll){
	int R=1;
	while(T){
		if(T&1) R=(LL)R*(LL)V%MOD;
		T>>=1;
		V=(LL)V*(LL)V%MOD;
	}
	return R;	
}
int C(int n,int m){
	if(n<m) return 0;
	if(!m) return 1;
	return (LL)fac[n]*(LL)ifac[m]%MOD*(LL)ifac[n-m]%MOD;
}
int main(){
	int i,j,k;
	scanf("%d%d",&n,&m);
	fac[0]=1;
	for(i=1;i<=mx;++i) fac[i]=(LL)fac[i-1]*(LL)i%MOD;
	ifac[mx]=powM(fac[mx]);
	for(i=mx-1;i>=0;--i) ifac[i]=(LL)ifac[i+1]*(LL)(i+1)%MOD;
	int res=0;
	for(i=n;i>=0;--i){
		if((i&1)!=(m&1)) continue;
		if(i>m) continue;
		for(j=0;j<=3 && j<=n-i;++j){
			for(k=0;k<=3 && k<=i;++k){
				int d=j*2*(m+1)+k*2*m;
				if(d+i>m*3) continue;
				int cur=(LL)C(n,i)*(LL)C((m*3-i-d)/2+n-1,n-1)%MOD*(LL)C(i,k)%MOD*(LL)C(n-i,j)%MOD;
				if((j+k)&1)
					res=(res+MOD-cur)%MOD;
				else
					res=(res+cur)%MOD;
			}
		}
		res%=MOD;
	}
	printf("%d\n",res);
	return 0;
}
```