#include <iostream>
using namespace std;

long long modpow(long long a, long long b, long long m) {
	long long p = 1, q = a;
	for (int i = 0; i < 31; i++) {
		if ((b / (1LL << i)) % 2 == 1) { p *= q; p %= m; }
		q *= q; q %= m;
	}
	return p;
}

const int MAX_N = 3000000;
const long long mod = 998244353LL;
long long fact[MAX_N + 9], factinv[MAX_N + 9];

void init() {
	fact[0] = 1;
	for (int i = 1; i <= MAX_N; i++) fact[i] = (1LL * i * fact[i - 1]) % mod;
	for (int i = 0; i <= MAX_N; i++) factinv[i] = modpow(fact[i], mod - 2, mod);
}

long long ncr(long long n, long long r) {
	if (r < 0 || n < r) return 0;
	return (fact[n] * factinv[r] % mod) * factinv[n - r] % mod;
}

long long N, M;

long long solve(long long even, long long odd) {
	if (odd > M) return 0;
	long long sousa = (3LL * M - odd) / 2;
	long long sousa2 = sousa - (M + 1LL);
	long long sousa3 = sousa - (M);

	long long A1 = ncr(N, even);
	long long B1 = ncr(N + sousa - 1, sousa);
	long long B2 = 1LL * even * ncr(N + sousa2 - 1, sousa2); B2 %= mod;
	long long B3 = 1LL * odd * ncr(N + sousa3 - 1, sousa3); B3 %= mod;

	long long S = A1 * (B1 - B2 - B3 + 2LL * mod) % mod;
	return S;
}

int main() {
	cin >> N >> M;
	init();

	long long ans = 0;
	for (int i = M; i >= 0; i -= 2) ans += solve(N - i, i);
	cout << ans % mod << endl;
	return 0;
}
### Prompt

Please formulate 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 <iostream>
using namespace std;

long long modpow(long long a, long long b, long long m) {
	long long p = 1, q = a;
	for (int i = 0; i < 31; i++) {
		if ((b / (1LL << i)) % 2 == 1) { p *= q; p %= m; }
		q *= q; q %= m;
	}
	return p;
}

const int MAX_N = 3000000;
const long long mod = 998244353LL;
long long fact[MAX_N + 9], factinv[MAX_N + 9];

void init() {
	fact[0] = 1;
	for (int i = 1; i <= MAX_N; i++) fact[i] = (1LL * i * fact[i - 1]) % mod;
	for (int i = 0; i <= MAX_N; i++) factinv[i] = modpow(fact[i], mod - 2, mod);
}

long long ncr(long long n, long long r) {
	if (r < 0 || n < r) return 0;
	return (fact[n] * factinv[r] % mod) * factinv[n - r] % mod;
}

long long N, M;

long long solve(long long even, long long odd) {
	if (odd > M) return 0;
	long long sousa = (3LL * M - odd) / 2;
	long long sousa2 = sousa - (M + 1LL);
	long long sousa3 = sousa - (M);

	long long A1 = ncr(N, even);
	long long B1 = ncr(N + sousa - 1, sousa);
	long long B2 = 1LL * even * ncr(N + sousa2 - 1, sousa2); B2 %= mod;
	long long B3 = 1LL * odd * ncr(N + sousa3 - 1, sousa3); B3 %= mod;

	long long S = A1 * (B1 - B2 - B3 + 2LL * mod) % mod;
	return S;
}

int main() {
	cin >> N >> M;
	init();

	long long ans = 0;
	for (int i = M; i >= 0; i -= 2) ans += solve(N - i, i);
	cout << ans % mod << endl;
	return 0;
}
```