Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
 
for n in range(1,N+1):
    cnt = 0
    for i in range(1,100):
        for j in range(1,100):
            for k in range(1,100):
                a = i**2 + j**2 + k**2 + i*j + j*k + k*i
                if a == n:
                    cnt += 1
    
    print(cnt)

Fixed submission:
N = int(input())

anslist = [0] * N

for i in range(1,int(N**0.5)+1):
    for j in range(1,int(N**0.5)+1):
        for k in range(1,int(N**0.5)+1):
            a = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if a <= N:
                anslist[a-1] += 1
    

for i in range(N):
    print(anslist[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

for n in range(1,N+1):
    cnt = 0
    for i in range(1,int(n**0.5)+1):
        for j in range(1,int(n**0.5)+1):
            for k in range(1,int(n**0.5)+1):
                a = i**2 + j**2 + k**2 + i*j + j*k + k*i
                if a == n:
                    cnt += 1
    
    print(cnt)

Fixed submission:
N = int(input())

anslist = [0] * N

for i in range(1,int(N**0.5)+1):
    for j in range(1,int(N**0.5)+1):
        for k in range(1,int(N**0.5)+1):
            a = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if a <= N:
                anslist[a-1] += 1
    

for i in range(N):
    print(anslist[i])
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

table = [0] * (N+1)

for i in range(1,N+1):
    for j in range(1,N+1):
        if j % i == 0:
            table[j] += 1

ans = 0
for i in range(1,N+1):
    ans += i * table[i]

print(ans)

Fixed submission:
N = int(input())

table = [0] * (N+1)

for i in range(1,N+1):
    for j in range(i,N+1,i):
        table[j] += 1

ans = 0
for i in range(1,N+1):
    ans += i * table[i]

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
Alist = [int(x) for x in input().split()]
M = max(Alist)
A0 = ['NotUse']
Abool = A0 + [0 for x in range(M)]
Alist.sort()
ans = 0

for i in Alist:
    for j in range(M+1):
        if j == 0:
            None
        elif Abool[j] >= 2:
            None
        else:
            if j % i == 0:
                Abool[j] += 1
    
for i in Alist:
    if Abool[i] == 1:
        ans += 1

print(ans)

Fixed submission:
N = int(input())
Alist = [int(x) for x in input().split()]
M = max(Alist)
A0 = ['NotUse']
Abool = A0 + [0 for x in range(M)]
Alist.sort()
ans = 0

for i in Alist:
    for j in range(i,M+1,i):
        if Abool[j] >= 2:
            None
        else:
            Abool[j] += 1
    
for i in Alist:
    if Abool[i] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
Alist = [int(x) for x in input().split()]
invans = 0
for i in range(N):
    for j in range(N):
        if i == j or Alist[i] < Alist[j]:
            None
        else:
            if Alist[i] % Alist[j] == 0:
                invans += 1
                break

print(N - invans)

Fixed submission:
N = int(input())
Alist = [int(x) for x in input().split()]
M = max(Alist)
A0 = ['NotUse']
Abool = A0 + [0 for x in range(M)]
Alist.sort()
ans = 0

for i in Alist:
    for j in range(i,M+1,i):
        if Abool[j] >= 2:
            None
        else:
            Abool[j] += 1
    
for i in Alist:
    if Abool[i] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
Alist = [int(x) for x in input().split()]
invans = 0
for i in range(N):
    for j in range(N):
        if i == j:
            None
        else:
            if Alist[i] % Alist[j] == 0:
                invans += 1
                break

print(N - invans)

Fixed submission:
N = int(input())
Alist = [int(x) for x in input().split()]
M = max(Alist)
A0 = ['NotUse']
Abool = A0 + [0 for x in range(M)]
Alist.sort()
ans = 0

for i in Alist:
    for j in range(i,M+1,i):
        if Abool[j] >= 2:
            None
        else:
            Abool[j] += 1
    
for i in Alist:
    if Abool[i] == 1:
        ans += 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = 1
for i in map(int,input().split()):
    ans = ans * i

if ans > 10**18:
    print(-1)
else:
    print(ans)

Fixed submission:
import sys
N = int(input())
A = list(map(int,input().split()))
mult = 1

if 0 in A:
    print(0)
    sys.exit()
else:
    for i in A:
        mult *= i
        if mult > 10**18:
            print('-1')
            sys.exit()

print(mult)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(x) for x in input().split()]

mult = 1
for i in range(N):
    mult = mult*A[i]

if mult > 10**18:
    print('-1')
else:
    print(mult)
    

Fixed submission:
import sys
N = int(input())
A = list(map(int,input().split()))
mult = 1

if 0 in A:
    print(0)
    sys.exit()
else:
    for i in A:
        mult *= i
        if mult > 10**18:
            print('-1')
            sys.exit()

print(mult)
Buggy python submission (verdict: Time Limit Exceeded):
from math import floor

A,B,N = map(int,input().split())
Max = -100000000000000
for i in range(1,N+1):
    Max = max(Max,floor(A*i/B)-A*floor(i/B))

print(Max)

Fixed submission:
A,B,N = map(int,input().split())
x = min(N,B-1)
print(int(A*x/B))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
emplist = [int(x) for x in input().split()]
sum = 0
for i in range(1,N+1):
    if sum < N-1:
        x = emplist.count(i)
        sum += x
        print(x)
    else:
        print(0)

Fixed submission:
from collections import Counter
N = int(input())
emplist = [int(x) for x in input().split()]

ans = Counter(emplist)

for i in range(1,N+1):
    print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
emplist = [int(x) for x in input().split()]
sum = 0
for i in range(1,N+1):
    if sum < N-1:
        print(emplist.count(i))
        sum += emplist.count(i)
    else:
        print(0)

Fixed submission:
from collections import Counter
N = int(input())
emplist = [int(x) for x in input().split()]

ans = Counter(emplist)

for i in range(1,N+1):
    print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
emplist = [int(x) for x in input().split()]

for i in range(1,N+1):
    print(emplist.count(i))

Fixed submission:
from collections import Counter
N = int(input())
emplist = [int(x) for x in input().split()]

ans = Counter(emplist)

for i in range(1,N+1):
    print(ans[i])
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
N = int(input())
Alist = list(map(int,input().split()))
numcntlist = [0] * N 
numCounter = Counter(Alist)

for i in range(1,N+1):
    numcntlist[i-1] = numCounter[i]

ans = 0

for i in Alist:
    numcntlist[i-1] -= 1 
    for j in numcntlist:
        if j == 0 or j == 1:
            None
        else:
            ans += int(j*(j-1)/2)
    
    print(ans)
    numcntlist[i-1] += 1
    ans = 0

Fixed submission:
from collections import Counter
N = int(input())
Alist = list(map(int,input().split()))
numcntlist = [0] * N 
numCounter = Counter(Alist)

for i in range(1,N+1):
    numcntlist[i-1] = numCounter[i]

sumcomb = 0
for i in numcntlist:
    sumcomb += int(i*(i-1)/2)

for i in Alist:
    ans = sumcomb -(numCounter[i] - 1)
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque

def deqreverse(deq):
    newdeq = deque()
    for _ in range(len(deq)):
        c = deq.pop()
        newdeq.append(c)
    
    return newdeq

S = deque(list(input()))
Q = int(input())
Query = []
for _ in range(Q):
    Query.append([x for x in input().split()])

i = 0
while i < Q:
    if i != Q-1:
        temp = Query[i+1][0]
        if Query[i][0] == '1':
            if temp != '1':
                S = deqreverse(S)
            else:
                i += 1
        else:
            if Query[i][1] == '1':
                S.appendleft(Query[i][2])
            else:
                S.append(Query[i][2])
    else:
        if Query[i][0] == '1':
            S = deqreverse(S)
        else:
            if Query[i][1] == '1':
                S.appendleft(Query[i][2])
            else:
                S.append(Query[i][2])
    i += 1
        
print("".join(S))

Fixed submission:
from collections import deque

def reversedeq(deq):
    newdeq = deque()
    for _ in range(len(deq)):
        c = deq.pop()
        newdeq.append(c)
    
    return newdeq


S = deque(list(input()))
Q = int(input())
reverse_state = False

for _ in range(Q):
    Query = [x for x in input().split()]
    if len(Query) == 1:
        reverse_state = reverse_state ^ 1
    else:
        if reverse_state:
            if Query[1] == '1':
                S.append(Query[2])
            else:
                S.appendleft(Query[2])
        else:
            if Query[1] == '1':
                S.appendleft(Query[2])
            else:
                S.append(Query[2])

if reverse_state:
    S = reversedeq(S)

print("".join(S))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque

def deqreverse(deq):
    newdeq = deque()
    for _ in range(len(deq)):
        c = deq.pop()
        newdeq.append(c)
    
    return newdeq

S = deque(list(input()))
Q = int(input())

for _ in range(Q):
    Query = [x for x in input().split()]
    if Query[0] == '1':
        S = deqreverse(S)
    else:
        if Query[1] == '1':
            S.appendleft(Query[2])
        else:
            S.append(Query[2])
        
print("".join(S))


Fixed submission:
from collections import deque

def reversedeq(deq):
    newdeq = deque()
    for _ in range(len(deq)):
        c = deq.pop()
        newdeq.append(c)
    
    return newdeq


S = deque(list(input()))
Q = int(input())
reverse_state = False

for _ in range(Q):
    Query = [x for x in input().split()]
    if len(Query) == 1:
        reverse_state = reverse_state ^ 1
    else:
        if reverse_state:
            if Query[1] == '1':
                S.append(Query[2])
            else:
                S.appendleft(Query[2])
        else:
            if Query[1] == '1':
                S.appendleft(Query[2])
            else:
                S.append(Query[2])

if reverse_state:
    S = reversedeq(S)

print("".join(S))
Buggy python submission (verdict: Runtime Error):
from sys import exit

N,M = map(int,input().split())

Query = []
for _ in range(M):
    Query.append(list(map(int,input().split())))

for i in range(10**(N-1),10**N):
    strnum = str(i)
    flag = True
    for j in Query:
        if strnum[j[0]-1] != str(j[1]):
            flag = False
            break
        else:
            None
    if flag:
        print(i)
        exit(0)
       
i = 0
strnum = str(i)
flag = True
for j in Query:
    if strnum[j[0]-1] != str(j[1]):
        flag = False
        break
    else:
        None
if flag:
    print(i)
    exit(0)
    
print('-1')

Fixed submission:
from sys import exit

N,M = map(int,input().split())

Query = []
for _ in range(M):
    Query.append(list(map(int,input().split())))

i = 0
if N == 1:
    flag0 = True
    for j in Query:
        if j[0] != 1 or j[1] != 0:
            flag0 = False
            break
        else:
            None
        
    if flag0:
        print(0)
        exit(0)

for i in range(10**(N-1),10**N):
    strnum = str(i)
    flag = True
    for j in Query:
        if strnum[j[0]-1] != str(j[1]):
            flag = False
            break
        else:
            None
    if flag:
        print(i)
        exit(0)
    
print('-1')
Buggy python submission (verdict: Runtime Error):
N = int(input())

if N == 1:
    print(1)
else:
    ans = 1
    i = 1
    while N >= 2 ** i:
        ans += 2 ** i
        i += 1

print(ans)

Fixed submission:
N = int(input())

if N == 1:
    print(1)
else:
    ans = 1
    i = 1
    while N >= 2 ** i:
        ans += 2 ** i
        i += 1
    print(ans)
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())

