def solve(N, M): res = [0] * (N + 1) for a in range(M + 1): for b in range(a, M + 1): for c in range(b, M + 1): for d in range(c, M + 1): x = a ** 2 + a * b + a * c + a * d + b ** 2 + b * c + b * d + c ** 2 + c * d + d ** 2 if x > N: break if a == b == c == d: res[x] += 1 elif a == b == c: res[x] += 4 elif b == c == d: res[x] += 4 elif a == b and c == d: res[x] += 6 elif a == b: res[x] += 12 elif b == c: res[x] += 12 elif c == d: res[x] += 12 else: res[x] += 24 return res N, M = map(int, input().split()) print(*solve(N, M), sep="\n")