n,m=list(map(int,input().split()))

o,f,i=998244353,[1],1

while i<3*m+n:f+=[f[-1]*i%o];i+=1

c=lambda x,y=n-1:f[x]*pow(f[x-y]*f[y]%o,o-2,o)

a=c(-1)-n*c(n+m-2)

while~-n>m<i-n:m+=2;a-=c(n,m)*c(n-1+i-m>>1)

print((a%o))
n,m=list(map(int,input().split()))

o,f,i=998244353,[1],1

while i<3*m+n:f+=[f[-1]*i%o];i+=1

c=lambda x,y=n-1:f[x]*pow(f[x-y]*f[y],o-2,o)

a=c(-1)-n*c(n+m-2)

while~-n>m<i-n:m+=2;a-=c(n,m)*c(n-1+i-m>>1)

print((a%o))
n, m = list(map(int, input().split()))
o, f, i = 998244353, [1], 1
while i < 3 * m + n:
    f += [f[-1] * i % o]
    i += 1
c = lambda x, y=n - 1: f[x] * pow(f[x - y] * f[y] % o, o - 2, o)
a = c(-1) - n * c(n + m - 2)
while ~-n > m < i - n:
    m += 2
    a -= c(n, m) * c(n - 1 + i - m >> 1)
print((a % o))

n, m = list(map(int, input().split()))
o, f, i = 998244353, [1], 1
while i < 3 * m + n:
    f += [f[-1] * i % o]
    i += 1
c = lambda x, y=n - 1: f[x] * pow(f[x - y] * f[y], o - 2, o)
a = c(-1) - n * c(n + m - 2)
while ~-n > m < i - n:
    m += 2
    a -= c(n, m) * c(n - 1 + i - m >> 1)
print((a % o))

-c = lambda x, y=n - 1: f[x] * pow(f[x - y] * f[y] % o, o - 2, o) +c = lambda x, y=n - 1: f[x] * pow(f[x - y] * f[y], o - 2, o)