judge = [False]*N
WAcnt = [0] * N
ACcnt = 0
for i in range(M):
    p,S = (x for x in input().split())
    p = int(p)
    if judge[p-1] == False:
        if S == "AC":
            judge[p-1] = True
            ACcnt += 1
        else:
            WAcnt[p-1] += 1

WAans = 0
for i in range(N):
    if judge[i] == True:
        WAans += WAans[i]

print(ACcnt,WAans)

Fixed submission:
N,M = map(int,input().split())

judge = [False]*N
WAcnt = [0] * N
ACcnt = 0
for i in range(M):
    p,S = (x for x in input().split())
    p = int(p)
    if judge[p-1] == False:
        if S == "AC":
            judge[p-1] = True
            ACcnt += 1
        else:
            WAcnt[p-1] += 1

WAans = 0
for i in range(N):
    if judge[i] == True:
        WAans += WAcnt[i]

print(ACcnt,WAans)

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())

judge = [False]*N
WAcnt = [0] * N
ACcnt = 0
for i in range(M):
    p,S = (x for x in input().split())
    p = int(p)
    if judge[p-1] == False:
        if S == "AC":
            judge[p-1] = True
            ACcnt += 1
        else:
            WAcnt[p-1] += 1

WAans = 0
for i in range(N):
    if judge[i-1] == True:
        WAans += WAans[i-1]

