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

long long ans,n,m,mod=998244353ll,fact[5000005],invfact[5000005],tmp;

long long fastp(long long base,long long exp){
    if(exp==0)return 1ll;
    long long tmp2=fastp(base,exp/2ll);
    tmp2=(tmp2*tmp2)%mod;
    if(exp%2==1)tmp2*=base;
    return tmp2%mod;
}

long long binom(long long a,long long b){
    if(b>a)return 0ll;

    return ((fact[a]*invfact[b])%mod*invfact[a-b])%mod;
}

int main(){

	cin>>n>>m;
	
	fact[0]=1;
	for(long long i=1;i<5000005;i++)fact[i]=(fact[i-1]*i)%mod;
	invfact[5000004]=fastp(fact[5000004],mod-2ll);
    for(long long i=5000003;i>=0;i--)invfact[i]=(invfact[i+1]*(i+1ll))%mod;


    
    ans=binom(n+3ll*m-1ll,n-1ll);
    
 //cout<<ans<<endl;
    
    for(int i=0;i<m;i++){
        ans-=(binom(n+i-1,i)*binom(n,m*3-2*i))%mod;
        ans=(ans%mod+mod)%mod;
    }
    

    for(int i=2*m+1;i<=(3*m);i++){
        tmp+=binom(n-2+3*m-i,n-2);
        tmp%=mod;
    }
//cout<<tmp<<endl;
    
    ans-=(n*tmp)%mod;
    ans=(ans%mod+mod)%mod;
    
    cout<<ans<<endl;

return 0;
}

### Prompt

Generate 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;

long long ans,n,m,mod=998244353ll,fact[5000005],invfact[5000005],tmp;

long long fastp(long long base,long long exp){
    if(exp==0)return 1ll;
    long long tmp2=fastp(base,exp/2ll);
    tmp2=(tmp2*tmp2)%mod;
    if(exp%2==1)tmp2*=base;
    return tmp2%mod;
}

long long binom(long long a,long long b){
    if(b>a)return 0ll;

    return ((fact[a]*invfact[b])%mod*invfact[a-b])%mod;
}

int main(){

	cin>>n>>m;
	
	fact[0]=1;
	for(long long i=1;i<5000005;i++)fact[i]=(fact[i-1]*i)%mod;
	invfact[5000004]=fastp(fact[5000004],mod-2ll);
    for(long long i=5000003;i>=0;i--)invfact[i]=(invfact[i+1]*(i+1ll))%mod;


    
    ans=binom(n+3ll*m-1ll,n-1ll);
    
 //cout<<ans<<endl;
    
    for(int i=0;i<m;i++){
        ans-=(binom(n+i-1,i)*binom(n,m*3-2*i))%mod;
        ans=(ans%mod+mod)%mod;
    }
    

    for(int i=2*m+1;i<=(3*m);i++){
        tmp+=binom(n-2+3*m-i,n-2);
        tmp%=mod;
    }
//cout<<tmp<<endl;
    
    ans-=(n*tmp)%mod;
    ans=(ans%mod+mod)%mod;
    
    cout<<ans<<endl;

return 0;
}

```