Harryxun/stf_run huggingface dataset:
N = int(input())

points = []
for i in range(0, N):
    xi, yi, hi = map(int, input().split())
    points.append((xi, yi, hi))

cand = {}
for CX in range(101):
    for CY in range(101):
        Hs = set()
        for x, y, h in points:
            H = h + abs(x - CX) + abs(y - CY)
            Hs.add(H)
        if len(Hs) == 1:
            cand[H] = (CX, CY, H)

CX, CY, H = cand[max(cand)]
print('{} {} {}'.format(CX, CY, H))


### FIXED CODE ###

N = int(input())

points = [None] * N
for i in range(0, N):
    points[i] = list(map(int, input().split()))

h_max = max([h for x, y, h in points])

for H in range(h_max + 100, h_max - 1, -1):
    for Cx in range(101):
        for Cy in range(101):
            ok = True
            for X, Y, h1 in points:
                h2 = max(H - abs(X - Cx) - abs(Y - Cy), 0)
                if h1 != h2:
                    ok = False
                    break
            if ok:
                print('{} {} {}'.format(Cx, Cy, H))
                exit()
import numpy as np

N, W = map(int, input().split())
dp = np.zeros(W + 1, dtype=np.int)
for _ in range(N):
  w, v = map(int, input().split())
  dp[w:] = np.maximum(dp[w:], dp[:-w] + v)
print(dp[W])

### FIXED CODE ###

import numpy as np

N, W = map(int, input().split())
dp = np.array([W + 1] * (N * 1000 + 1))
dp[0] = 0
for _ in range(N):
  w, v = map(int, input().split())
  dp[v:] = np.minimum(dp[v:], dp[:-v] + w)
max_value = 0
for v, w in enumerate(dp):
  if w <= W:
    max_value = v
print(max_value)
N = int(input())
A = list(map(int,input().split()))
sum = 0
for i in range(1, N):
   sum +=A[i-1]
   sum = sum % (10**9 + 7)
   ans = ans + (sum * A[i]) % (10**9 + 7)
   ans = ans % (10**9 + 7)
print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
sum = 0
ans = 0
for i in range(1, N):
   sum +=A[i-1]
   sum = sum % (10**9 + 7)
   ans = ans + (sum * A[i]) % (10**9 + 7)
   ans = ans % (10**9 + 7)
print(ans)
from collections import deque

k = int(input())
a = deque(range(1, 10))
cnt = 0

for i in range(k):
    x = a.popleft()
    mod = x % 10
    if mod != 0:
        a.append(x*10 + mod -1)
    a.append(x * 10 + mod)
    if mod != 9:
        a.append(x*10 + mod + 1)
    print(a)

print(x)

### FIXED CODE ###

from collections import deque

k = int(input())
a = deque(range(1, 10))

for i in range(k):
    x = a.popleft()
    mod = x % 10
    if mod != 0:
        a.append(x*10 + mod -1)
    a.append(x * 10 + mod)
    if mod != 9:
        a.append(x*10 + mod + 1)

print(x)
X, Y = map( int, input().split() )
if Y % X == 0 or X % Y == 0
   print( -1 )
else 
   print( X )

### FIXED CODE ###

X, Y = map( int, input().split() )
if X % Y == 0:
   print( -1 )
else :
   print( X )
A=int(input())
B=int(input())
if A>2*B:
    print(A-2*B)
else:
    print(0)

### FIXED CODE ###

A, B = map(int,input().split())
if A>2*B:
    print(A-2*B)
else:
    print(0)
def gcd(a,b):
    if b>a:
        a,b=b,a
    while b:
        a,b=b, a%b
    return a


def cul(n,a):
    l=len(a)
    b=[a[i] for i in range(l)]
    b.pop(n)
    tmp=b[0]
    for i in range(1,l-1):
        tmp=gcd(tmp,b[i])
    return tmp

import sys
import math
p=10
N=int(input())
a=list(map(int,input().split()))
if N<=p:
    ans=0
    
    for i in range(N):
        tmp=cul(i,a)        
        if tmp>ans: ans=tmp
    print(ans)
    sys.exit()
        
M=a[0]
for i in range(1,p):
    M=gcd(M,a[i])

