output_description: Print the number of triples (a,b,c) of positive integers not greater than N
  such that a+b,b+c and c+a are all multiples of K.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N K
attempt: mod = 998244353
  rng = 4100
  fctr = [1]
  finv = [1]
  for i in range(1, rng):
      fctr.append(fctr[-1] * i % mod)
  for i in range(1, rng):
      finv.append(pow(fctr[i], mod - 2, mod))
  
  
  def cmb(n, k):
      if n < 0 or k < 0:
          return 0
      else:
          return fctr[n] * finv[n - k] * finv[k] % mod
  
  
  def homo(n, k):
      if n < 0 or k <= 0:
          return 0
      else:
          return cmb(n + k - 1, k - 1)
  
  
  k, n = map(int, input().split())
  if k % 2 == 0:
      flg = 0
  else:
      flg = 1
  ans = []
  for i in range(3, k + 2, 2):
      ic = (i - 1) // 2
      anstmp = 0
      for j in range(ic + 1):
          t = homo(n - j, (k - ic * 2 + j)) * cmb(ic, j) * pow(2, j, mod)
          anstmp = (anstmp + t) % mod
      ans.append(anstmp)
      ans.append(anstmp)
  if flg:
      anstmp = 0
      for j in range(1, k // 2 + 1):
          t = (homo(n - j, j) + homo(n - j - 1, j)) * cmb(k // 2, j) * pow(2, j, mod)
          anstmp = (anstmp + t) % mod
      ans.append(anstmp)
  ans2 = ans[:-1]
  ans2 = ans2[::-1]
  print(*ans, *ans2, sep="\n")
  
problem_description: Statement
  
  You are given integers N and K. Find the number of triples (a,b,c) of positive
  integers not greater than N such that a+b,b+c and c+a are all multiples of K.
  The order of a,b,c does matter, and some of them can be the same.
samples: [{"input": "3 2", "output": "9\n    \n\n(1,1,1),(1,1,3),(1,3,1),(1,3,3),(2,2,2),(3,1,1),(3,1,3),(3,3,1) and (3,3,3)\nsatisfy the condition.\n\n* * *"}, {"input": "5 3", "output": "1\n    \n\n* * *"}, {"input": "31415 9265", "output": "27\n    \n\n* * *"}, {"input": "35897 932", "output": "114191"}]