#include <bits/stdc++.h>

using namespace std;

#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define trv(p, u) for (edg *p = h[u]; p; p = p->nxt)
#define pb push_back
typedef long long ll;
typedef double db;
const int N = 2e6 + 100;
const int inf = 0x3f3f3f3f;
const int mod = 998244353;

inline int rd() {
  int s = 0, w = 1; char c = getchar();
  while (c < '0' || c > '9') { if (c == '-') w = -1; c = getchar(); }
  while (c >= '0' && c <= '9') s = s * 10 + c - '0', c = getchar();
  return s * w;
}

int n, m, fac[N], inv[N];

inline int qpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = 1ll * res * a % mod;
    a = 1ll * a * a % mod, b >>= 1;
  }
  return res;
}

inline void prew() {
  fac[0] = inv[0] = fac[1] = inv[1] = 1;
  rep(i, 2, N - 100) inv[i] = 1ll * (mod - mod / i) * inv[mod % i] % mod;
  rep(i, 2, N - 100)
    fac[i] = 1ll * i * fac[i - 1] % mod, inv[i] = 1ll * inv[i] * inv[i - 1] % mod;
}

inline int C(int a, int b) { return 1ll * fac[a] * inv[a - b] % mod * inv[b] % mod; }

inline int calc(int x) {
  int res = 0;
  for (int i = x & 1; i <= min(x, min(n, m)); i += 2)
    res = (res + 1ll * C(n, i) * C((x - i) / 2 + n - 1, n - 1)) % mod;
  return res;
}

int main() {
  prew(); n = rd(), m = rd();
  printf("%lld\n", (calc(m * 3) - 1ll * n * calc(m - 1) % mod + mod) % mod);
  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;

#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define trv(p, u) for (edg *p = h[u]; p; p = p->nxt)
#define pb push_back
typedef long long ll;
typedef double db;
const int N = 2e6 + 100;
const int inf = 0x3f3f3f3f;
const int mod = 998244353;

inline int rd() {
  int s = 0, w = 1; char c = getchar();
  while (c < '0' || c > '9') { if (c == '-') w = -1; c = getchar(); }
  while (c >= '0' && c <= '9') s = s * 10 + c - '0', c = getchar();
  return s * w;
}

int n, m, fac[N], inv[N];

inline int qpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = 1ll * res * a % mod;
    a = 1ll * a * a % mod, b >>= 1;
  }
  return res;
}

inline void prew() {
  fac[0] = inv[0] = fac[1] = inv[1] = 1;
  rep(i, 2, N - 100) inv[i] = 1ll * (mod - mod / i) * inv[mod % i] % mod;
  rep(i, 2, N - 100)
    fac[i] = 1ll * i * fac[i - 1] % mod, inv[i] = 1ll * inv[i] * inv[i - 1] % mod;
}

inline int C(int a, int b) { return 1ll * fac[a] * inv[a - b] % mod * inv[b] % mod; }

inline int calc(int x) {
  int res = 0;
  for (int i = x & 1; i <= min(x, min(n, m)); i += 2)
    res = (res + 1ll * C(n, i) * C((x - i) / 2 + n - 1, n - 1)) % mod;
  return res;
}

int main() {
  prew(); n = rd(), m = rd();
  printf("%lld\n", (calc(m * 3) - 1ll * n * calc(m - 1) % mod + mod) % mod);
  return 0;
}
```