ans=0
for i in range( math.ceil((M+1)**0.5) ):
    if M%i==0:
        cnt=0
        for j in range(p,N):
            if a[i]%i!=0:
                cnt+=1
                if cnt==2: break
            elif i==N-1 and i>ans: ans=i
        
        x=M//i
        cnt=0
        for j in range(p,N):
            if a[i]%x!=0:
                cnt+=1
                if cnt==2: break
            elif i==N-1 and x>ans: ans=i

r=a[N-1]
for i in range(N-1,p-1,-1):
    r=gcd(r,a[i])
if r>ans:
    for i in range(p):
        s=gcd(cul(i,a[:p]),r)
        if s>ans: ans=s

print(ans)

### FIXED CODE ###

def egcd(a, b):
    (x, lastx) = (0, 1)
    (y, lasty) = (1, 0)
    while b != 0:
        q = a // b
        (a, b) = (b, a % b)
        (x, lastx) = (lastx - q * x, x)
        (y, lasty) = (lasty - q * y, y)
    return a

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

l=[0]*N
l[0]=a[0]

for i in range(1,N):
    l[i]=egcd(l[i-1],a[i])

r=[0]*N
r[N-1]=a[N-1]
for i in range(N-2,-1,-1):
    r[i]=egcd(r[i+1],a[i])

ans=0
for i in range(N):
    if i==0: tmp=r[1]
    elif i==N-1: tmp=l[N-2]
    else: tmp=egcd(l[i-1],r[i+1])
    ans=max(tmp,ans)

print(ans)
# -*- coding: utf-8 -*-
import sys
from collections import defaultdict
R,C,K=map(int, sys.stdin.readline().split())

value=defaultdict(lambda: 0)
value=[ [0 for _ in range(C+1)] for __ in range(R+1) ]
for _ in range(K):
    r,c,v=map(int, sys.stdin.readline().split())
    value[r][c]]=v

dp0=[0]*(C+1)
dp1=[0]*(C+1)
dp2=[0]*(C+1)
dp3=[0]*(C+1)

#初期化
for c in range(1,C+1):
    dp0[c]=0
dp1[1]=value[(1,1)]

for r in range(1,R+1):
    for c in range(2,C+1):
        #今のマスにアイテムがある場合
        if 0<value[r][c]:
            #今のマスまでで1個取得=max(左のマスまでで1個取得, 今のマスで0個取得+v )
            dp1[c]=max( dp1[c-1], dp0[c])
            #今のマスまでで2個取得=max(左のマスまでで2個取得, 左のマスまでで1個取得+v)
            dp2[c]=max( dp2[c-1], dp1[c-1])
            #今のマスまでで3個取得=max(左のマスまでで3個取得, 左のマスまでで2個取得+v)
            dp3[c]=max( dp3[c-1], dp2[c-1])
        #今のマスにアイテムがない場合
        else:
            dp1[c]=dp1[c-1]
            dp2[c]=dp2[c-1]
            dp3[c]=dp3[c-1]
        
    #上の行にアイテムをコピー
    #for c in range(1,C+1):
    #    dp0[c]=max(dp0[c],dp1[c],dp2[c],dp3[c])
    #dp1=defaultdict(lambda: float("-inf")) 
    #dp2=defaultdict(lambda: float("-inf")) 
    #dp3=defaultdict(lambda: float("-inf")) 

print dp0[C]

### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
from collections import defaultdict
R,C,K=map(int, sys.stdin.readline().split())

value=defaultdict(lambda: 0)
value=[ [0 for _ in range(C+1)] for __ in range(R+1) ]
for _ in range(K):
    r,c,v=map(int, sys.stdin.readline().split())
    value[r][c]=v

dp0=[0]*(C+1)
dp1=[0]*(C+1)
dp2=[0]*(C+1)
dp3=[0]*(C+1)

#dp1[1]=value[1][1]

