#include<bits/stdc++.h>
using namespace std;

typedef long long LL;

const int N=1000000,mod=998244353;

int add(int a,int b,int p=mod){return a+b>=p?a+b-p:a+b;}
int sub(int a,int b,int p=mod){return a-b<0?a-b+p:a-b;}
int mul(int a,int b,int p=mod){return (LL)a*b%p;}
void sadd(int &a,int b,int p=mod){a=add(a,b,p);}
void ssub(int &a,int b,int p=mod){a=sub(a,b,p);}
void smul(int &a,int b,int p=mod){a=mul(a,b,p);}

int n,m;

void into(){
  scanf("%d%d",&n,&m);
}

int inv[N*3+9],fac[N*3+9],ifac[N*3+9];

void Get_inv(){
  inv[1]=1;
  fac[0]=fac[1]=1;
  ifac[0]=ifac[1]=1;
  for (int i=2,lim=n+m*2;i<=lim;++i){
	inv[i]=mul(mod-mod/i,inv[mod%i]);
	fac[i]=mul(fac[i-1],i);
	ifac[i]=mul(ifac[i-1],inv[i]);
  }
}

int Get_c(int n,int m){return n<m||m<0?0:mul(fac[n],mul(ifac[m],ifac[n-m]));}

int ans;

void Get_ans(){
  for (int i=0;i<=m&&i<=n;++i){
	if (i&1^m&1) continue;
	int t=3*m-i>>1;
	sadd(ans,mul(Get_c(n,i),Get_c(n+t-1,n-1)));
	ssub(ans,mul(n,mul(Get_c(n-1,i),Get_c(n+t-m-2,n-1))));
	ssub(ans,mul(n,mul(Get_c(n-1,i-1),Get_c(n+t-m-1,n-1))));
  }
}

void work(){
  Get_inv();
  Get_ans();
}

void outo(){
  printf("%d\n",ans);
}

int main(){
  into();
  work();
  outo();
  return 0;
}
### Prompt

Please create a solution in Cpp 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 int N=1000000,mod=998244353;

int add(int a,int b,int p=mod){return a+b>=p?a+b-p:a+b;}
int sub(int a,int b,int p=mod){return a-b<0?a-b+p:a-b;}
int mul(int a,int b,int p=mod){return (LL)a*b%p;}
void sadd(int &a,int b,int p=mod){a=add(a,b,p);}
void ssub(int &a,int b,int p=mod){a=sub(a,b,p);}
void smul(int &a,int b,int p=mod){a=mul(a,b,p);}

int n,m;

void into(){
  scanf("%d%d",&n,&m);
}

int inv[N*3+9],fac[N*3+9],ifac[N*3+9];

void Get_inv(){
  inv[1]=1;
  fac[0]=fac[1]=1;
  ifac[0]=ifac[1]=1;
  for (int i=2,lim=n+m*2;i<=lim;++i){
	inv[i]=mul(mod-mod/i,inv[mod%i]);
	fac[i]=mul(fac[i-1],i);
	ifac[i]=mul(ifac[i-1],inv[i]);
  }
}

int Get_c(int n,int m){return n<m||m<0?0:mul(fac[n],mul(ifac[m],ifac[n-m]));}

int ans;

void Get_ans(){
  for (int i=0;i<=m&&i<=n;++i){
	if (i&1^m&1) continue;
	int t=3*m-i>>1;
	sadd(ans,mul(Get_c(n,i),Get_c(n+t-1,n-1)));
	ssub(ans,mul(n,mul(Get_c(n-1,i),Get_c(n+t-m-2,n-1))));
	ssub(ans,mul(n,mul(Get_c(n-1,i-1),Get_c(n+t-m-1,n-1))));
  }
}

void work(){
  Get_inv();
  Get_ans();
}

void outo(){
  printf("%d\n",ans);
}

int main(){
  into();
  work();
  outo();
  return 0;
}
```