#include<bits/stdc++.h>
using namespace std;
#define ll long long 
#define nn 65536*48
#define mod 998244353
ll qpow(ll x,ll y=mod-2){
	ll res=1;
	while(y){
		if(y&1) res=res*x%mod;x=x*x%mod;
		y=y/2;
	}
	return res;
}
ll f[nn],rf[nn];ll n,m;
ll C(ll x,ll y){
	if(x>y) return 0;
	return f[y]*rf[x]%mod*rf[y-x]%mod;
}
int main(){
	f[0]=1;for(int i=1;i<nn;i++) f[i]=f[i-1]*i%mod;
	rf[nn-1]=qpow(f[nn-1]);for(int i=nn-2;i>=0;i--) rf[i]=rf[i+1]*(i+1)%mod;

	scanf("%lld%lld",&n,&m);ll ans=0;int k=m+1;ll pre=0;ll flg=0;
	for(int odd=m;odd>=0;odd-=2) if(odd<=n){
		int brick=m+(m-odd)/2;
		ll res=C(n-1,brick+n-1);
		
		if(!flg and brick>=m+1) {
			flg=1;pre=0;
			for(int k=m+1;k<=brick;k++) pre+=C(n-2,brick+n-2-k)*n,pre%=mod;
		}
		else if(brick>=m+1) pre+=C(n-2,brick+n-2-(m+1))*n,pre%=mod;
		
		res-=pre;res%=mod;
		ans=(ans+res*C(odd,n))%mod;
		if(odd) ans-=C(n-2,brick+n-2-m)*n%mod*C(odd-1,n-1)%mod;
	}
	printf("%lld\n",(ans%mod+mod)%mod);
	return 0;
}
### Prompt

Develop a solution in cpp to the problem described below:

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;
#define ll long long 
#define nn 65536*48
#define mod 998244353
ll qpow(ll x,ll y=mod-2){
	ll res=1;
	while(y){
		if(y&1) res=res*x%mod;x=x*x%mod;
		y=y/2;
	}
	return res;
}
ll f[nn],rf[nn];ll n,m;
ll C(ll x,ll y){
	if(x>y) return 0;
	return f[y]*rf[x]%mod*rf[y-x]%mod;
}
int main(){
	f[0]=1;for(int i=1;i<nn;i++) f[i]=f[i-1]*i%mod;
	rf[nn-1]=qpow(f[nn-1]);for(int i=nn-2;i>=0;i--) rf[i]=rf[i+1]*(i+1)%mod;

	scanf("%lld%lld",&n,&m);ll ans=0;int k=m+1;ll pre=0;ll flg=0;
	for(int odd=m;odd>=0;odd-=2) if(odd<=n){
		int brick=m+(m-odd)/2;
		ll res=C(n-1,brick+n-1);
		
		if(!flg and brick>=m+1) {
			flg=1;pre=0;
			for(int k=m+1;k<=brick;k++) pre+=C(n-2,brick+n-2-k)*n,pre%=mod;
		}
		else if(brick>=m+1) pre+=C(n-2,brick+n-2-(m+1))*n,pre%=mod;
		
		res-=pre;res%=mod;
		ans=(ans+res*C(odd,n))%mod;
		if(odd) ans-=C(n-2,brick+n-2-m)*n%mod*C(odd-1,n-1)%mod;
	}
	printf("%lld\n",(ans%mod+mod)%mod);
	return 0;
}
```