mod = 998244353 N, M = map(int,input().split()) fact = [1]*(N+1) factinv = [1]*(N+1) for i in range(2, N+1): fact[i] = fact[i-1] * i % mod factinv[-1] = pow(fact[-1], mod-2, mod) for i in range(N-1, 1, -1): factinv[i] = factinv[i+1] * (i+1) % mod def cmb(a, b): if (a < b) or (b < 0): return 0 return fact[a] * factinv[b] % mod * factinv[a-b] % mod inv2 = pow(2, mod-2, mod) dp = [[0] * (N+1) for i in range(N+1)] dp[0][0] = 1 for i in range(N+1): for j in range(N+1): # パス if i+1 <= N: dp[i+1][j] = (dp[i+1][j] + dp[i][j]) % mod for k in range(2, min(N-i, N-j+1)+1): dp[i+k][j+k-1] = (dp[i+k][j+k-1] + cmb(N-i-1, k-1) * dp[i][j] % mod * fact[k] % mod * inv2) % mod # 閉路 for k in range(5, min(N-i, N-j)+1): dp[i+k][j+k] = (dp[i+k][j+k] + cmb(N-i-1, k-1) * dp[i][j] % mod * fact[k-1] % mod * inv2) % mod if M < N*(N-1)//2 - N: print(0) else: print(sum(dp[N][N*(N-1)//2-M:]) % mod)