#include <iostream>
#include <math.h>
#include <queue>
#include <algorithm>
#include <map>
#include <set>
#include <cstdlib>
#include <unordered_map>
#include <numeric>
#include <functional>
#include <limits.h>
#include <utility>
#include <stack>

using namespace std;

#define fs first
#define sc second

typedef long long ll;
typedef pair<ll, ll> P;

const ll mod = 998244353;
ll fact[5010200];
ll invfact[5010200];

inline ll take_mod(ll a){
    return (a % mod + mod) % mod;
}

inline ll add(ll a, ll b){
    return take_mod(a+b);
}

inline ll sub(ll a, ll b){
    return take_mod(a + mod -b);
}


inline ll mul(ll a, ll b){
    return take_mod(a * b);
}

inline ll pow(ll x, ll n){
    ll res = 1LL;
    while(n > 0){
        if(n & 1) res = mul(res, x);
        x = mul(x, x);
        n >>= 1;
    }
    return res;
}

ll mod_inv(ll x){
    return pow(x, mod-2);
}

// nは上限
void make_fact(ll n){
    fact[0] = 1;
    ll res = 1;
    for(int i = 1; i <= n; i++){
        fact[i] = res;
        res = mul(res, i+1);
    }
}

// nは上限
void make_invfact(ll n){
    invfact[0] = 1;
    invfact[n] = mod_inv(fact[n]);
    for(int i = n-1; i >= 1; i--){
        invfact[i] = mul(invfact[i + 1], i + 1);
    }
}

ll perm(ll n, ll k){
    return mul(fact[n], invfact[n-k]);
}

ll comb(ll n, ll k){
    if(k == 0){
        return 1;
    }
    return mul(mul(fact[n], invfact[n-k]), invfact[k]);
}


int main(){
    ll N, M;
    cin >> N >> M;
    make_fact(5010000);
    make_invfact(5010000);

    ll res = 1;
    res = mul(res, comb(3 * M + N - 1, N-1));

    for(ll i = 2 * M + 1; i <= 3 * M; i++){
        ll remain = 3 * M - i;
        ll tmp = mul(N, comb(N + remain - 2, N-2));
        res = sub(res, tmp);
    }
    for(ll x = M + 1; x <= N; x++){
        if(3 * M - x < 0 || (3 * M - x) % 2 == 1){
            continue;
        }
        if(x > N){
            continue;
        }
        ll ball = (3 * M - x) / 2;

        ll tmp = mul(comb(N, x), comb(ball + N - 1, N-1));
        res = sub(res, tmp);
    }

    cout << res << endl;
}
#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;
}