for r in range(1,R+1):
    for c in range(1,C+1):
        dp0[c]=max( dp0[c-1], dp0[c] )
        dp1[c]=max( dp1[c-1], dp1[c] )
        dp2[c]=max( dp2[c-1], dp2[c] )
        dp3[c]=max( dp3[c-1], dp3[c] )
        #今のマスにアイテムがある場合
        if 0<value[r][c]:
            dp3[c]=max( dp3[c-1], dp2[c]+value[r][c] )
            dp2[c]=max( dp2[c-1], dp1[c]+value[r][c] )
            dp1[c]=max( dp1[c-1], dp0[c]+value[r][c] )

    #上の行にアイテムをコピー
    for c in range(1,C+1):
        dp0[c]=max( dp0[c], dp1[c], dp2[c], dp3[c] )
    dp1=[0]*(C+1)
    dp2=[0]*(C+1)
    dp3=[0]*(C+1)

print dp0[C]
#dt = {} for i in x: dt[i] = dt.get(i,0)+1
#dt = {k:v for k,v in sorted(x.items(), key=lambda i: i[1])}
ipnl = lambda n: [input() for _ in range(n)]
inp = lambda :int(input())
ip = lambda :[int(w) for w in input().split()]
mp = lambda :map(int,input().split())

n = input()
x = inpl(n)
print(len(set(x)))

### FIXED CODE ###

#dt = {} for i in x: dt[i] = dt.get(i,0)+1
#dt = {k:v for k,v in sorted(x.items(), key=lambda i: i[1])}
ipnl = lambda n: [input() for _ in range(n)]
inp = lambda :int(input())
ip = lambda :[int(w) for w in input().split()]
mp = lambda :map(int,input().split())

n = inp()
x = ipnl(n)
print(len(set(x)))
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
for value in c:
  e==b.count(value)
  print("{0}x{1}".format(value,e))
  
  


### FIXED CODE ###

N = int(input())
s = [input() for i in range(N)]
for v in ['AC', 'WA', 'TLE', 'RE']:
  print('{0} x {1}'.format(v, s.count(v)))
n = (input()
a = []
for i in range(n):
     a.append(input())
  i+=1
for j in range(n):
     a.append(input())
   j+=1
max = a[j]-a[i]
 while i < n:
    while  j < n:
       if max < a[j]-a[i]:
          max = a[j]-a[i]
        j+ = 1
     i+ = 1
  print  max

### FIXED CODE ###

N = int(raw_input())
min = int(raw_input())
max = int(raw_input())

ans = max - min
if max < min:
    min = max
 
for i in range(N - 2):
    R = int(raw_input())
    if R - min > ans:
        ans = R - min
    if R < min:
        min = R
 
print ans
n = int(input())
s = input()
k = int(input())
for i in range(n):
  if s[i] == s[k]:
    s[i] = '*'
   

### FIXED CODE ###

n = int(input())
s = input()
k = int(input())
for i in s:
  if i == s[k-1]:
    print(i, end = '')
  else:
    print('*', end = '')
a,b,c = map(int,input().split())
cnt = 0
for i in range(1,min(b,c)):
  if a%i==0 and b%i==0:
    cnt++
    if cnt == c:
      print(i)
      break

### FIXED CODE ###

a, b, c = map(int, input().split())
cnt = 0
for i in range(min(a, b), 0, -1):
    if a % i == 0 and b % i == 0:
        cnt += 1
        if cnt == c:
            print(i)
            break
# 新ステージでは、一度全部どんぐりに直してから換金を始めるとしてよい

def F(N, A, B):
  # N個のどんぐりを、Aで換金してからBに持っていく
  # Bでどんぐりに直す
  A,B = zip(*((x,y) for x,y in zip(A,B) if x < y))
  dp = [0] * (N+1)
  for n in range(N+1):
    x = n
    for j in range(3):
      if n >= A[j]:
        y = dp[n-A[j]] + B[j]
        if x < y:
          x = y
    dp[n] = x
  return dp[N]

N = int(input())
A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]

answer = F(F(N,A,B),B,A)
print(answer)


### FIXED CODE ###

# 新ステージでは、一度全部どんぐりに直してから換金を始めるとしてよい

def F(N, A, B):
  # N個のどんぐりを、Aで換金してからBに持っていく
  # Bでどんぐりに直す
  dp = [0] * (N+1)
  for n in range(N+1):
    x = n
    for j in range(3):
      if n >= A[j]:
        y = dp[n-A[j]] + B[j]
        if x < y:
          x = y
    dp[n] = x
  return dp[N]

