Harryxun/stf_run huggingface dataset:
import sys
sys.setrecursionlimit(10000)
def gcd(n1,n2):
    if n1 > n2:
        n1,n2 = n2,n1
    if n2 % n1 == 0:return n1
    else: return gcd(n2%n1,n1)
n = int(input())
t = [int(input()) for i in range(n)]
check = t[0]*t[1]//gcd(t[0],t[1])
for i in range(n-2):
    check = (check*t[i+2])//gcd(check,t[i+2])
print(int(check))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10000)
def gcd(n1,n2):
    if n1 > n2:
        n1,n2 = n2,n1
    if n2 % n1 == 0:return n1
    else: return gcd(n2%n1,n1)
n = int(input())
if n == 1:
    print(int(input()))
    sys.exit()
t = [int(input()) for i in range(n)]
check = t[0]*t[1]//gcd(t[0],t[1])
for i in range(n-2):
    check = (check*t[i+2])//gcd(check,t[i+2])
print(int(check))
N=int(input())
l = [int(input()) for i in range(1,n+1)]
print(len(set(l)))

### FIXED CODE ###

N = int(input())
d = [input() for i in range(N)]
print(len(set(d)))
n, t = [int(i) for i in input().split()]
ab = []
for _ in range(n):
    ab.append([int(i) for i in input().split()])
sb.sort(key=lambda x:x[0])
aa = t+max([i[0] for i in ab])+1
c = [0] * aa
for i in ab:
    d = c[:]
    for j in range(t):
        k = d[j]
        l = i[0] + j
        if l >= aa:
            continue
        c[l] = max(c[l], d[j] + i[1])
print(max(c))


### FIXED CODE ###

n, t = [int(i) for i in input().split()]
ab = []
for _ in range(n):
    ab.append([int(i) for i in input().split()])
ab.sort(key=lambda x:x[0])
aa = t+max([i[0] for i in ab])+1
c = [0] * aa
for i in ab:
    d = c[:]
    for j in range(t):
        k = d[j]
        l = i[0] + j
        if l >= aa:
            continue
        c[l] = max(c[l], d[j] + i[1])
print(max(c))
n,k=map(int,input().split())
c=list(map(int,input().split()))
dp=[0]
if n>1:
    dp.append(abs(c[1]-c[0]))
    for i in range(2,n):
        m=10**9+1
        for j in range(1,k+1):
            if j<n:
                m=min(m,dp[max(n-k-1,0)]+abs(c[i]-c[max(0,i-j)]))
        dp.append(m)
print(dp[-1])


### FIXED CODE ###

n=int(input())
c=list(map(int,input().split()))
dp=[0]
if n>1:
    dp.append(abs(c[1]-c[0]))
    for i in range(2,n):
        dp.append(min(dp[-1]+abs(c[i-1]-c[i]),dp[-2]+abs(c[i-2]-c[i])))
print(dp[-1])
# coding: utf-8
# hello worldと表示する
#dpでできないかな？
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

lis=sorted(LI())
count=0
while lis[0]+2<lis[2]:
    lis[0]+=2
    count+=1
while lis[1]+2<lis[2]:
    lis[1]+=2
    count+=1
#print(count)
#print(lis)
u=lis[0]
for i in range(3):
    lis[i]-=u
#print(lis)
lis.sort()
if lis==[0,0,0]:
    ad=0
elif lis==[0,0,1]:
    ad=1
elif lis==[0,1,1]:
    ad=2
elif lis==[0,1,2]:
    ad=3
elif lis==[0,0,2]:
    ad=2
elif lis==[0,2,2]:
    ad=1
print(count+ad)

### FIXED CODE ###

# coding: utf-8
# hello worldと表示する
#dpでできないかな？
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

lis=sorted(LI())
count=0
while lis[0]+2<lis[2]:
    lis[0]+=2
    count+=1
while lis[1]+2<lis[2]:
    lis[1]+=2
    count+=1
#print(count)
#print(lis)
u=lis[0]
for i in range(3):
    lis[i]-=u
#print(lis)
ad=3
if lis==[0,0,0]:
    ad=0
elif lis==[0,0,1]:
    ad=1
elif lis==[0,1,1]:
    ad=2
elif lis==[0,1,2]:
    ad=3
elif lis==[0,0,2]:
    ad=2
elif lis==[0,2,2]:
    ad=1
print(count+ad)
n=int(input())
w=list(map(int,input().split()))

