#include <bits/stdc++.h>
using namespace std;
using Int = long long;
const int MAX = 2000000;
const int MOD = 998244353;
Int fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
Int COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
int main()
{
    COMinit();
    int N, M; cin >> N >> M;
    Int a = 0, b = 0, c = 0;
    for (int o = M % 2; o <= M; o += 2) {
        int t = (3 * M - o) / 2;
        a += COM(t + N - 1, N - 1) * COM(N, o);
        a %= MOD;
    }
    for (int o = M % 2; o <= M; o += 2) {
        int t = (3 * M - o) / 2;
        b += N * COM((t - M) + N - 1, N - 1) % MOD * COM(N - 1, o - 1);
        b %= MOD;
    }
    for (int o = M % 2; o <= M; o += 2) {
        int t = (3 * M - o) / 2;
        c += N * COM((t - M - 1) + N - 1, N - 1) % MOD * COM(N - 1, o);
        c %= MOD;
    }
    cout << (a + MOD - b + MOD - c) % MOD << '\n';
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e6 + 10;
const int mod = 998244353;
typedef long long ll;
#define int long long
int fac[maxn], inv[maxn];
int n, m;
int pw(int a, int n) {
	int res = 1;
	while(n) {
		if(n & 1) res = (ll)res * a % mod;
		a = (ll)a * a % mod, n >>= 1;
	}
	return res;
}
int INV(int a) {
	return pw(a, mod - 2);
}
void pre() {
	fac[0] = 1;
	for(int i = 1; i < maxn; i++) fac[i] = (ll)fac[i - 1] * i % mod;
	inv[maxn - 1] = INV(fac[maxn - 1]);
	for(int i = maxn - 2; i >= 0; i--) inv[i] = (ll)inv[i + 1] * (i + 1) % mod;
}
int C(int n, int m) {
	return (ll)fac[n] * inv[m] % mod * (ll)inv[n - m] % mod;
}
int H(int n, int m) {
	return C(n + m - 1, m);
}
void add(int& a, int b) {
	a += b;
	if(a >= mod) a -= mod;
}
void sub(int& a, int b) {
	a -= b;
	if(a < 0) a += mod;
}
int32_t main() {
	pre();
	scanf("%lld%lld", &n, &m);
	int ans = 0;
	for(int i = 0; i <= min(n, m); i++) if((3 * m - i) % 2 == 0) {
		add(ans, C(n, i) * H(n, (3 * m - i) / 2) % mod);
	}
	int tmp = 0;
	for(int i = 0; i <= min(n, m); i++) if((m - i) % 2 == 0) {
		add(tmp, C(n, i) * H(n, (m - i) / 2) % mod);
	}
	for(int i = 0; i <= min(n - 1, m); i++) if((m - i) % 2 == 0) {
		sub(tmp, C(n - 1, i) * H(n - 1, (m - i) / 2) % mod);
	}
	tmp = (ll)tmp * n % mod;
	sub(ans, tmp);
	printf("%lld\n", ans);
	return 0;
}