N = int(input())
A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]

answer = F(F(N,A,B),B,A)
print(answer)
import numpy as np

N, D = map(int, input().split())
X = np.zeros((N, D), np.int8)
for i in range(N):
  X[i,:] = list(map(int, input().split()))

#print(X)

ans = 0

for i in range(N):
  for j in range(i+1, N):
    dist = np.linalg.norm(X[i] - X[j])
    #print(i, j, dist)
    if dist - int(dist) == 0:
      ans += 1

print(ans)

### FIXED CODE ###

N, D = map(int, input().split())
X = []
for i in range(N):
  X.append(list(map(int, input().split())))
#print(X)

ans = 0
for i in range(N):
  for j in range(i+1, N):
    dist_sq = 0
    for x, y in zip(X[i], X[j]):
      dist_sq += (x - y) ** 2

    dist = dist_sq ** 0.5
    #print(i, j, dist)

    if dist - int(dist) == 0:
      ans += 1

print(ans)
n=int(input());s=list(input());print(n-len(set(tuple(sorted((i+1,int(s[i*2]))))for i in range(n))))


### FIXED CODE ###

n=int(input());s=input().split();print(n-len(set(tuple(sorted([i+1,int(s[i])]))for i in range(n))))
S=input()
ans=0
temp=0
for i in range(3):
    if S[i]=="R":
        temp+=1
    else:
        ans=temp
        temp=0
print(ans)
S=input()
ans=0
temp=0
for i in range(3):
    if S[i]=="R":
        temp+=1
    else:
        ans=temp
        temp=0
if ans<temp:
    ans=temp
print(ans)


### FIXED CODE ###

S=input()
ans=0
temp=0
for i in range(3):
    if S[i]=="R":
        temp+=1
    else:
        if ans<temp:
            ans=temp
        temp=0
if ans<temp:
    ans=temp
print(ans)
d, g = map(int, input().split())
p = [0]*d
c = [0]*d
for i in range(d):
  p[i], c[i] = map(int, input().split())

ans = 10**6

for i in range(2**d):
  cnt = 0
  sum = 0
  k = -1
  for j in range(d):
    if (i >> j) & 1:
      sum += (j+1)*100*p[j]+c[j]
      cnt += p[j]
    else:
      k = j
  if sum < g:
        s1 = 100 * (k + 1)
        need = (g - sum + s1 - 1) // s1
 
        if need >= p[k]:
            continue
 
        cnt += need
 
    ans = min(ans, cnt)
 
print(ans)
      
  

### FIXED CODE ###

d, g = map(int, input().split())
p = [0]*d
c = [0]*d
for i in range(d):
  p[i], c[i] = map(int, input().split())
 
ans = 10**6

for i in range(2**d):
  cnt = 0
  sum = 0
  k = -1
  for j in range(d):
    if (i >> j) & 1:
      sum += (j+1)*100*p[j]+c[j]
      cnt += p[j]
    else:
      k = j
  if sum < g:
    s1 = 100 * (k + 1)
    need = (g - sum + s1 - 1) // s1
    if need >= p[k]:
      continue
    cnt += need
  ans = min(ans, cnt)
print(ans)
N, M = map(int, input().split())
if N == 1:
    print(1)
    exit()

a = [int(input()) for i in range(M)]
ans = [0] * (N+1)
ans[0] = 1
if a[0] != 1:   ans[1] = 1
else:   pass
for i in range(2, N+1):
    if a.count(i) >= 1:
        ans[i] = 0
    else:
        ans[i] = (ans[i-1] + ans[i-2]) % (10**9+7)
print(ans[N])

### FIXED CODE ###

import bisect
N, M = map(int, input().split())
if N == 1:
    print(1)
    exit()

a = [int(input()) for i in range(M)]
broken = [0]*(N+1)
for i in range(M):
    broken[a[i]] = 1