print(ACcnt,WAans)

Fixed submission:
N,M = map(int,input().split())

judge = [False]*N
WAcnt = [0] * N
ACcnt = 0
for i in range(M):
    p,S = (x for x in input().split())
    p = int(p)
    if judge[p-1] == False:
        if S == "AC":
            judge[p-1] = True
            ACcnt += 1
        else:
            WAcnt[p-1] += 1

WAans = 0
for i in range(N):
    if judge[i] == True:
        WAans += WAcnt[i]

print(ACcnt,WAans)

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())

judge = [False]*N
WAcnt = [0] * N
ACcnt = 0
for i in range(M):
    p,S = (x for x in input().split())
    p = int(p)
    if judge[p-1] == False:
        if S == "AC":
            judge[p-1] = True
            ACcnt += 1
        else:
            WAcnt[p-1] += 1

WAans = 0
for i in range(N):
    if judge[p-1] == True:
        WAans += WAans[p-1]

print(ACcnt,WAans)

Fixed submission:
N,M = map(int,input().split())

judge = [False]*N
WAcnt = [0] * N
ACcnt = 0
for i in range(M):
    p,S = (x for x in input().split())
    p = int(p)
    if judge[p-1] == False:
        if S == "AC":
            judge[p-1] = True
            ACcnt += 1
        else:
            WAcnt[p-1] += 1

