Harryxun/stf_run huggingface dataset:
from math import gcd
def main():
    n = int(input())
    a = list(map(int, input().split()))
    ar = a[::-1]
    lgcds = [1]*n
    rgcds = [1]*n
    lgcd, rgcd = a[0], ar[0]
    lgcds[0] = rgcd
    lgcds[1] = lgcd
    rgcds[n-1] = lgcd
    rgcds[n-2] = rgcd
    for i in range(2, n):
        lgcd = gcd(lgcd, a[i])
        rgcd = gcd(rgcd, ar[i])
        lgcds[i] = lgcd
        rgcds[n-1-i] = rgcd
    ans = 1
    for i in range(n):
        gi = gcd(lgcds[i], rgcds[i])
        if gi > ans:
            ans = gi
    print(ans)
    

if __name__ == "__main__":
    main()

### FIXED CODE ###

from fractions import gcd
def main():
    n = int(input())
    a = list(map(int, input().split()))
    ar = a[::-1]
    lgcds = [1]*n
    rgcds = [1]*n
    lgcd, rgcd = a[0], ar[0]
    lgcds[0] = rgcd
    lgcds[1] = lgcd
    rgcds[n-1] = lgcd
    rgcds[n-2] = rgcd
    for i in range(2, n):
        lgcd = gcd(lgcd, a[i-1])
        rgcd = gcd(rgcd, ar[i-1])
        lgcds[i] = lgcd
        rgcds[n-1-i] = rgcd
    ans = 1
    for i in range(n):
        gi = gcd(lgcds[i], rgcds[i])
        if gi > ans:
            ans = gi
    print(ans)
    

if __name__ == "__main__":
    main()
from scipy.special import comb

url = "https://atcoder.jp//contests/abc094/tasks/arc095_b"

def main():
    input()
    t = list(map(int, input().split()))
    combs = {}
    for i in range(len(t)):
        for j in range(i + 1, len(t)):
            tmp = sorted([t[i], t[j]], reverse=True)
            combs[comb(tmp[0], tmp[1], exact=True)] = tmp[::]
    key = max(combs.keys())
    print(' '.join([str(v) for v in combs[key]]))

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main3():
    input()
    t = sorted(list(map(int, input().split())))
    ma = t.pop(-1)
    r = min(t, key=lambda x: abs(x - ma / 2))
    print(ma, r)

if __name__ == '__main__':
    main3()
def main():
    import sys
    from collections import deque

    N,M=list(map(int,sys.stdin.readline().split()))
    dic=[[] for _ in range(100001)]
    sys.setrecursionlimit(100001)
    mark=[0]*N
    for i in range(M):
        A,B=list(map(int,sys.stdin.readline().split()))
        dic[A-1].append(B-1)
        dic[B-1].append(A-1)


    i=0
    count=0
    while True:
        if not mark[i]:
            count+=1
            d=deque()
            d.appendleft(i)
            while d:
                a=d.popleft()
                mark[a]=1
                for j in dic[a]:
                    if mark[j]:
                        continue
                    
                    d.appendleft(j)
        i+=1
        if i==N:
            break
    
    print(count-1)
main()

### FIXED CODE ###

def main():
    import sys
    from bisect import bisect_left
    N,K=list(map(int,sys.stdin.readline().split()))
    A=[0]*N
    for i in range(N):
        A[i]=int(sys.stdin.readline())

    dp=[0]*(N+1)
    dp[0]=1
    if abs(A[0]-A[1])<=K:
        dp[1]=2
    else:
        dp[1]=1
    
    for i in range(2,N):
        mx=1
        for j in range(1,105):
            if i-j<0:
                break
            if abs(A[i-j]-A[i])<=K:
                mx=max(mx,dp[i-j]+1)

        dp[i]=mx

    print(max(dp))


main()
# coding: utf-8
import sys
sys.setrecursionlimit(1000000000)
N,M,K=map(int,input().split())
MOD=998244353

MAX_N=10**6