if M == 0:  a.append(0)
ans = [0] * (N+1)
ans[0] = 1
if a[0] != 1:   ans[1] = 1
else:   pass
for i in range(2, N+1):
    if broken[i] == 1:
        ans[i] = 0
    else:
        ans[i] = (ans[i-1] + ans[i-2]) % (10**9+7)
print(ans[N])
ans=input()
if ans.find!=-1:
    print "Yes"
else:
    print "No"

### FIXED CODE ###

ans=raw_input()
if ans.find('AC')!=-1:
    print "Yes"
else:
    print "No"
X,K,D = map(int,input().split())
X = abs(X)
#0またがない
if X > K*D:
    ans = X - K*D
#0またぐ
else:
    while X >= 0 :
        X = X - D
        K -= 1
    if K % 2 == 0:
        ans = abs(X)
    if K % 2 != 0:
        ans = X+D

print(ans)

### FIXED CODE ###

S = input()
s = list(S)
if S == "RSR":
    print(1)
else:
    print(s.count('R'))
a = input()
b = input()
print(int(a)*int(b),2*(int(a)+int(b)))

### FIXED CODE ###

a,b = map(int,input().split())
print(a*b,2*(a+b))
s = input()
txt = []

for c in s:
  if c == 'B' && len(txt) > 0:
    txt.pop()
  elif:
    txt.append(c)
    
print(''.join(txt))

### FIXED CODE ###

s = input()
txt = []

for c in s:
    if c == 'B':
        if len(txt):
            txt.pop()
    else:
        txt.append(c)

print(''.join(txt))
import sys
input = sys.stdin.readline

import numpy as np

n, m = map(int, input().split())
*a, = map(int, input().split()) 

a = np.array(a)
tmp = (a/2).astype(np.int)
lcm = np.lcm.reduce(tmp)

