output_description: Print the number of different sequences that can result after M operations,
  modulo 998244353.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
attempt: import os
  import sys
  
  if os.getenv("LOCAL"):
      sys.stdin = open("_in.txt", "r")
  
  sys.setrecursionlimit(2147483647)
  INF = float("inf")
  IINF = 10**18
  MOD = 998244353
  
  N, M = list(map(int, sys.stdin.readline().split()))
  
  
  def get_factorials(max, mod=None):
      """
      階乗 0!, 1!, 2!, ..., max!
      :param int max:
      :param int mod:
      :return:
      """
      ret = [1]
      n = 1
      if mod:
          for i in range(1, max + 1):
              n *= i
              n %= mod
              ret.append(n)
      else:
          for i in range(1, max + 1):
              n *= i
              ret.append(n)
      return ret
  
  
  factorials = get_factorials(M * 3 + N - 1, MOD)
  
  
  # invs = mod_invs(M * 3 + N - 1, MOD)
  # fi = [0, invs[1]]
  # a = invs[1]
  # for i in invs[2:]:
  #     a = a * i % MOD
  #     fi.append(a)
  #
  # print(invs)
  
  
  def mod_inv(a, mod):
      """
      a の逆元
      :param int a:
      :param int mod:
      :return:
      """
      return pow(a, mod - 2, mod)
  
  
  def ncr(n, r, mod=None):
      """
      scipy.misc.comb または scipy.special.comb と同じ
      組み合わせの数 nCr
      :param int n:
      :param int r:
      :param int mod: 3 以上の素数であること
      :rtype: int
      """
      if n < r:
          return 0
  
      return (
          factorials[n]
          * mod_inv(factorials[r], mod)
          * mod_inv(factorials[n - r], mod)
          % mod
      )
  
  
  # 合計が M*3 となる数列の数
  c1 = ncr(M * 3 + N - 1, N - 1, MOD)
  # max が M*2 より大きい数列の数を引く
  c2 = 0
  for m in range(M * 2 + 1, M * 3 + 1):
      s = M * 3 - m
      c2 += ncr(s + N - 2, N - 2, MOD) * N
      c2 %= MOD
  print((c1 - c2) % MOD)
  
problem_description: Statement
  
  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.
samples: [{"input": "2 2", "output": "3\n    \n\nAfter two operations, there are three possible outcomes:\n\n  * x=(2,4)\n  * x=(3,3)\n  * x=(4,2)\n\nFor example, x=(3,3) can result after the following sequence of operations:\n\n  * First, choose i=0,j=1, changing x from (0,0) to (2,1).\n  * Second, choose i=1,j=0, changing x from (2,1) to (3,3).\n\n* * *"}, {"input": "3 2", "output": "19\n    \n\n* * *"}, {"input": "10 10", "output": "211428932\n    \n\n* * *"}, {"input": "100000 50000", "output": "3463133"}]