#include <bits/stdc++.h>

using namespace std;

const int maxn = 2e6 + 10;
const int MOD = 998244353;

int f[maxn], inv[maxn];

int power(int n, int k) {
    int e = 1;
    while (k) {
        if (k & 1) e = 1ll * e * n % MOD;
        n = 1ll * n * n % MOD; k >>= 1;
    }
    return e;
}

int C(int n, int k) {
    return 1ll * f[n] * inv[k] % MOD * inv[n - k] % MOD;
}

int calc(int n, int x, int y) {
    y = min(n, y);
    long long answer = 0;
    for (int i = x % 2; i <= min({n, x, y}); i += 2) {
        int a = (x - i) / 2 + n - 1;
        //cerr << a << " " << x << " " << n - 1 << "\n";
        answer += 1ll * C((x - i) / 2 + n - 1, n - 1) * C(n, i) % MOD;
        answer %= MOD;
    }
    return answer;
}

int main() {
    // initialize factor
    f[0] = 1;
    for (int i = 1; i < maxn; ++i) f[i] = 1ll * f[i - 1] * i % MOD;
    inv[maxn - 1] = power(f[maxn - 1], MOD - 2);
    for (int i = maxn - 2; i >= 0; --i) inv[i] = 1ll * inv[i + 1] * (i + 1) % MOD;

    // process
    ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
    int n, m;   cin >> n >> m;
    int x = calc(n, 3 * m, m);
    int y = calc(n, m, m);
    int z = calc(n - 1, m, m);
    int answer = (x - 1ll * (y - z) * n % MOD + MOD) % MOD;
    cout << answer << "\n";
    return 0;
}
### Prompt

Construct a Cpp code solution to the problem outlined:

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 <bits/stdc++.h>

using namespace std;

const int maxn = 2e6 + 10;
const int MOD = 998244353;

int f[maxn], inv[maxn];

int power(int n, int k) {
    int e = 1;
    while (k) {
        if (k & 1) e = 1ll * e * n % MOD;
        n = 1ll * n * n % MOD; k >>= 1;
    }
    return e;
}

int C(int n, int k) {
    return 1ll * f[n] * inv[k] % MOD * inv[n - k] % MOD;
}

int calc(int n, int x, int y) {
    y = min(n, y);
    long long answer = 0;
    for (int i = x % 2; i <= min({n, x, y}); i += 2) {
        int a = (x - i) / 2 + n - 1;
        //cerr << a << " " << x << " " << n - 1 << "\n";
        answer += 1ll * C((x - i) / 2 + n - 1, n - 1) * C(n, i) % MOD;
        answer %= MOD;
    }
    return answer;
}

int main() {
    // initialize factor
    f[0] = 1;
    for (int i = 1; i < maxn; ++i) f[i] = 1ll * f[i - 1] * i % MOD;
    inv[maxn - 1] = power(f[maxn - 1], MOD - 2);
    for (int i = maxn - 2; i >= 0; --i) inv[i] = 1ll * inv[i + 1] * (i + 1) % MOD;

    // process
    ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
    int n, m;   cin >> n >> m;
    int x = calc(n, 3 * m, m);
    int y = calc(n, m, m);
    int z = calc(n - 1, m, m);
    int answer = (x - 1ll * (y - z) * n % MOD + MOD) % MOD;
    cout << answer << "\n";
    return 0;
}
```