#a**n mod p を再帰的に求める
def modPow(a,n,p):
    if n == 1:
        #n=1ならaを返す
        return a % p

    elif n % 2 == 1:
        #nが奇数ならば a * modPow(a,n-1(偶数),p)を返す
        return a * modPow(a,n-1,p) % p

    else:
        #nが偶数なら modPow(a,n//2,p) * modPow(a,n//2,p)とすると速い
        t = modPow(a,n//2,p)
        return t * t % p

fac=[None for i in range(MAX_N)]
finv=[None for i in range(MAX_N)]
inv=[None for i in range(MAX_N)]

def COMinit(num):
    global fac
    global finv
    global inv
    fac[0]=1
    fac[1]=1
    finv[0]=1
    finv[1]=1
    inv[1]=1

    for i in range(2,num):
        fac[i] = fac[i-1] * i % MOD
        inv[i] = MOD - inv[MOD%i] * (MOD // i) % MOD
        finv[i] = finv[i-1] * inv[i] % MOD

def COM(n,k):
    if n<k:
        return 0
    elif n<0 or k<0:
        return 0
    else:
        return int(fac[n] * (finv[k] * finv[n - k] % MOD) % MOD)


COMinit(MAX_N)

ans=0

for i in range(K+1):
    ans+=COM(N-1,N-1-K+i)*M*modPow(M-1,N-1-K+i,MOD)
    ans=ans%MOD
print(ans)

### FIXED CODE ###

# coding: utf-8
import sys
sys.setrecursionlimit(1000000)
N,M,K=map(int,input().split())
MOD=998244353

MAX_N=N+10

#a**n mod p を再帰的に求める
def modPow(a,n,p):
    if n==0:
        return 1
    if n == 1:
        #n=1ならaを返す
        return a % p

    elif n % 2 == 1:
        #nが奇数ならば a * modPow(a,n-1(偶数),p)を返す
        return a * modPow(a,n-1,p) % p

    else:
        #nが偶数なら modPow(a,n//2,p) * modPow(a,n//2,p)とすると速い
        t = modPow(a,n//2,p)
        return t * t % p

fac=[None for i in range(MAX_N)]
finv=[None for i in range(MAX_N)]
inv=[None for i in range(MAX_N)]

def COMinit(num):
    global fac
    global finv
    global inv
    fac[0]=1
    fac[1]=1
    finv[0]=1
    finv[1]=1
    inv[1]=1

    for i in range(2,num):
        fac[i] = fac[i-1] * i % MOD
        inv[i] = MOD - inv[MOD%i] * (MOD // i) % MOD
        finv[i] = finv[i-1] * inv[i] % MOD

def COM(n,k):
    if n<k:
        return 0
    elif n<0 or k<0:
        return 0
    else:
        return int(fac[n] * (finv[k] * finv[n - k] % MOD) % MOD)


COMinit(MAX_N)

ans=0

for i in range(K+1):
    v=COM(N-1,N-1-K+i)%MOD
    v*=M
    v=v%MOD
    v*=modPow(M-1,N-1-K+i,MOD)
    v=v%MOD
    ans+=v
    ans=ans%MOD
print(ans)
S = input()
list = []
counter = 0
for i in range(len(S)):
    if S[i] == 'A' or S[i] == 'T' or S[i] == 'G' or S[i] == 'C':
        counter += 1
    else:
        list.append(counter)
        counter = 0
print(max(list))




### FIXED CODE ###

S = input()
list = []
counter = 0
for i in range(len(S)):
    if S[i] == 'A' or S[i] == 'T' or S[i] == 'G' or S[i] == 'C':
        counter += 1
    else:
        counter = 0
    list.append(counter)
print(max(list))
import math
 
DISTANCE_NUM=0
 
N,D=(int(x) for x in input.split())
 
for _ in range(N)
  x,y=(int(x) for x in input.split())
  distance=math.sqrt(x**2+y**2)
  
  if distance <= D:
    DISTANCE_NUM+=1
    
print(DISTANCE_NUM)

### FIXED CODE ###

import math
 
DISTANCE_NUM=0
 
N,D=map(int,input().split())
 
for _ in range(N):
  x,y=map(int,input().split())
  distance=math.sqrt(x**2+y**2)
  
  if distance <= D:
    DISTANCE_NUM+=1
    
print(DISTANCE_NUM)
i = input()

prev = ""
res = 0
index = 0
col = []
while index < len(i):
    temp = i[index]
    if temp == prev:
        prev = i[index:index+2]
	if index == len(i)-1:
            res -= 1
	index += 2

    else:
        prev = temp
        index += 1
    col.append(prev)
    res += 1

print(res)

### FIXED CODE ###

i = input()

prev = ""
res = 0
index = 0
while index < len(i):
    temp = i[index]
    if temp == prev:
        prev = i[index:index+2]
        if index == len(i)-1:
            res -= 1
        index += 2

    else:
        prev = temp
        index += 1

    res += 1

print(res)
from heapq import heapify,heappush,heappop
N, K = map(int,input().split())
A = list(map(int, input().split()))
MOD =1_000_000_007

B = [a for a in A if a > 0]
C = [a for a in A if a<= 0]
B.sort()
C.sort(reverse = True)
ans = 1
if N == K:
  for a in A:
    ans *= a
    ans %= MOD
elif len(B) == 0 and K % 2 == 1:
  for i in range(K):
    ans *= C[i]
    ans %= MOD
else:
  if K % 2 == 1:
    ans *= B[-1]
    B.pop()
    K -= 1
  i = 0 
  j = 0
  k = 0
  while k < K:
    if len(C) < 2 or B[-1]*B[-2] > C[-1] * C[-2]:
      ans *= B[-1]*B[-2]
      ans %= MOD
      B.pop()
      B.pop()
    else:
      ans *= C[-1]*C[-2]
      ans %= MOD
      C.pop()
      C.pop()
    print(B,C)
    k += 2

print(ans)

### FIXED CODE ###

from heapq import heapify,heappush,heappop
N, K = map(int,input().split())
A = list(map(int, input().split()))
MOD =1_000_000_007

B = [a for a in A if a > 0]
C = [a for a in A if a<= 0]
B.sort()
C.sort(reverse = True)
ans = 1
if N == K:
  for a in A:
    ans *= a
    ans %= MOD
elif len(B) == 0 and K % 2 == 1:
  for i in range(K):
    ans *= C[i]
    ans %= MOD
else:
  if K % 2 == 1:
    ans *= B[-1]
    B.pop()
    K -= 1
  i = 0 
  j = 0
  k = 0
  while k < K:
    #print(B,C)
    flag = 0 #Bから二つとる時に0,Cから二つとる時に1,それ以外2
    if len(B) >= 2 and len(C) >= 2 and B[-1]*B[-2] < C[-1]*C[-2]:
      flag = 1
    elif len(B) <= 1 and len(C) >= 2:
      flag = 1
    elif len(B) == 1 and len(C) == 1:
      flag = 2
      
    if flag == 0:  
      ans *= B[-1]*B[-2]
      ans %= MOD
      B.pop()
      B.pop()
    
    elif flag == 1:
      ans *= C[-1]*C[-2]
      ans %= MOD
      C.pop()
      C.pop()
      
    elif flag == 2:
      ans *= C[-1]*B[-1]
      ans %= MOD
      B.pop()
      C.pop()
    
    k += 2

print(ans)
N = int(input())
S = input()

i, j = 0, 1
count = 0
while 1:
  while S[i] == S[j]:
    j += 1
    if j == N:	break
  if j == N:
    count += 1
    break
  elif S[i] != S[j] and j == N-1:
    count += 2
    break
  else:
    count += 1
    i = j
    j += 1
    if j == N:
      count += 1
      break
print(count)

### FIXED CODE ###

N = int(input())
S = input()

i, j = 0, 1
count = 0
if N == 1:
  print(1)
else:
  while j < N:
    if j < N-1:
      if S[i] == S[j]:
        j += 1
      elif S[i] != S[j]:
        count += 1
        i = j
        j += 1
    elif j == N-1:
      if S[i] == S[j]:
        count += 1
      elif S[i] != S[j]:
        count += 2
      break
  print(count)
def lcs_size():
  X = input()
  Y = input()
  
  a = len(X)
  b = len(Y)
  
  z2 = [0 for in range(b+1)]
  maxl = 0
  for i in range(a):
    z1 = z2 + []
    for j in range(b):
      if X[i] == Y[j]:
        z2[j+1] = z1[j] + 1
      else:
        z2[j+1] = z2[j]
      maxl = max(maxl, z2[j+1])
  
  return maxl

q = input()

for i in range(q):
  print lcs_siz()

### FIXED CODE ###

def lcs_size():
  X = raw_input()
  Y = raw_input()
  a = len(X)
  b = len(Y)
  z2 = [0 for i in range(b+1)]

  for i in range(a):
    ch = X[i]
    z1 = z2 + []
    for j in range(b):
      if ch == Y[j]:
        z2[j+1] = z1[j] + 1
      elif z2[j+1] < z2[j]:
        z2[j+1] = z2[j]

  return z2[-1]

q = input()
for k in range(q):
  print lcs_size()
from collections import Counter
n, k = map(int, input().split())
a_list = list(map(int, input().split()))
b = Counter(a_list)
b_list = sorted(b.items(), key=lambda x:x[1])
for i in b_list.values[:k]:
    d = sum(i)
print(n-d)

### FIXED CODE ###

import collections
n, k = map(int, input().split())
a_list = list(map(int, input().split()))
b = collections.Counter(a_list)
d = b.most_common()[k:]
sum = 0
for i in d:
    sum += i[1]
print(sum)
n = int(input())
s = input()

if n % 2 == 1:
  print('No')
else:
  s1 = s[: n//2)]
  s2 = s[n//2: ]
  
  if s1 == s2:
    print('Yes')
  else:
    print('No')


### FIXED CODE ###

n = int(input())
s = input()

if n % 2 == 1:
  print('No')
else:
  m = int(n/2)
  s1 = s[: m]
  s2 = s[m: ]
  
  if s1 == s2:
    print('Yes')
  else:
    print('No')
i,x = 0,input()
while x != 0':
  print("Case ' i ': ' x)
  i,x = i+1, input()


### FIXED CODE ###

i,x = 1,input()
while x != "0":
  print('Case '+str(i)+': '+x)
  i,x = i+1,input()
a,b = input( , )

print(2*a + 2* b, a*b)

### FIXED CODE ###

nums = input().split(" ")
a =int( nums[0])
b = int(nums[1])

print(a*b, (a+b)*2)
N = input()
A = list(map(int,input().split()))
mult = 1
for i in range(N):
  mult *= A[i]
  if mult > 1e18:
    break

if mult > 1e18:
  print(mult)
else:
  print(-1)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
mult = 1
 
if 0 in A:
  mult = 0
  
for i in range(N):
  mult *= A[i]
  if mult > 1e18:
    print(-1)
    break

if mult <= 1e18:
  print(mult)
import sys

x, n = map(int, input().split())
pn = list(map(int, sys.stdin.readline().rstrip().split()))

qn = set([i for i in range(1,101)]) - set(pn)

qn = list(qn)


if x-qn[0]<0:
    print(qn[0])
    exit(0)
if x-qn[-1]>=0:
    print(qn[-1])
    exit(0)

for i in range(100-n):
    if qn[i]==x:
        print(x)
        exit(0)
    elif x-qn[i+1]<0:
        if x-qn[i] <= qn[i+1]-x:
            print(qn[i])
            exit(0)
        elif x-qn[i] > qn[i+1]-x:
            print(qn[i+1])
            exit(0)

### FIXED CODE ###

import sys

x, n = map(int, input().split())
pn = list(map(int, sys.stdin.readline().rstrip().split()))

if x not in pn:
    print(x)
    exit(0)

for i in range(1,100):
    if x-i not in pn:
        print(x-i)
        exit(0)
    elif x+i not in pn:
        print(x + i)
        exit(0)
def sol(x,y):
    row = {}
    col = {}
    for i in x:
        if i not in row:
            row[i] = 1
        else:
            row[i] += 1
    for i in y:
        if i not in col:
            col[i] = 1
        else:
            col[i] += 1
    maxRow = 0
    maxCol = 0
    mR = 0
    mC = 0
    for i in row:
        if row[i]>mR:
            mR = row[i]
            maxRow = i
    for i in col:
        if col[i]>mC:
            mC = col[i]
            maxCol = i
    rd = {}
    cd = {}
    for i in row:
        if row[i] == mR:
            rd.add(i)
    for i in col:
        if row[i] == mC:
            cd.add(i)
    diff = rd.difference(cd)
    s = mR+mC
    if len(diff) == 0:
        s-=1
        print(s)
        return
    print(s)
    return

x,y,z = list(map(int,input().split(' ')))
row = []
col = []
for i in range(z):
    p = list(map(int,input().split(' ')))
    row.append(p[0])
    col.append(p[1])
sol(row,col)


### FIXED CODE ###

from math import ceil
N,X,T = list(map(int,input().split(' ')))
p = ceil(N/X)
print(p*T)
n, m = [int(i) for i in input().split()]
a = [-1] + [int(input()) for _ in range(m)] + [n+1]

fib_l = [-1] * n

def fib(step):
    if fib_l[step] != -1:
        return fib_l[step]
    if 0 <= step <= 1:
        return 1
    else:
        t = fib(step-1) + fib(step-2)
        fib_l[step] = t
        return t

ret = 1
for i in range(m+1):
    ret *= fib(a[i+1] - a[i] - 2)
print(ret % 1000000007)

### FIXED CODE ###

n, m = [int(i) for i in input().split()]
a = [-1] + [int(input()) for _ in range(m)] + [n+1]

fib_l = [-1] * (n+3)

def make_fib(n):
    fib_l[0] = fib_l[1] = 1
    for i in range(2, n):
        fib_l[i] = fib_l[i-1] + fib_l[i-2]

make_fib(n+3)
ret = 1
for i in range(m+1):
    t = a[i+1] - a[i] - 2
    if t < 0:
        ret = 0
        break
    ret *= fib_l[t]
print(ret % 1000000007)
import sys
for rec in sys.stdin.readlines():
    while len(d)>1:
        tmp=[]
        for i in range(1,len(d)):
            tmp.append((d[i-1]+d[i])%10)
        d=tmp
    print d[0]

### FIXED CODE ###

import sys
for rec in sys.stdin.readlines():
    d=map(int,list(rec.rstrip()))
    while len(d)>1:
        tmp=[]
        for i in range(1,len(d)):
            tmp.append((d[i-1]+d[i])%10)
        d=tmp
    print d[0]
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
A,B=map(int,(input().split()))    
print(lcm(A, B))

### FIXED CODE ###

import fractions

A,B=map(int,(input().split()))    
ABgcd=fractions.gcd(A,B)
answer=A*B//ABgcd
print(answer)
A, B, C = map(int, input().split())

is_odd_list = [A % 2 == 0, B % 2 == 0, C % 2 == 0]
if all(is_odd_list) or not any(is_odd_list):
    ans = 0
else:
    if sum(is_odd_list) == 1:
        is_odd_list = not is_odd_list
    A = A + is_odd_list[0]
    B = B + is_odd_list[1]
    C = C + is_odd_list[2]
    ans = 1

num_list = sorted([A, B, C])
ans += (num_list[2] - num_list[0]) / 2 + (num_list[2] - num_list[1]) / 2
print(int(ans))

### FIXED CODE ###

A, B, C = map(int, input().split())

is_odd_list = [A % 2 == 0, B % 2 == 0, C % 2 == 0]
if all(is_odd_list) or not any(is_odd_list):
    ans = 0
else:
    if sum(is_odd_list) == 1:
        is_odd_list = [not i for i in is_odd_list]
    A = A + is_odd_list[0]
    B = B + is_odd_list[1]
    C = C + is_odd_list[2]
    ans = 1

num_list = sorted([A, B, C])
ans += (num_list[2] - num_list[0]) / 2 + (num_list[2] - num_list[1]) / 2
print(int(ans))
N = int(input() )
for i in range(N):
  C[i] = [map(int, input().split() ) ]
 
C.sort(key= lambda s:(s[1],s[0]) )
 
judge = "Yes"
time = 0
for i in range(N):
  time += C[i][0]
  if time > C[i][1]:
    judge = "No"
    break
print(judge)

### FIXED CODE ###

S = input()
judge = "Good"
for num in range(3):
  if int(S[num]) == int(S[num + 1]):
    judge = "Bad"
    break
print(judge)
n=raw_input()
k=n.split(" ")

W=int(k[0])
H=int(k[1])
x=int(k[2])
y=int(k[3])
r=int(k[4])
f=0

if x-r>=0:
  if x+r<=W:
    if y-r>=0:
      if y+r<=H
        print "Yes"
        f=1
if f==0:
  print "No"

### FIXED CODE ###


n=raw_input()
k=n.split(" ")

W=int(k[0])
H=int(k[1])
x=int(k[2])
y=int(k[3])
r=int(k[4])
f=0

if 0<=x-r<=x+r<=W:
  if 0<=y-r<=y+r<=H:
    print "Yes"
    f=1
if f==0:
  print "No"
from scipy.special import comb
n = int(input())
List = list(map(int, input().split()))
List.sort()
idx = n // 2
ans = List[idx]-List[idx-1]
print(ans)

### FIXED CODE ###

n = int(input())
List = list(map(int, input().split()))
List.sort()
idx = n // 2
ans = List[idx]-List[idx-1]
print(ans)
r,c=map(int, input().split())
S=[]
for num in range(c-1):
  A=list(map(int, input().split()))
  S.append(A)
  A.append(sum(A))

#print(list(zip(*S)))
C=[]
for t in (zip(*S)):
  C.append(sum(t))
S.append(C)
for i in S:
  print(*i)



### FIXED CODE ###

r,c=map(int, input().split())
S=[]
for num in range(r):
  A=list(map(int, input().split()))
  S.append(A)
  A.append(sum(A))

#print(list(zip(*S)))
C=[]
for t in (zip(*S)):
  C.append(sum(t))
S.append(C)
for i in S:
  print(*i)
import sys
import numpy as np
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
X, Y, A, B, C = [int(x) for x in input().strip().split()]
p = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:X]
q = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:Y]
r = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:X+Y]

pi, qi, ri = X-1, Y-1, 0
tp, tq, tr = p[pi], q[qi], r[ri]
ans = 0
while pi >= 0 or qi >= 0:
    if tp >= tr and  tq >= tr:
        break
    elif tp < tr and tq < tr:
        if tp < tq:
            p[pi] = r[ri]
            pi -= 1
            ri += 1
        else:
            q[qi] = r[ri]
            qi -= 1
            ri += 1
    else:
        if tp < tr:
            p[pi] = r[ri]
            ri += 1
            pi -= 1
            tp = p[pi]
        else:
            q[qi] = r[ri]
            ri += 1
            qi -= 1
            tq = q[qi]

print(sum(p)+sum(q))

### FIXED CODE ###

import sys
import numpy as np
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
X, Y, A, B, C = [int(x) for x in input().strip().split()]
p = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:X]
q = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:Y]
r = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:min(C, X+Y)]

pq = np.hstack((p, q))
pq.sort()
ri = 0
for i, t in enumerate(pq):
    if t < r[ri]:
        pq[i] = r[ri]
        ri += 1
    if ri == len(r):
        break
print(sum(pq))
a = input()
n = list(map(int, input().split()))
import numpy as np
if np.prod(n) >= 10 ** 18:
  print('-1')
else:
  print(np.prod(n))


### FIXED CODE ###

a, b = map(int, input().split())
print(a*b)
M =int(input())
prnt(48-M)

### FIXED CODE ###

print(48-int(input()))
N, M = map(int, input().split())
x = list(map(int, input().split()))

x.sort()
s = [0] * (M - 1)
for i in range(M - 1):
    s[i] = x[i + 1] - x[i]

s.sort(reverse=True)

res = sum(s)
if M == 1:
    print(0)
    quit()
else:
    for i in range(N - 1):
        res -= s[i]

print(res)


### FIXED CODE ###

N, M = map(int, input().split())
x = list(map(int, input().split()))
if N >= M:
    print(0)
    quit()


x.sort()
s = [0] * (M - 1)
for i in range(M - 1):
    s[i] = x[i + 1] - x[i]

s.sort(reverse=True)

res = sum(s)
if M == 1:
    print(0)
    quit()
else:
    for i in range(N - 1):
        res -= s[i]

print(res)
n=int(input())
a=[]

k=2
for i in range(55):
	while k < 55555 :
        k += 1
        b=k
        for j in a:
            if k%j==0:
                b=0
    
        if b==k:
            a.append(k)
            break

ans=[]
for j in range(len(a)):
	if len(ans) <= n:
    	if a[j] % 5 == 1:
        	ans.append(a[j])
 
 print(*ans)

### FIXED CODE ###

def main():
    n=int(input())
    a=[]
    s=[]
    t=0
    for k in range(3,55556):
        b=k
        for j in s:
            if k%j==0:
                b=0
        if b==k:
            s.append(k)
            if k % 5 == 1:
                if t < n:
                    a.append(k)
                    t += 1
                else:
                    break
     
    print(*a)
    
    
    
main()
n = int(input())
T = []
for _ in range(n-1):
    T += [list(map(int, input().split()))]
T.sort()
P = [0]+[-1]*(n-1)
b = n-1
while b > 0:
    for u, v, w in T:
        pu, pv = P[u-1], P[v-1]
        if (pu >= 0) & (pv < 0):
            P[v-1] = (pu+(w%2))%2
            b -= 1
        if (pv >= 0) & (pu < 0):
            P[u-1] = (pv+(w%2))%2
            b -= 1
for p in P: print(p)

### FIXED CODE ###

n, k = map(int, input().split())
p = 0.
for i in range(1, n+1):
    s = i
    q = 1.
    while s < k:
        s *= 2
        q *= 0.5
    p += q
print(p/n)
a = int(input())
b = int(input())
if(a<=8 and b<=8):
    print("Yay!")
else:
    print(":(")


### FIXED CODE ###

a,b = map(int,input().split())
if(a<=8 and b<=8):
    print("Yay!")
else:
    print(":(")
a = input()
a_first, a_last = s[:4], s[4:]
print(a_first + ' ' + a_last)

### FIXED CODE ###

a = input()
a_first, a_last = a[:4], a[4:]
print(a_first + ' ' + a_last)
# -*- coding: utf-8 -*-
def check(s, ans):
    if len(s) != len(ans):
        return False;
    for i in range(0, len(s)):
        pre = i - 1
        next = i + 1
        if i == 0:
            pre = len(s) - 1
        if i == len(s) - 1:
            next = 0
                
        if ans[i] == "S":
            if s[i] == "o":
                if ans[pre] != ans[next]:
                    return False
            else:
                if ans[pre] == ans[next]:
                    return False
        else:
            if s[i] == "x":
                if ans[pre] != ans[next]:
                    return False
            else:
                if ans[pre] == ans[next]:
                    return False
    return True
                                
def getAns(s, ans, idx, n):
    if idx == n - 1:
        if check(a, ans):
            return ans
        else:
            return []
    if idx == 0:
        if ans[idx] == "S":
            if s[idx] == "o":
                ans[n - 1] = ans[1]
            else:
                if ans[1] == "S":
                    ans[n - 1] = "W"
                else:
                    ans[n - 1] = "S"
        else:
            if s[idx] == "x":
                ans[n - 1] = ans[1]
            else:
                if ans[1] == "S":
                    ans[n - 1] = "W"
                else:
                    ans[n - 1] = "S"
        return getAns(s, ans, idx + 1, n)
    pre  = idx - 1
    next = idx + 1
    # 羊
    if ans[idx] == "S":
        if s[idx] == "o":
            ans[next] = ans[pre]
        else:
            if ans[pre] == "S":
                ans[next] = "W"
            else:
                ans[next] = "S"
    # 狼
    else:
        if s[idx] == "x":
            ans[next] = ans[pre]
        else:
            if ans[pre] == "S":
                ans[next] = "W"
            else:
                ans[next] = "S"
    return getAns(s, ans, idx + 1, n)

def arrayToString(arry):
    s = ""
    for i in range(0, len(arry)):
        s+= arry[i]
    return s

n = int(input())
a = input()
s = [a[i] for i in range(0, len(a))]
ans = ["S" for i in range(0, len(a))]
ans1 = ans[:]
ans1 = getAns(s, ans1, 0, n)
if len(ans1) != 0:
    print(arrayToString(ans1))
    quit()
ans2 = ans[:]
ans2[0] = "W"
ans2 = getAns(s, ans2, 0, n)
if len(ans2) != 0:
    print(arrayToString(ans2))
    quit()
ans3 = ans[:]
ans3[1] = "W"
ans3 = getAns(s, ans3, 0, n)
if len(ans3) != 0:
    print(arrayToString(ans3))
    quit()
ans4 = ans[:]
ans4[0] = "W"
ans4[1] = "W"
ans4 = getAns(s, ans4, 0, n)
if len(ans4) != 0:
    print(arrayToString(ans4))
    quit()
print("-1")



### FIXED CODE ###

# -*- coding: utf-8 -*-
n = int(input())
print(n * 800 - (200 * int(n / 15)))