max_a = max(a)
if max_a%lcm == 0:
    lcm = lcm * (max(a)//lcm)
else:
    lcm = lcm * (max(a)//lcm+1)

if m < lcm:
    print(0)
else:
    if m%lcm == 0:
        print(m//lcm)
    else:
        print(m//lcm+1)

### FIXED CODE ###

import sys
input = sys.stdin.readline

n, m = map(int, input().split())
*a, = map(int, input().split()) 

a = [ai >> 1 for ai in a]

import fractions
from functools import reduce

def getLCM(a, b):
    return a * b // fractions.gcd(a, b)

def f(x):
    cnt = 0
    while x%2 == 0:
        x //= 2
        cnt += 1
    return cnt

cnt = f(a[0])
for i in range(1, len(a)):
    if cnt != f(a[i]):
        print(0)
        break
else:
    lcm = reduce(lambda x, y: getLCM(x, y), a)
    ans = (m-lcm) // (lcm*2) + 1 if m >= lcm else 0
    print(ans)
#

import sys
input=sys.stdin.readline

MOD=10**9+7
            
def main():
    N=int(input())
    A=list(map(int,input().split()))
    if N==1:
        print(1)
        exit()
    kl=[0]*(10**6+1)
    for j in range(N):
        n=A[j]
        for i in range(2,int((n)**0.5)+1):
            if n%i==0:
                cnt=0
                while(n%i==0):
                    n/=i
                    cnt+=1
                if kl[i]<cnt:
                    kl[i]=cnt
        if n!=1:
            if kl[n]<1:
                kl[n]=1
                
    lcm=1
    for i in range(2,10**6+1):
        lcm*=pow(i, kl[i], MOD)
    ans=0
    for i in range(N):
        ans+=pow(A[i],MOD-2,MOD)
        ans%=MOD
    print(lcm*ans%MOD)
    
    
    
if __name__=="__main__":
    main()


### FIXED CODE ###

#

import sys
input=sys.stdin.readline

MOD=10**9+7
kl = [0]*(10**6+1)

            
def main():
    N=int(input())
    A=list(map(int,input().split()))
    if N==1:
        print(1)
        exit()
    for j in range(N):
        n=A[j]
        for i in range(2,int((n)**0.5)+1):
            if n%i==0:
                cnt=0
                while(n%i==0):
                    n//=i
                    cnt+=1
                if kl[i]<cnt:
                    kl[i]=cnt
        if n!=1:
            if kl[n]<1:
                kl[n]=1
                
    lcm=1
    for i in range(2,10**6+1):
        lcm*=pow(i, kl[i], MOD)

    modsum=0
    for i in range(N):
        modsum+=pow(A[i],MOD-2,MOD)

    ans = lcm*modsum%MOD
    print(ans)
    
    
    
if __name__=="__main__":
    main()
import numpy as np

n, k, q = map(int, input().split())
a = [int(input()) for i in range(q)]

players_score = np.array([k for i in range(n)])
for item in a:
    players_score -= 1
    players_score[item-1] += 1

for i in players_score:
    if i <= 0:
        print("No")
    else:
        print("Yes")


### FIXED CODE ###

import numpy as np

n, k, q = map(int, input().split())
a = np.array([int(input()) for i in range(q)])

players_score = np.full(n, k-q)

for item in a:
    players_score[item-1] += 1

for i in players_score:
    if i <= 0:
        print("No")
    else:
        print("Yes")
def main();
  num = int(input())
  print(num ** 3)
  return

### FIXED CODE ###

# -*- coding: utf-8 -*-
def main():
  num = int(input())
  print(num ** 3)
  return

if __name__ == '__main__':
  main()
from collections import deque
true_letter = input()
Q= int(input())
letter = deque(['*'])
reversed = False
for i in range(Q):
    query = input().split()
    if len(query)==1:
        reversed = not bool(reversed)
    else:
        if int(query[1])==1: #まえに追加
            if reversed == False:
                letter.insert(0,query[2])
            else:
                letter.append(query[2])
        else:
            if reversed == False:
                letter.append(query[2])
            else:
                letter.insert(0,query[2])
if reversed==True:
    letter.reverse()

output = ''.join(letter)
output = output.replace('*',true_letter)
print(output)


### FIXED CODE ###

from collections import deque
letter = deque(input())
Q= int(input())
reversed = False
for i in range(Q):
    query = input().split()
    if len(query)==1:
        reversed = not bool(reversed)
    else:
        if int(query[1])==1: #まえに追加
            if reversed == False:
                letter.appendleft(query[2])
            else:
                letter.append(query[2])
        else:
            if reversed == False:
                letter.append(query[2])
            else:
                letter.appendleft(query[2])
if reversed==True:
    letter.reverse()

output = ''.join(letter)
print(output)
n = raw_input()

n_dec = int(n) / 10
n_one = int(n) % 10

if(n_one ==9):
    print("Yes")
elif(n_dec == 9):
    print("Yes")
else:
    print("No")


### FIXED CODE ###


n = raw_input()

n_dec = int(n) / 10
n_one = int(n) % 10

if(n_one == 9):
    print("Yes")
elif(n_dec == 9):
    print("Yes")
else:
    print("No")
A,B,N=map(int,input().split())
if N>=B:
    print(int(A*(B-1)/B)-A*int((B-1)/B))
else:
    print(int(A*N/B)-A*int(N/B))

### FIXED CODE ###

K=int(input())
A,B=map(int,input().split())
a=0
for i in range(A,B+1):
    if i%K==0:
        a=1
        print("OK")
        break
if a!=1:
    print("NG")
N,X = map(int, input().split())


def para(a,b):
    if a == b:
        return a
    if a > b:
        return 2*b + para(b,a-b)
    if a < b:
        return 2*a + para(a,b-a)

print(N+para(X,N-X))

### FIXED CODE ###

N,X = map(int,input().split(" "))
 
Y,X = sorted([N - X,X])
 
s = 0
while Y:
    s += (X//Y)*Y*3
    Y,X = [X%Y,Y]
 
print(s)
import sys
s = sys.stdin.readline().strip()
c_find = Fasle
f_find = False
for c in s:
    if c_find:
        if c == 'F':
            print 'Yes'
            exit(0)
    else:
        if c == 'C':
            c_find = True
print 'No'

### FIXED CODE ###

import sys 
s = sys.stdin.readline().strip()
c_find = False                                                                                                                                                                                                                        
f_find = False
for c in s:
    if c_find:
        if c == 'F':
            print 'Yes'
            exit(0)
    else:
        if c == 'C':
            c_find = True
print 'No'
a = {(1,2,3)}- int(input())
print(a-int(input()))

### FIXED CODE ###

X = {1,2,3}
a = {int(input())}
b = {int(input())}
print(list(X-a-b)[0])
L = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(L[int(input()]-1))

### FIXED CODE ###

L = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(L[int(input())-1])
import string

S = input()
if len(S) < 26:
    for c in string.ascii_lowercase:
        if c not in S:
            break
    print(S + c)
else:
    ret = None
    for i in range(26):
        if max(S[25-i:]) != S[25-i]:
            mc = 'z'
            for c in S[25-i:]:
                if c > S[25-i]:
                    mc = min(c, mc)
            ret = S[:25-i] + mc
            break
            
    if ret is None:
        print(-1)
    else:
        print(ret)
S = input()
if len(S) < 26:
    for c in string.ascii_lowercase:
        if c not in S:
            break
    print(S + c)
else:
    ret = None
    for i in range(26):
        if max(S[25-i:]) != S[25-i]:
            mc = 'z'
            for c in S[25-i:]:
                if c > S[25-i]:
                    mc = min(c, mc)
            ret = S[:25-i] + mc
            break
            
    if ret is None:
        print(-1)
    else:
        print(ret)


### FIXED CODE ###

import string
 
S = input()
if len(S) < 26:
    for c in string.ascii_lowercase:
        if c not in S:
            break
    print(S + c)
else:
    ret = None
    for i in range(26):
        if max(S[25-i:]) != S[25-i]:
            mc = 'z'
            for c in S[25-i:]:
                if c > S[25-i]:
                    mc = min(c, mc)
            ret = S[:25-i] + mc
            break
            
    if ret is None:
        print(-1)
    else:
        print(ret)
a, b=(int(i) for i in input().split())

import fractions

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

print(lcm(a, b))
# 12



### FIXED CODE ###


A=int(input())
B=int(input())

if (A==1) and (B==2):
    print(3)
elif (A==1) and (B==3):
    print(2)
elif (A==2) and (B==1):
    print(3)
elif (A==2) and (B==3):
    print(1)
elif (A==3) and (B==1):
    print(2)
elif (A==3) and (B==2):
    print(1)
a,b,c=map(int,input().split())
x=max(a,max(b,c))
input(a+b+c-x)


### FIXED CODE ###

da=list(map(int,input().split()))
x=-max(da)
for i in da:
    x+=i
print(x)
n = int(input())
h = [int(x) for x in input().split()]
h_max = max(h)

if n == 1:
    print('Yes')
elif h_max - 1 <= h[n-1]:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

a, b, c = (int(x) for x in input().split())
if c > (a-b):
    print(c-(a-b))
else:
    print(0)
def get_quad(n, p):
    return 0
        
def sieve():
    n = 10000001
    p = [1] * n
    p[0] = p[1] = 0
    
    for i in range(int(n ** 0.5)):
        if p[i]:
            for j in range(2 * i, len(p), i):
                p[j] = 0
    return p
import sys
f = sys.stdin

prime = sieve()
while True:
    ni = int(f.readline())
    if ni == 0:
        break
    print(get_quad(ni, prime))

### FIXED CODE ###

def get_quad(n, p):
    if n < 19:
        return 13
    n = (n + 1) // 10 * 10 - 1
    for ni in range(n,0,-10):
        if p[ni] and p[ni - 2] and p[ni - 6] and p[ni - 8]:
            return ni
        
def sieve():
    n = 10000001
    p = [1] * n
    p[0] = p[1] = 0
    
    for i in range(int(n ** 0.5)):
        if p[i]:
            for j in range(2 * i, len(p), i):
                p[j] = 0
    return p

import sys
f = sys.stdin

prime = sieve()
while True:
    n = f.readline().strip()
    if not n.isdigit():
        continue
    n = int(n)
    if n == 0:
        break
    print(get_quad(n, prime))
N = int(input())
if N == 1:
    print('Hello World)
if N == 2:
    A == int(input())
    B == int(input())
    print(A+B)

### FIXED CODE ###

N = int(input())
if N == 1:
    print('Hello World')
else:
    A =int(input())
    B =int(input())
    print(A+B)