#include <bits/stdc++.h>
#define int long long
using namespace std;
const int mod = 998244353;
inline void upd(int &a,int b)
{
	a += b;
	if(a >= mod) a -= mod;
}
int N,M;
int fac[2000005],inq[2000005];
int qpow(int x,int y)
{
	int ans = 1;
	while(y)
	{
		if(y&1) ans = 1ll*ans*x%mod;
		x = 1ll*x*x%mod;y >>= 1;
	}
	return ans;
}
void init()
{
	fac[0] = 1;
	for(int i = 1;i <= 2000000;i ++)
		fac[i] = 1ll*i*fac[i-1]%mod;
	inq[2000000] = qpow(fac[2000000],mod-2);
	for(int i = 1999999;i >= 0;i --)
		inq[i] = 1ll*inq[i+1]*(i+1)%mod;
}
inline int C(int x,int y) { return 1ll*fac[x]*inq[x-y]%mod*inq[y]%mod; }
int solve(int sm)
{
	if(sm < 0)
		return 0;
	//sum = sm, atmost M odd
	int r = min(min(N,M),sm);
	int ans = 0;
	for(int i = sm&1;i <= r;i += 2)
		ans = (ans+1ll*C(N,i)*C(N+((sm-i)>>1)-1,N-1))%mod;
	return ans;
}
signed main()
{
	init();
	scanf("%lld%lld",&N,&M);
	printf("%lld\n",(solve(3*M)-1ll*solve(M-1)*N%mod+mod)%mod);
	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>
#define int long long
using namespace std;
const int mod = 998244353;
inline void upd(int &a,int b)
{
	a += b;
	if(a >= mod) a -= mod;
}
int N,M;
int fac[2000005],inq[2000005];
int qpow(int x,int y)
{
	int ans = 1;
	while(y)
	{
		if(y&1) ans = 1ll*ans*x%mod;
		x = 1ll*x*x%mod;y >>= 1;
	}
	return ans;
}
void init()
{
	fac[0] = 1;
	for(int i = 1;i <= 2000000;i ++)
		fac[i] = 1ll*i*fac[i-1]%mod;
	inq[2000000] = qpow(fac[2000000],mod-2);
	for(int i = 1999999;i >= 0;i --)
		inq[i] = 1ll*inq[i+1]*(i+1)%mod;
}
inline int C(int x,int y) { return 1ll*fac[x]*inq[x-y]%mod*inq[y]%mod; }
int solve(int sm)
{
	if(sm < 0)
		return 0;
	//sum = sm, atmost M odd
	int r = min(min(N,M),sm);
	int ans = 0;
	for(int i = sm&1;i <= r;i += 2)
		ans = (ans+1ll*C(N,i)*C(N+((sm-i)>>1)-1,N-1))%mod;
	return ans;
}
signed main()
{
	init();
	scanf("%lld%lld",&N,&M);
	printf("%lld\n",(solve(3*M)-1ll*solve(M-1)*N%mod+mod)%mod);
	return 0;
}
```