total=sum[w]
s1=w[0]
ans=total-s1

for in range(1,n):
    s1+=w[i]
    ans=min(ans,abs(total-s1*2))

print(ans)

### FIXED CODE ###

n=int(input())
w=list(map(int,input().split()))

total=sum(w)
s1=w[0]
ans=total-s1

for i in range(1,n):
    s1+=w[i]
    ans=min(ans,abs(total-s1*2))

print(ans)
ab,c,x,y=map(int,input().split())
ans=10**12
for i in range(0,(max(x,y)*2)+1,2):
    xr=max(x-i//2,0)
    yr=max(0,y-i//2)

    if ans>(i*c)+(xr*a)+(yr*b):
        ans=(i*c)+(xr*a)+(yr*B)

print(ans)

### FIXED CODE ###

a,b,c,x,y = map(int, input().split())
ans = 10**12
for i in range(0, (max(x,y)*2)+1, 2):
    xr = max(x-(i//2), 0)
    yr = max(0, y-(i//2))

    if ans > (i*c)+(xr*a)+(yr*b):
        ans = (i*c)+(xr*a)+(yr*b)

print(ans)
N, M = map(int, input().split())
A = list(map(int, input().split()))
B = [0 for i in range(M)]
C = [0 for i in range(M)]
for i in range(M):
B[i],C[i] = map(int, input().split())
import bisect
import deque

for i in range(M):
  A = sorted(A)
  lm = bisect.bisect_right(A, C[i]-1)-1
  print(lm)
  for j in range(min(B[i],lm+1)):
    A[j] = C[i]
    
print(sum(A))

### FIXED CODE ###

N, M = map(int, input().split())
A = list(map(int, input().split()))
BC = [[] for _ in range(M)]
for i in range(M):
  BC[i] = list(map(int, input().split()))

BC.sort(key=lambda x: x[1], reverse=True)

for i in BC:
  A.extend([i[1]]*i[0])
  if len(A) > 2*N:
    break
    
A = sorted(A,reverse=True)
print(sum(A[:N]))
H,W=[int(s) for s in input().split()]
cam_ls=[ "." for _ in range(H+2)]
for j in range(H+1):
  cam_ls[0]=cam_ls[0]+"."
  cam_ls[H+1]=cam_ls[H+1]+"."
for i in range(1,H+1):
  cam_ls[i]=cam_ls[i]+input()+"."
  
def pos(h,w):
  if cam_ls[h][w]==".":
    return 1
  elif (cam_ls[h+1][w]=="." and
        cam_ls[h-1][w]=="." and
        cam_ls[h][w+1]=="." and
        cam_ls[h][w-1]=="."):
    return 0
  else:
    return 1

ans=1
for i in range(1,H+1):
  for j in range(1,W+1):
    ans*=pos(i,j)
if ans==1:
  print("Yes")
else:
  print("No")



### FIXED CODE ###

H,W=[int(s) for s in input().split()]
cam_ls=[ "." for _ in range(H+2)]
for j in range(W+1):
  cam_ls[0]=cam_ls[0]+"."
  cam_ls[H+1]=cam_ls[H+1]+"."
for i in range(1,H+1):
  cam_ls[i]=cam_ls[i]+input()+"."
  
def pos(h,w):
  if cam_ls[h][w]==".":
    return 1
  elif (cam_ls[h+1][w]=="." and
        cam_ls[h-1][w]=="." and
        cam_ls[h][w+1]=="." and
        cam_ls[h][w-1]=="."):
    return 0
  else:
    return 1

ans=1
for i in range(1,H+1):
  for j in range(1,W+1):
    ans*=pos(i,j)
if ans==1:
  print("Yes")
else:
  print("No")
a, b, c, d = map(int, input().split())
aok = 0
while c > 0:
  c = c - b
  aok += 1
  
if ((aok - 1) * d - a) => 0:
  print("No")
else:
  print("Yes")


### FIXED CODE ###

a, b, c, d = map(int, input().split())
aok = 0
while c > 0:
  c = c - b
  aok += 1
  
if ((aok - 1) * d - a) >= 0:
  print("No")
else:
  print("Yes")
list=[int(input()) for i in range(5)]
sum=0
max=0
for x in list:
  y = -(-x//10)*10
  sum+=y
  max=(y-x, max)
print(sum/max)

### FIXED CODE ###

X=[int(input()) for i in range(5)]
Y=[]
for x in X:
  Y.append(-(-x//10)*10-x)
print(sum(X)+sum(Y)-(max(Y)))
A,B,C = map(int.input().split())

if A <= C <= B:
	print("Yes")
else:
	print("No")

### FIXED CODE ###

A,B,C = map(int,input().split())
 
if A <= C <= B:
	print("Yes")
else:
	print("No")
n, tx = input().strip().split(' ')
n, tx = [int(n),int(tx)]

c_ans = 1001
for i in range (n):
    c, t = input().strip().split(' ')
    c, t = [int(c),int(t)]
    if c < c_ans and t =< tx:
        c_ans = c
if c_ans == 1001:
    print('TLE')
else:
    print(c_ans)


### FIXED CODE ###

n, tx = input().strip().split(' ')
n, tx = [int(n),int(tx)]

c_ans = 1001
for i in range (n):
    c, t = input().strip().split(' ')
    c, t = [int(c),int(t)]
    if c < c_ans and t <= tx:
        c_ans = c
if c_ans == 1001:
    print('TLE')
else:
    print(c_ans)
for i in range(N):
    if i == 0:
        memo.append(2)
    elif i == 1:
        memo.append(1)
    else:
        memo.append(memo[i-1] + memo[i-2])

if N == 1:
    print(1)
else:
    print(memo[N - 1] + memo[N - 2])

### FIXED CODE ###

N = int(input())
memo = []
for i in range(N):
    if i == 0:
        memo.append(2)
    elif i == 1:
        memo.append(1)
    else:
        memo.append(memo[i-1] + memo[i-2])
if N == 1:
    print(1)
else:
    print(memo[N - 1] + memo[N - 2])
from math import gcd
n, k = map(int, input().split())
a = list(set(map(int, input().split())))
a.sort(); b = a[0]
for i in range(1, n): b = gcd(b, a[i])
if len(a) == 1:
    print("POSSIBLE") if k == a[0] else print("IMPOSSIBLE")
else:
    print("POSSIBLE") if k <= a[-1] and k%b == 0 else print("IMPOSSIBLE")

### FIXED CODE ###

from math import gcd
n, k = map(int, input().split())
a = list(set(map(int, input().split())))
a.sort(); b = a[0]
for i in range(1, len(a)): b = gcd(b, a[i])
if len(a) == 1:
    print("POSSIBLE") if k == a[0] else print("IMPOSSIBLE")
else:
    print("POSSIBLE") if k <= a[-1] and k%b == 0 else print("IMPOSSIBLE")
P,Q,R = list(map(int,input().split()))

a = P + Q
b = P + R
c = Q + R
d = Q + P
e = R + Q
f = R + P

mn_list = list[a,b,c,d,e,f]
mn = min(mn_list)

print(mn)

### FIXED CODE ###

a,b,c = map(int,input().split())
print(min(a+b,a+c,b+c))
def find_min_fuka_idx(lst, x):
  ok = -1
  ng = len(lst)
  while abs(ok-ng)>1:
    mid = (ok+ng)//2
    if x>=lst[mid]:
      ok = mid
    else:
      ng = mid
  return ng

a,b,q = map(int, input().split())
s = [-10**18]
for i in range(a):
  s.append(int(input()))
s.append(10**18)
t = [-10**18]
for i in range(b):
  t.append(int(input()))
t.append(10**18)

for i in range(q):
  x = int(input())
  si = find_min_fuka_idx(s, x)
  tj = find_min_fuka_idx(t, x)
  print(min(abs(x-s[si])+abs(s[si]-t[tj]),\
            abs(x-s[si])+abs(s[si]-t[tj-1]),\
           abs(x-t[tj])+abs(t[tj]-s[si]),\
            abs(x-t[tj])+abs(t[tj]-s[si-1]),\
            abs(x-s[si-1])+abs(s[si-1]-t[tj]),\
            abs(x-s[si-1])+abs(s[si-1]-t[tj-1]),\
           abs(x-t[tj-1])+abs(t[tj-1]-s[si]),\
            abs(x-t[tj]-1)+abs(t[tj-1]-s[si-1]))

### FIXED CODE ###

import bisect
def find_min_fuka_idx(lst, x):
  ok = -1
  ng = len(lst)
  while abs(ok-ng)>1:
    mid = (ok+ng)//2
    if x>=lst[mid]:
      ok = mid
    else:
      ng = mid
  return ng

a,b,q = map(int, input().split())
s = [-10**18]
s_mid = [int(input()) for i in range(a)]
s.extend(s_mid)
s.append(10**18)

t = [-10**18]
t_mid = [int(input()) for i in range(b)]
t.extend(t_mid)
t.append(10**18)

for i in range(q):
  x = int(input())
  si = bisect.bisect_right(s, x)
  tj = bisect.bisect_right(t, x)
  print(min(abs(x-s[si])+abs(s[si]-t[tj]),\
            abs(x-s[si])+abs(s[si]-t[tj-1]),\
           abs(x-t[tj])+abs(t[tj]-s[si]),\
            abs(x-t[tj])+abs(t[tj]-s[si-1]),\
            abs(x-s[si-1])+abs(s[si-1]-t[tj]),\
            abs(x-s[si-1])+abs(s[si-1]-t[tj-1]),\
           abs(x-t[tj-1])+abs(t[tj-1]-s[si]),\
            abs(x-t[tj-1])+abs(t[tj-1]-s[si-1])))
import numpy as np
import math
A,B=np.array(list(map(int, input().split())))
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
C=np.array(prime_factorize(math.gcd(A,B)))
print(len(np.unique(C))+1)

### FIXED CODE ###

import numpy as np
A,B=np.array(list(map(int, input().split())))
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
    
C=np.array(prime_factorize(gcd(A,B)))
print(len(np.unique(C))+1)
a=int(input())
b=int(input())   
if b % a == 0:
    print(a+b)
else:
    print(b-a)

### FIXED CODE ###

a,b=map(int,input().split())
if b%a==0:
	print(a+b)
else:
	print(b-a)
s = input()[8]
    print('A' + s + 'C')

### FIXED CODE ###

s = input()[8]
print('A' + s + 'C')
#!usr/bin/env python3
import sys
import math
import string
import collections
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

sys.setrecursionlimit(10 ** 8)

List = [str(i) for i in range(0, 10)]
prev_num = 10
K = int(input())
if K <= 10:
    print(List[K])
else:
    while True:
        List2 = []
        for i in List:
            if i != "0":
                List2.append(i + str(i[-1]))
                if i[-1] != "9":
                    List2.append(i + str(int(i[-1]) + 1))
                if i[-1] != "0":
                    List2.append(i + str(int(i[-1]) - 1))
        List = List2
        if prev_num + len(List) >= K:
            List = list(map(int, List))
            List.sort()
            print(List[K - prev_num])
            sys.exit()
        prev_num += len(List)


### FIXED CODE ###

#!usr/bin/env python3
import sys
import math
import string
import collections
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

sys.setrecursionlimit(10 ** 8)

List = [str(i) for i in range(0, 10)]
prev_num = 10
K = int(input())
if K <= 9:
    print(List[K])
else:
    while True:
        List2 = []
        for i in List:
            if i != "0":
                List2.append(i + str(i[-1]))
                if i[-1] != "9":
                    List2.append(i + str(int(i[-1]) + 1))
                if i[-1] != "0":
                    List2.append(i + str(int(i[-1]) - 1))
        List = List2
        if prev_num + len(List)-1 >= K:
            List = list(map(int, List))
            List.sort()
            print(List[K - prev_num])
            sys.exit()
        prev_num += len(List)
# from fractions import gcd
from math import gcd

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

L = [0 for _ in range(N+1)]
R = [0 for _ in range(N+1)]


for i in range(N):
    L[i+1] = gcd(L[i], A[i])

for i in reversed(range(N)):
    R[i] = gcd(R[i+1], A[i])

M = [0 for _ in range(N)]

for i in range(N):
    M[i] = gcd(L[i], R[i+1])

print(max(M))


### FIXED CODE ###

from fractions import gcd

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

L = [0 for _ in range(N+1)]
R = [0 for _ in range(N+1)]


for i in range(N):
    L[i+1] = gcd(L[i], A[i])

for i in reversed(range(N)):
    R[i] = gcd(R[i+1], A[i])

M = [0 for _ in range(N)]

for i in range(N):
    M[i] = gcd(L[i], R[i+1])

print(max(M))
while True:
    x, y = map(int, inpu().split())
    if x == 0 and y == 0:
        break

    if x > y:
        z = x
        x = y
        y = z

    print(x, y)



### FIXED CODE ###

while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break

    if x > y:
        x, y = y, x

    print(x, y)
N = int(input())
for s in range(N):
  s = (input()
       print('AC','x',s.count('AC'))
       print('TLE','x',s.count('TLE'))
       print('WJ','X',s.count('WJ'))
       print('RE','X',s.count('RE'))


### FIXED CODE ###

n = int(input())
s = list(input() for i in range(n))
  
print("AC x ",s.count("AC"))
print("WA x ",s.count("WA"))
print("TLE x ",s.count("TLE"))
print("RE x ",s.count("RE"))
import sys
s = input()
ans = {}
for i in s:
  if i in ans:
    ans[i] +=1
  else:
    ans[i] = 0
for i in ans:
  if i%2 !=0:
    print('No')
    sys.exit()
print('Yes')

### FIXED CODE ###

import sys
s = input()
ans = {}
for i in s:
  if i in ans:
    ans[i] +=1
  else:
    ans[i] = 1
for i in ans.values():
  if i%2!=0:
    print('No')
    sys.exit()
print('Yes')
A, B = map(int, input().split())

print (B if a>=13 else B//2 if a>= 6 else 0)

### FIXED CODE ###

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

print (B if A>=13 else B//2 if A>= 6 else 0)
def main():
    h, _ = map(int, input().split())
    c = [input() for _ in range(h)]
    for cn in c:
        print(cn)
        print(cn)


if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    print("vowel" if input() in 'aeiou' else "consonant")


if __name__ == "__main__":
    main()
N = int(input())
A = list(map(int, input().split()))

A.sort(reverse=True)
ans = 0

if N%2 == 1:
	for i in range((N+1)/2):
		ans += A[i]*2
	ans -= A[0]
	ans -= A[(N+1)/2]
	print(ans)
else:
	for i in range(N/2):
		ans += A[i]*2
	ans -= A[0]
	print(ans)

### FIXED CODE ###

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

A.sort(reverse=True)
ans = 0

for i in range(N-1):
	ans += A[(i+1)//2]

print(ans)
a,b,k=map(int,input().split())

if b-a+1<=2*k:
    for i in range(a,b+1):
        print(i)

else:
    aa=[a+i for i in range(k)]
    bb=[b-j for j in range(k)]
    cc=sorted(aa+bb)
    for s in cc:
        print(s)


### FIXED CODE ###

s=input()

if "a" in s and "b" in s and "c" in s:
    print("Yes")

else:
    print("No")
def main():
  print("aaa")
  a = list(input())
  a = [int(aa) for aa in a]
  a = sorted(a)
  if a==[5,7,7]:
    return "YES"
  else:
    return "NO"
  
  
if __name__ == "__main__":
  main()

### FIXED CODE ###

def main():
  a = list(input().split())
  a = [int(aa) for aa in a]
  a = sorted(a)
  if a==[5,5,7]:
    print('YES')
  else:
    print('NO')
  
  
if __name__ == "__main__":
  main()
inputValue=input()

l=inputValue.split(" ")
d=int(l[0])
t=int(l[1])
s=int(l[2])

if (d/float(s))<=t:
	print "Yes"
else:
	print"No"

### FIXED CODE ###

inputValue=input()

l=inputValue.split(" ")
D=int(l[0])
T=int(l[1])
S=int(l[2])

if (D/float(S))<=T:
	print ("Yes")
else:
	print("No")
import numpy as np

L, R = list(map(int, input().split()))
data = np.array([x for x in range(L, R+1)]) % 2019
data = np.unique(data)
length = R - L

min_mod = 2018
for t in range(length):
    i = length - t
    for j in range(i):
        mod = data[i] * data[j] % 2019
        min_mod = mod if min_mod > mod else min_mod
        
print(min_mod)

### FIXED CODE ###

l, r = list(map(int,input().split()))

if r - l >= 2019:
  print(0)
  
else:
  ll = l % 2019
  rr = r % 2019
  if rr < ll:
    print(0)
    
  else:
    keep = 2020
    for i in range(ll, rr+1):
      for j in range(i+1, rr+1):
        keep = min((i*j)%2019, keep)
    print(keep)
N = int(input())
S = []
a = 0
b = 0
both = 0
count = 0
for i in range(N):
    s = input()
    S.append(s)
    if "AB" in s:
        count += 1
    if s[0] == "B":
        b += 1
        if s[-1] == "A":
            both += 1
    if s[-1] == "A":
        a += 1
a -= both
b -= both
if a>0 and b>0:
    count += both+1 + min(a-1, b-1)
elif (a>0 and b==0) or (a==0 and b>0):
    count += both
else:
    count += both -1


print(count)


### FIXED CODE ###

N, K = map(int, input().split())
print(N-K+1)
s=str(input())
ans=0
for i in range(1,len(s)-2):
  if s[i]==s[i+1]:
    ans+=1
    break
  elif s[i]==s[i+2]:
    ans+=1
    break
  else:
    ans+=0
   
if s[-2]==s[-1]:
  ans+=1
  
if ans==0:
  print("YES")
else:
  print("NO")
    
  
  


### FIXED CODE ###

s=str(input())
a=s.count("a")
b=s.count("b")
c=s.count("c")
if max(a,b,c)-min(a,b,c)<=1:
  print("YES")
else:
  print("NO")
x = raw_input()
r = int(x)
s = r * r * 3.14159265359
l = 2 * r * 3.14159265359
print "%.6f %.6f" % (s,l)


### FIXED CODE ###

x = raw_input()
r = float(x)
s = r * r * 3.14159265359
l = 2 * r * 3.14159265359
print "%.6f %.6f" % (s,l)
n = int(input())
  print((n - n  % 3)//3)

### FIXED CODE ###

n = int(input())
print(n//3)
def gcd(x, y):
    if x < y:
        x, y = y, x
    while x % y != 0:
        r = x % y
        x = y
        y = r
    return y

def inv(x):
    return pow(x, MOD-2, MOD)

    
N = int(input())
a_list = list(map(int, input().split()))
MOD = 10 ** 9 + 7
 
if N == 1:
    print(a_list[0])
    exit()
div = gcd(a_list[0], a_list[1])
lcm = (a_list[0] * a_list[1]) * inv(div)
 
for i in range(2, N):
    div = gcd(lcm, a_list[i])
    lcm = (lcm * a_list[i]) * inv(div)
    
ans = 0
for i in range(N):
    ans = (ans + lcm * inv(a_list[i]) % MOD
 
print(ans)

### FIXED CODE ###

from functools import reduce

def gcd(x, y):
    if x < y:
        x, y = y, x
    while x % y != 0:
        r = x % y
        x = y
        y = r
    return y

def inv(x):
    return pow(x, MOD-2, MOD)

def lcm(a, b):
    return a * b // gcd(a, b)

def lcm_list(l:list):
    return reduce(lcm, l, 1)
  
N = int(input())
a_list = list(map(int, input().split()))
MOD = 10 ** 9 + 7

num = lcm_list(a_list) % MOD
ans = 0
for a in a_list:
    ans += (num * pow(a, MOD-2, MOD)) % MOD

print(ans%MOD)
a, b = map(int, input().split())
print(a * int(b * 100) // 100)

### FIXED CODE ###

a, b = input().split()
a = int(a)
b = int(b.replace('.', ''))
print(a * b // 100)
ls = [1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196, 216, 225, 243, 256, 289, 324, 343, 361, 400, 441, 484, 512, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1000,1020]
X = int(input())
for i in range(len(ls)):
  if X<ls[i]:
    print(ls[i-1])
    break


### FIXED CODE ###

a,b,c,d=map(int,input().split())
if abs(c-a)<=d:
  print("Yes")
elif abs(c-b)<=d and abs(b-a)<=d:
  print("Yes")
else:
  print("No")
"""
# 標準入力取得
## 文字列
 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())

## 数値
 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    n = int(sys.stdin.readline())
    A = list(map(int, sys.stdin.readline().split()))
    if n==2:
        print(gcd(*A))
    else:
        ans = gcd(*A[1:n])
        for i in range(n):
            p = A.pop(i)
            temp_ans = gcd(*A)
            if temp_ans > ans:
                ans = temp_ans
            A.insert(i,p)
        print(ans)

### FIXED CODE ###

"""
# 標準入力取得
## 文字列
 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())

## 数値
 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    n = int(input())
    a = list(map(int,input().split()))

    #累積GCD
    left = [0]*n
    right = [0]*n

    for i in range(n-1):
        left[i+1] = gcd(left[i],a[i])
        right[-i-2] = gcd(right[-i-1],a[-i-1])
        # print("left:",left)
        # print("right:",right)

    gcd_t = 1
    for i in range(n):
        gcd_t = max(gcd_t,gcd(left[i],right[i]))
    print(gcd_t)