import sys from collections import defaultdict def main(): N, M = map(int, sys.stdin.readline().split()) # Precompute F_ab and F_cd F_ab = defaultdict(lambda: defaultdict(int)) for a in range(M + 1): for b in range(M + 1): x = a + b t = a*a + b*b F_ab[x][t] += 1 F_cd = F_ab # F_cd is the same as F_ab # Compute convolution cnt = defaultdict(lambda: defaultdict(int)) for x1 in F_ab: for t1 in F_ab[x1]: count1 = F_ab[x1][t1] for x2 in F_cd: for t2 in F_cd[x2]: count2 = F_cd[x2][t2] x = x1 + x2 t = t1 + t2 cnt[x][t] += count1 * count2 # Compute the result result = [0] * (N + 1) for n in range(N + 1): total = 0 max_S = int((2 * n) ** 0.5) for S in range(0, max_S + 1): T = 2 * n - S * S if T < 0: continue if S in cnt and T in cnt[S]: total += cnt[S][T] result[n] = total for res in result: print(res) print() # Ensure a newline at the end if __name__ == '__main__': main()