#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cassert>
#include<iostream>
#define llong long long
using namespace std;

inline int read()
{
	int x=0; bool f=1; char c=getchar();
	for(;!isdigit(c);c=getchar()) if(c=='-') f=0;
	for(; isdigit(c);c=getchar()) x=(x<<3)+(x<<1)+(c^'0');
	if(f) return x;
	return -x;
}

const int N = 2e6;
const int P = 998244353;
llong fact[N+3],finv[N+3];

llong quickpow(llong x,llong y)
{
	llong cur = x,ret = 1ll;
	for(int i=0; y; i++)
	{
		if(y&(1ll<<i)) {y-=(1ll<<i); ret = ret*cur%P;}
		cur = cur*cur%P;
	}
	return ret;
}
llong comb(llong x,llong y) {return x<0||y<0||x<y ? 0ll : fact[x]*finv[y]%P*finv[x-y]%P;}

llong calc(llong n,llong m,llong k)
{
	llong ret = 0ll;
	for(int i=0; i<=k; i++)
	{
		if((m-i)&1) continue;
		llong tmp = comb(n,i)*comb(((m-i)>>1)+n-1,n-1)%P;
		ret = (ret+tmp)%P;
	}
//	printf("calc %lld %lld %lld=%lld\n",n,m,k,ret);
	return ret;
}

int n,m;

int main()
{
	fact[0] = 1ll; for(int i=1; i<=N; i++) fact[i] = fact[i-1]*i%P;
	finv[N] = quickpow(fact[N],P-2); for(int i=N-1; i>=0; i--) finv[i] = finv[i+1]*(i+1)%P;
	scanf("%d%d",&n,&m);
	llong ans = calc(n,3*m,m);
	ans = (ans-n*(calc(n,m,m)-calc(n-1,m,m)+P)%P+P)%P;
	printf("%lld\n",ans);
	return 0;
}
#include<bits/stdc++.h>
#define LL long long
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
using namespace std;
inline int read(){
	int v=0,f=1;
	char c=getchar();
	while (c<'0' || c>'9'){
		if (c=='-') f=-1;
		c=getchar();
	}
	while (c>='0' && c<='9'){
		v=v*10+c-'0';
		c=getchar();
	}
	return v*f;
}
const int Maxn=2000005;
const int mod=998244353;
int fact[Maxn],ivf[Maxn];
int qp(int x,int p){
	int ret=1;
	while (p){
		if (p&1) ret=1ll*ret*x%mod;
		x=1ll*x*x%mod;
		p>>=1; 
	}
	return ret;
}
int inv(int x){
	return qp(x,mod-2);
}
int C(int x,int y){
	return 1ll*fact[x]*ivf[y]%mod*ivf[x-y]%mod;
}
void _init(){
	fact[0]=1;
	for (int i=1;i<Maxn;i++){
		fact[i]=1ll*fact[i-1]*i%mod;
		ivf[i]=inv(fact[i]);
	}
	ivf[0]=1;
}
int main(){
	_init();
	int n,m;
	scanf("%d %d",&n,&m);
	int ans=0;
	for (int i=m;i>=0;i-=2){
		if (i>n) continue;
		int rem=(3*m-i)/2;
		ans+=1ll*C(n,i)*C(rem+n-1,n-1)%mod;
		if (ans>=mod) ans-=mod;
	}
//	cout<<ans<<endl;
	for (int i=m;i>=0;i-=2){
		if (i>n) continue;
		int rem=(3*m-i)/2;
		rem-=m;
		ans-=1ll*C(n,i)*C(rem+n-1,n-1)%mod*i%mod;
		if (ans<0) ans+=mod;
	}
	for (int i=m;i>=0;i-=2){
		if (i>n) continue;
		int rem=(3*m-i)/2;
		rem-=m+1;
		if (rem<0) continue;
		ans-=1ll*C(n,i)*C(rem+n-1,n-1)%mod*(n-i)%mod;
		if (ans<0) ans+=mod;
	}
	printf("%d\n",ans);
	return 0;
}