import sys from collections import defaultdict def main(): N, M = map(int, sys.stdin.readline().split()) # Precompute ab_freq: X -> {A: count} ab_freq = defaultdict(lambda: defaultdict(int)) for a in range(M+1): for b in range(M+1): X = a + b A = a*a + a*b + b*b ab_freq[X][A] += 1 # Precompute cd_freq: Y -> {B: count} cd_freq = defaultdict(lambda: defaultdict(int)) for c in range(M+1): for d in range(M+1): Y = c + d B = c*c + c*d + d*d cd_freq[Y][B] += 1 ans = [0] * (N + 1) # Iterate over all possible X and Y pairs for X in ab_freq: for Y in cd_freq: XY = X * Y if XY > N: continue # Iterate through all A and B for this X and Y for A, count_A in ab_freq[X].items(): max_B = N - A - XY if max_B < 0: continue for B, count_B in cd_freq[Y].items(): if B > max_B: continue k = A + XY + B if k <= N: ans[k] += count_A * count_B for k in range(N+1): print(ans[k]) if __name__ == '__main__': main()