#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
typedef pair<ll,ll> P;
#define Mod 998244353
using VP = vector<P>; using VVP = vector<VP>;
using VI = vector<ll>; using VVI = vector<VI>; using VVVI = vector<VVI>;
#define INF 1ll<<59


vector<ll> bi(5010101);


ll modinv(ll a) {
    ll m=Mod;
    ll b = m, u = 1, v = 0;
    while (b) {
        ll t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}

ll comb(ll s,ll t){
    ll q=bi[s]*modinv(bi[t]);
    q%=Mod;
    q*=modinv(bi[s-t]);
    q%=Mod;
    return q;
}

int main(){
    ll i,j;
    ll n,m;
    cin>>n>>m;

    bi[0]=1;

    for(i=1;i<5010101;i++){
        bi[i]=bi[i-1]*i;
        bi[i]%=Mod;
    }

    ll ans1=comb(3*m+n-1,n-1);
    ll ans2=n*comb(m+n-2,n-1);

    ans2%=Mod;
    
    ll hoge=(ans1-ans2+Mod)%Mod;

    if(n<=m) cout<<hoge<<endl;
    else{
        ll l;
        ll ans3=0;
        for(l=m+1;l<=min(3*m,n);l++){
            if((3*m-l)%2==0) {
                ans3+=comb(n,l)*comb((3*m-l)/2+n-1,n-1);
                ans3%=Mod;
            }
        }

         cout<<(hoge+Mod-ans3)%Mod<<endl;
    }







    return 0;
}
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned int ui;
typedef pair<int, int> pi;

#define fi first
#define se second

int read() {
  int res = 0, w = 1; char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-') c = getchar(), w = -1;
  while (isdigit(c)) res = (res << 1) + (res << 3) + c - '0', c = getchar();
  return res * w;
}

const int Mod = 998244353;

int add(int a, int b) { return (a += b) >= Mod ? a - Mod : a; }

int sub(int a, int b) { return (a -= b) < 0 ? a + Mod : a; }

int mul(int a, int b) { return 1ll * a * b % Mod; }

int fast_pow(int a, int b) {
  int res = 1;
  for (; b; b >>= 1, a = mul(a, a))
    if (b & 1) res = mul(res, a);
  return res;
}

const int N = 3e6 + 10;

int fac[N], inv[N];

void init(int n = N - 1) {
  fac[0] = inv[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = mul(fac[i - 1], i);
  inv[n] = fast_pow(fac[n], Mod - 2);
  for (int i = n - 1; i >= 1; i--) inv[i] = mul(inv[i + 1], i + 1);
}

int C(int a, int b) { return a >= b ? mul(fac[a], mul(inv[b], inv[a - b])) : 0;}

int main() {
#ifdef dream_maker
//  freopen("tst.in", "r", stdin);
#else
  //freopen(".in", "r", stdin);
  //freopen(".out", "w", stdout);
#endif
  init();
  int n = read(), m = read(), ans = 0;
  for (int i = 0; i <= m; i++) if ((3 * m - i) & 1 ^ 1) {
    ans = add(ans, mul(C(n, i), C(((3 * m - i) >> 1) + n - 1, n - 1)));
  }
  ans = sub(ans, mul(n, C(m - 1 + n - 1, n - 1)));
  cout << ans << endl;
  return 0;
}