WAans = 0
for i in range(N):
    if judge[i] == True:
        WAans += WAcnt[i]

print(ACcnt,WAans)
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations

N = int(input())
L = list(map(int,input().split()))

cmb = list(combinations(L,3))
ans = 0

for v in cmb:
    a = v[0]
    b = v[1]
    c = v[2]
    
    if a < b + c and b < c+a and c < a+b:
        ans += 1

print(ans)

Fixed submission:
def biserch(n,List):
    left = 0
    right = len(List)
    while left < right:
        mid = (left+right)//2
        if n <= List[mid]:
            right = mid
        else:
            left = mid + 1
    
    return left
    
N = int(input())
L = list(map(int,input().split()))
L.sort()

ans = 0
for i in range(N):
    for j in range(i+1,N):
        key = L[i] + L[j]
        anchor = biserch(key,L)
        
        ans += max(anchor - (j+1),0)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int,input().split())

ans = set(range(1,N+1))
for _ in range(M):
    a,b = map(int,input().split())
    filset = set(range(a,b+1))
    
    ans = ans & filset

print(len(ans))

Fixed submission:
N, M = map(int,input().split())

L = 0
R = N+1
for _ in range(M):
    l,r = map(int,input().split())
    
    L = max(l,L)
    R = min(r,R)

print(len(range(L,R+1)))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = int(input())
B = int(input())

if N == 1:
  print("Hello World")
else:
  print(A+B)

Fixed submission:
N = int(input())
if N == 1:
  print("Hello World")
else:
  A = int(input())
  B = int(input())
  print(A+B)
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
  print("YES")
else:
  print("NO")

Fixed submission:
a=raw_input()
b=raw_input()
if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
n = input()
print((1000 - n % 1000) % 1000)

