import sys from collections import defaultdict def main(): N, M = map(int, sys.stdin.readline().split()) # We'll use two dictionaries to keep track of the state transitions # Each state is (s, q): sum and sum of squares # We'll process each variable (a, b, c, d) step by step # Initialize DP with the first variable (a) dp = defaultdict(int) dp[(0, 0)] = 1 # initial state before processing any variable # Process each of the four variables for _ in range(4): new_dp = defaultdict(int) for (s, q), cnt in dp.items(): for x in range(0, M+1): new_s = s + x new_q = q + x * x new_dp[(new_s, new_q)] += cnt dp = new_dp # Now, for each (s, q) in dp, compute E and update the result result = [0] * (N + 1) for (s, q), cnt in dp.items(): E = (s * s + q) // 2 if E <= N: result[E] += cnt # Output the result from 0 to N for n in range(N + 1): print(result[n]) if __name__ == "__main__": main()