Fixed submission:
n = int(input())
print((1000 - n % 1000) % 1000)
Buggy python submission (verdict: Runtime Error):
import sys
from collections import Counter

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c for j in range(b)] for i in range(a)]
def list3d(a, b, c, d): return [[[d for k in range(c)] for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e for l in range(d)] for k in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10**9)
INF = 10**19
MOD = 10**9 + 7
EPS = 10**-10

N = INT()
A = LIST()
B = LIST()

C1 = Counter(A)
C2 = Counter(B)
for k, v in C1.items():
    if v > N-C2[k]:
        No()
        exit()

ans1 = B[N//2:] + B[:N//2]
ans2 = B[ceil(N, 2):] + B[:ceil(N, 2)]
ans3 = B[ceil(N, 2)+1:] + B[:ceil(N, 2)+1]

def check(A, B):
    for i in range(N):
        if A[i] == B[i]:
            return False
    return True

if check(A, ans1):
    Yes()
    print(*ans1)
elif check(A, ans2):
    Yes()
    print(*ans2)
else:
    print(*ans3)


Fixed submission:
import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c for j in range(b)] for i in range(a)]
def list3d(a, b, c, d): return [[[d for k in range(c)] for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e for l in range(d)] for k in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10**9)
INF = 10**19
MOD = 10**9 + 7
EPS = 10**-10

N = INT()
U = []
V = []
for i in range(N):
    x, y = MAP()
    U.append(x+y)
    V.append(x-y)

U.sort()
V.sort()
ans = max(U[-1]-U[0], V[-1]-V[0])
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
from math import gcd

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 19
MOD = 10 ** 9 + 7
EPS = 10 ** -10

def lcm(x, y): return (x * y) // gcd(x, y)

N = INT()
A = LIST()

is_pc = 1
l = 1
for a in A:
    g = gcd(l, a)
    if g != 1:
        is_pc = 0
        break
    l = lcm(l, a)

is_sc = 1
g = 0
for a in A:
    g = gcd(g, a)
if g != 1:
    is_sc = 0

if is_pc:
    print('pairwise coprime')
elif is_sc:
    print('setwise coprime')
else:
    print('not coprime')


Fixed submission:
import sys
from math import gcd

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 19
MOD = 10 ** 9 + 7
EPS = 10 ** -10

def factorize(num: int) -> dict:
    """ 素因数分解 """
    from math import sqrt
    from collections import Counter

    d = Counter()
    for i in range(2, int(sqrt(num))+1):
        while num % i == 0:
            num //= i
            d[i] += 1
        if num == 1:
            break
    if num != 1:
        d[num] += 1
    return d

N = INT()
A = LIST()

def check(se, fact):
    for k in fact:
        if k not in se:
            se.add(k)
        else:
            return False
    return True

is_pc = 1
se = set()
for a in A:
    fact = factorize(a)
    if not check(se, fact):
        is_pc = 0
        break

is_sc = 1
g = 0
for a in A:
    g = gcd(g, a)
if g != 1:
    is_sc = 0

if is_pc:
    print('pairwise coprime')
elif is_sc:
    print('setwise coprime')
else:
    print('not coprime')
Buggy python submission (verdict: Time Limit Exceeded):
import sys
from collections import Counter

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 19
MOD = 10 ** 9 + 7
EPS = 10 ** -10

N = INT()

C = Counter()
for x in range(1, N+1):
    y = z = x
    n = x**2 + y**2 + z**2 + x*y + y*z + z*x
    C[n] += 1
for x in range(1, N+1):
    for y in range(1, N+1):
        if x == y:
            continue
        z = y
        n = x**2 + y**2 + z**2 + x*y + y*z + z*x
        C[n] += 3

for i in range(1, N+1):
    print(C[i])


Fixed submission:
import sys
from collections import Counter

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 19
MOD = 10 ** 9 + 7
EPS = 10 ** -10

N = INT()

C = Counter()
for x in range(1, N+1):
    for y in range(1, N+1):
        if x**2 + y**2 + x*y > N:
            break
        for z in range(1, N+1):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if n > N:
                break
            C[n] += 1

for i in range(1, N+1):
    print(C[i])