Harryxun/stf_run huggingface dataset:
s = input()
b = [s]
n = len(s)
a = b[n-1]
if a == '2' or a == '4' or a == '5' or a == '7' or a == '9':
  print('hon')
elif a == '0' or a == '1' or a == '6' or a == '8':
  print('pon')
else:
  print('bon')


### FIXED CODE ###

s = input()
n = len(s)
a = s[n-1:n]
if a == '2' or a == '4' or a == '5' or a == '7' or a == '9':
  print('hon')
elif a == '0' or a == '1' or a == '6' or a == '8':
  print('pon')
else:
  print('bon')
def check(a, b):
    k = 1
    res = 0
    if a == b and (a <= N): res += 1
    while True:
        if (a * (10 ** k) + b) > N:
            break
        else:
            if len(str(N)) > (k+1) or str(N)[0] > str(a):
                res += 10 ** (k - 1)
                k += 1
                continue

            else :
                Q = N - (a * (10 ** k) + b)
                p = (1 + int(str(Q)[:-1]))
                res += p
                k += 1
    return res


def main():
    global N
    N = int(input())
    ans = 0
    for i in range(1, 10, 1):
        for j in range(1, 10, 1):
            a = check(i, j)
            b = check(j, i)
            ans += a * b
    print(ans)


if __name__ == '__main__':
    main()

### FIXED CODE ###

def check(a, b):
    k = 1
    res = 0
    if a == b and (a <= N): res += 1
    while True:
        if (a * (10 ** k) + b) > N:
            break
        else:
            if len(str(N)) > (k+1) or str(N)[0] > str(a):
                res += 10 ** (k - 1)
                k += 1
                continue

            else :
                Q = N - (a * (10 ** k) + b)
                p = 1
                if len(str(Q)) > 1 :
                    p += (int(str(Q)[:-1]))
                res += p
                k += 1
    return res


def main():
    global N
    N = int(input())
    ans = 0
    for i in range(1, 10, 1):
        for j in range(1, 10, 1):
            a = check(i, j)
            b = check(j, i)
            ans += a * b
    print(ans)


if __name__ == '__main__':
    main()
N = int(input())

def count(start, end):
  return end - start + 1

keta = 1
while True:
  if 10**keta > N:
    break
  else:
  	keta += 1

num = 0
for k in range(1, keta+1):
  if k % 2 == 1:
	num += count(10**(k-1), min(N, 10**k)-1)
    
print(num)

### FIXED CODE ###

N = int(input())
def count(start, end):
  return end - start + 1
keta = 1
while True:
  if 10**keta > N:
    break
  else:
    keta += 1
num = 0
for k in range(1, keta+1):
  if k % 2 == 1:
    num += count(10**(k-1), min(N, 10**k-1))
print(num)
n = int(input())
import math
ans = 0
t=0
n = int(input())
for i in range(1,k+1):
    for j in range(1,k+1):
        t = math.gcd(i,j)
        for k in range(1,k+1):
            ans += math.gcd(t,k)
print(ans)

### FIXED CODE ###

k = int(input())
li=[1, 9, 30, 76, 141, 267, 400, 624, 885, 1249, 1590, 2208, 2689, 3411, 4248, 5248, 6081, 7485, 8530, 10248, 11889, 13687, 15228, 17988, 20053, 22569, 25242, 28588, 31053, 35463, 38284, 42540, 46581, 50893, 55362, 61824, 65857, 71247, 76884, 84388, 89349, 97881, 103342, 111528, 120141, 128047, 134580, 146316, 154177, 164817, 174438, 185836, 194157, 207927, 218812, 233268, 245277, 257857, 268182, 288216, 299257, 313635, 330204, 347836, 362973, 383709, 397042, 416448, 434025, 456967, 471948, 499740, 515581, 536073, 559758, 583960, 604833, 633651, 652216, 683712, 709065, 734233, 754734, 793188, 818917, 846603, 874512, 909496, 933081, 977145, 1006126, 1041504, 1073385, 1106467, 1138536, 1187112, 1215145, 1255101, 1295142, 1342852, 1373253, 1422195, 1453816, 1502376, 1553361, 1595437, 1629570, 1691292, 1726717, 1782111, 1827492, 1887772, 1925853, 1986837, 2033674, 2089776, 2145333, 2197483, 2246640, 2332104, 2379085, 2434833, 2490534, 2554600, 2609625, 2693919, 2742052, 2813988, 2875245, 2952085, 3003306, 3096024, 3157249, 3224511, 3306240, 3388576, 3444609, 3533637, 3591322, 3693924, 3767085, 3842623, 3912324, 4027884, 4102093, 4181949, 4270422, 4361548, 4427853, 4548003, 4616104, 4718640, 4812789, 4918561, 5003286, 5131848, 5205481, 5299011, 5392008, 5521384, 5610705, 5739009, 5818390, 5930196, 6052893, 6156139, 6239472, 6402720, 6493681, 6623853, 6741078, 6864016, 6953457, 7094451, 7215016, 7359936, 7475145, 7593865, 7689630, 7886244, 7984165, 8130747, 8253888, 8403448, 8523897, 8684853, 8802826, 8949612, 9105537, 9267595, 9376656, 9574704, 9686065, 9827097, 9997134, 10174780, 10290813, 10493367, 10611772, 10813692]
print(li[k-1])
s = raw_input()
cnt = 0
last
last = s[0]

for c in s[1:end]:
 if c ! last
  cnt = cnt+1
 last = c
print cnt

### FIXED CODE ###


s = raw_input()
cnt = 0
last = s[0]
 
for c in s[1:]:
    if c != last:
        cnt = cnt+1
    last = c
print cnt
S = input()
N = len(S)
ans=[0]*N
S += "#"
#分割統治法
def RL(k):
    i=0
    count_R=0
    while S[k+i]=="R":
        count_R +=1
        i += 1
    j=0
    count_L=0
    while S[k+i+j]=="L":
        count_L += 1
        j+= 1
        
    
    ans[k+i-1] += (count_R+1)//2+count_L//2
    ans[k+i] += (count_R)//2+(count_L+1)//2

    if S[i+k+j]!="#":
        RL(k+i+j)

RL(0)
[print(x) for x in ans]
    

### FIXED CODE ###

S = input()
N = len(S)
ans=[0]*N


count=0
for i in range(N):
    if S[i]=="R":
        count+=1
    else:
        ans[i-1] += (count+1)//2
        ans[i] += count//2
        count=0

count=0
for i in range(1,N+1):
    if S[N-i]=="L":
        count+=1
    else:
        ans[N-i] += count//2
        ans[N-i+1] += (count+1)//2
        count=0

[print(x) for x in ans]
#A,B,K = [int(i) for i in input().rstrip().split()]
A,B,K = list(map(int, input().rstrip().split()))

#nums=[i for i in range(A,B+1)]
nums=list(range(A,B+1))

if K <= len(nums)//2:
  print(*(nums[:K] + nums[-K:]),sep="\n")
else:
  print(*nums,sep="\n")


### FIXED CODE ###

A,B,K = [int(i) for i in input().rstrip().split()]

if K <= (B-A+1)/2:
  print(*( list(range(A,A+K)) + list(range(B-K+1,B+1)) ),sep="\n")
else:
  print(*list(range(A,B+1)),sep="\n")
n = import()
a = n * n * n
print a

### FIXED CODE ###

x = raw_input()
x = int(x)
x = x ** 3
print x
#!/usr/bin/env python
# coding: utf-8

# In[1]:


import sys
#input = sys.stdin.readline
A, B = map(int, input().split())


# In[ ]:


if A <=5:
    print(0)
el



### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[6]:


import sys
#input = sys.stdin.readline
A, B = map(int, input().split())


# In[7]:


if A <=5:
    print(0)
elif A <= 12:
    print(int(B/2))
else:
    print(B)


# In[ ]:
a,b=int(input())
if(b==1):
  print(0)
else:
  print(a-b)

### FIXED CODE ###

a,b=map(int,input().split())
if(b==1):
  print(0)
else:
  print(a-b)
N = int(input())
H = list(map(int, input().split()))
max_count = 0
for i in range(N):
  tmp_count = 0
  for j in range(i+1, N-i):
  	if H[j-1] <= H[j]:
      tmp_count+=1


### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
tmp = 0
s = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    tmp += 1
    s = max(s, tmp)
  else:
    tmp = 0
    
print(s)
arr_len_int = int(input().split(' ')[1])
a = [input() for i in range(arr_len_int)]
a.sort()
b = set(a)
print(''.join(b ))

### FIXED CODE ###

arr_len_int = int(input().split(' ')[0])
if (arr_len_int==1):
  print(input())
else:
  a = [input() for i in range(arr_len_int)]
  a.sort()
  print(''.join(a))
def get_input():
    while True:
        try:
            yield ''.join(raw_input())
        except EOFError:
            break

if __name__ == '__main__':
    a = list(get_input()) # [a1, a2, a3, ...]

    for i in a:
        b = i.split()
        b = map(float, b)

        b_a = b[0]
        b_b = b[1]
        b_c = b[2]
        b_d = b[3]
        b_e - b[4]
        b_f = b[5]

        b_d = b_a
        b_e = b_a/b_d * b_e
        b_f = b_a/b_d * b_f

        x = (b_c - b_f)/(b_b - b_e)

        y = (b_c - x * b_b)/b_a

        print round(x, 3)
        print round(y, 3)

### FIXED CODE ###

while 1:
    def solver(a, b, c, d, e, f):
        answer = []

        if d == 0:
            y = f / e
            x = (c - b * y)/a

        else:
            m = a / d

            d = d * m
            e = e * m
            f = f * m

            y = (c - f)/(b - e)

            x = (c - b * y)/a

            if x == -0:
                x = 0
            if y == -0:
                y = 0

        answer.append(x)
        answer.append(y)
        return answer

    try:
        p_1, p_2, p_3, p_4, p_5, p_6 = map(float, raw_input().split())

        ans = []
        ans = solver(p_1, p_2, p_3, p_4, p_5, p_6)

        print "%.3f %.3f" % (ans[0], ans[1])

    except:
        break
N = int(input())

divList = []

n = N

while n != 1:
    if n % 2 == 0:
        n = n // 2
        divList.append(2)
        continue
    if n % 3 == 0:
        n = n // 3
        divList.append(3)
        continue

    newN = n
    isFind = False
    for i in range(6, (n**(1/2)) + 1, 6):
        if n % (i - 1) == 0:
            divList.append(i - 1)
            newN = newN // (i - 1)
            isFind = True
        if n % (i + 1) == 0:
            divList.append(i + 1)
            newN = newN // (i + 1)
            isFind = True

        if isFind == True:
            break

    if isFind == False:
        divList.append(n)
        newN = 1
    n = newN

    # print(divList)

# print(divList)

t = [([1], [1])]

for d in divList:
    newT = []
    for ab in t:
        a, b = ab[0], ab[1]
        a_add = a[:]
        a_add.append(d)
        b_add = b[:]
        b_add.append(d)

        newT.append((a, b_add))
        newT.append((a_add, b))
    t = newT

# print(t)

from functools import reduce

a1 = [(reduce(lambda a, b:a * b, ab[0]), reduce(lambda a, b:a * b, ab[1]))
      for ab in t]
# print(a1)


a2 = set([(len(str(ab[0])), len(str(ab[1]))) for ab in a1])

# print(a2)

a3 = [max(ab[0], ab[1]) for ab in a2]

# print(a3)

print(min(a3))


### FIXED CODE ###

N = int(input())


def countDigits(n):
    return len(str(n))


ans = countDigits(N)
A = 1
while A * A <= N:
    if(N % A != 0):
        A += 1
        continue
    B = N // A

    cur = max(countDigits(A), countDigits(B))
    if (ans > cur):
        ans = cur
    A += 1
print(ans)
N = input()
total = 0
for i in range(N):
	if i % 3 != 0 and i % 5 != 0:
		total += i

print(total)

### FIXED CODE ###


has_seven = False
N = str(input())
for i in range(len(N)):
  if N[i] == '7':
      has_seven = True
      break

if has_seven:
  print("Yes")
else:
  print("No")
a, b, c = map(int, raw_input().split())
if a < b && b < c :
    print 'Yes'
else :
    print 'No'

### FIXED CODE ###

a, b, c = map(int, raw_input().split())
if a < b and b < c :
    print 'Yes'
else :
    print 'No'
n, W = map(int, input().split())
w, v = [], []
dp = [[None for i in range(W+1)] for j in range(n+1)]

for i in range(n):
    temp1, temp2 = map(int, input().split())
    w.append(temp1)
    v.append(temp2)

def solve(i, total):
    if dp[i][total] is not None:
        return dp[i][total]

    if i > n-1:
        return 0
    if total > W:
        return 0

    weight, val = w[i], v[i]
    if total + weight <= W:
        chose = val + solve(i+1, total + weight)
	unchose = solve(i+1, total)
        dp[i][total] = max(chose, unchose)
	return dp[i][total]
    else:
        dp[i][total] = solve(i+1, total)
	return dp[i][total]

print(solve(0, 0))

### FIXED CODE ###

n, W = map(int, input().split())
w = [0]*(n+1)
v = [0]*(n+1)

#dp = [[None for i in range(W+1)] for j in range(n+1)]
dp = [[0 for i in range(W+1)] for j in range(n+1)]

for i in range(n):
    w[i], v[i] = map(int, input().split())

def knap(i, j):
    if dp[i][j] is not None:
        return dp[i][j]

    res = 0

    if i == n:
       	res = 0
    elif j < w[i]:
        res = knap(i+1, j)
    else:
        res = max(knap(i+1, j), knap(i+1, j-w[i]) + v[i])

    dp[i][j] = res
    return dp[i][j]

for i in reversed(range(n)):
    for j in range(W+1):
#        res = 0
        # if i == n-1:
        #     res = 0
        if j < w[i]:
            dp[i][j] = dp[i+1][j]
        else:
            dp[i][j] = max(dp[i+1][j], dp[i+1][j-w[i]] + v[i])

#print(knap(0, W))
print(dp[0][W])
import sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())
nsl = lambda: map(str, sys.stdin.readline().split())

n = ni()
a = collections.deque(nl())
ans = collections.deque()
if n % 2 == 0:
    for i in range(n):
        if i % 2 == 0:
            ans.append(str(a.popleft()))
        else:
            ans.insert(0, str(a.popleft()))
else:
    for i in range(n):
        if i % 2 == 0:
            ans.insert(0, str(a.popleft()))
        else:
            ans.append(str(a.popleft()))
print(' '.join(ans))


### FIXED CODE ###

import sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())
nsl = lambda: map(str, sys.stdin.readline().split())

n = ni()
a = collections.deque(nl())
ans = collections.deque()
if n % 2 == 0:
    for i in range(n):
        if i % 2 == 0:
            ans.append(str(a.popleft()))
        else:
            ans.appendleft(str(a.popleft()))
else:
    for i in range(n):
        if i % 2 == 0:
            ans.appendleft(str(a.popleft()))
        else:
            ans.append(str(a.popleft()))
print(' '.join(ans))
from collections import deque
H, W = list(map(int, input().split()))

city = []

for _ in range(H):
    city.append(list(input()))

black_grid = []

for i in range(H):
    for j in range(W):
        if city[i][j] == "#":
            black_grid.append((i, j))

dist = [[float("inf") for _ in range(W)] for _ in range(H)]

dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]

for start in black_grid:
    sx, sy = start
    queue = deque()
    queue.append(start)
    dist[sy][sx] = 0

    while len(queue) > 0:
        now_x, now_y = queue.popleft()

        for dx_, dy_ in zip(dx, dy):
            adj_x = now_x + dx_
            adj_y = now_y + dy_

            if (not 0 <= adj_x < W) or (not 0 <= adj_y < H):
                continue

            if city[adj_y][adj_x] == "#":
                continue

            #初めてそのマスに到達する場合
            if dist[adj_y][adj_x] > H*W:
                dist[adj_y][adj_x] = dist[now_y][now_x] + 1
                queue.append((adj_x, adj_y))

            if dist[adj_y][adj_x] > dist[now_y][now_x] + 1:
                dist[adj_y][adj_x] = dist[now_y][now_x] + 1
                queue.append((adj_x, adj_y))

ans = -1
for i in range(H):
    for j in range(W):
        if dist[i][j] <= H*W:
            ans = max(dist[i][j], ans)


print(ans)


### FIXED CODE ###

from collections import deque
H, W = list(map(int, input().split()))

g = []

for _ in range(H):
    g.append(list(input()))

dist = [[-1 for _ in range(W)] for _ in range(H)]
queue = deque()

for i in range(H):
    for j in range(W):
        if g[i][j] == "#":
            dist[i][j] = 0
            queue.append((j, i))

dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]

while len(queue) > 0:
    now_x, now_y = queue.popleft()

    for dx_, dy_ in zip(dx, dy):
        adj_x = now_x + dx_
        adj_y = now_y + dy_

        if (not 0 <= adj_x < W) or (not 0 <= adj_y < H):
            continue

        if g[adj_y][adj_x] == "#" :
            continue

        if g[adj_y][adj_x] == ".":
            g[adj_y][adj_x] = "#"
            queue.append((adj_x, adj_y))
            dist[adj_y][adj_x] = dist[now_y][now_x] + 1

ans = 0
for i in range(H):
    for j in range(W):
        ans = max(dist[i][j], ans)

print(ans)
# coding:utf-8
import sys
import datetime

H1 = int(sys.stdin.readline())
M1 = int(sys.stdin.readline())
H2 = int(sys.stdin.readline())
M2 = int(sys.stdin.readline())
K = int(sys.stdin.readline())

while not (H1 < 23 or M1 < 59 or H2 < 23 or M2 < 59):
	H1 = int(sys.stdin.readline())
	M1 = int(sys.stdin.readline())
	H2 = int(sys.stdin.readline())
	M2 = int(sys.stdin.readline())
	K = int(sys.stdin.readline())
else:
	if M2 >= M1:
		a = (H2 - H1) * 60 + M2 - M1
		print(a - K)
	if M2 < M1:
		b = (H2 - H1) * 60 + M1 - M2
		print(b - K)

### FIXED CODE ###

import sys
readline = sys.stdin.buffer.readline

h1, m1, h2, m2, k = map(int, readline().split())
print(60 * (h2 - h1) + m2 - m1 - k)
import math

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

x = [X] + list(map(int, input().split()))
x.sort()

dic = []

for i in range(len(x) - 1):
    tmp = x[i + 1] - x[i]
    if tmp not in dic:
        dic.append(tmp)

ans = max(dic)

if len(dic) > 1:
    for i in range(len(dic) - 1):
        ans = min(ans, math.gcd(dic[i], dic[i + 1]))

print(ans)

### FIXED CODE ###

import fractions

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

x = [X] + list(map(int, input().split()))
x.sort()

dic = []

for i in range(len(x) - 1):
    tmp = x[i + 1] - x[i]
    if tmp not in dic:
        dic.append(tmp)

ans = max(dic)

for i in range(len(dic) - 1):
    ans = min(ans, fractions.gcd(dic[i], dic[i + 1]))

print(ans)
from sys import exit

N = int(input())

if N == 1:
  print('Hello World')
  exit(0)

A, B = [int(x) for x in input().split()]
print(A + B)

### FIXED CODE ###

from sys import exit

N = int(input())

if N == 1:
  print('Hello World')
  exit(0)

A = int(input())
B = int(input())
print(A + B)
def cal(truck_num, cargos):
    p = []
    
    for i in range(len(cargos) - truck_num + 1):
        if truck_num > 1:
            p.append(max(sum(cargos[:i + 1]), cal(truck_num - 1, cargos[i + 1:])))
        else:
            return sum(cargos)
    return min(p)

if __name__ == "__main__":
    line = input()
    truck_num = line.split(" ")[1]
    line_num = line.split(" ")[0]
    cargos = []
    for cargos in range(line_num):
        cargos.append(int(input()))
    print(cal(truck_num,cargos))

### FIXED CODE ###

#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_4_D
#??????????????????

def cal(truck_num, cargos):
    p = 0
    
    for i in range(len(cargos) - truck_num + 1):
        if not i == 0 and p < sum(cargos[:i + 1]):
            continue
        if truck_num > 1:
            r = max(sum(cargos[:i + 1]), cal(truck_num - 1, cargos[i + 1:]))
            if i == 0:
                p = r
            elif p > r:
                p = r
        else:
            return sum(cargos)
    return p

def check(truck_num, carogs, target_load):
    
    cur_truck = 1
    cur_weight = 0
    for weight in cargos:
        cur_weight += weight
        if cur_weight > target_load:
            cur_weight = weight
            cur_truck += 1
            if cur_truck > truck_num:
                return False
    return True

def solve(truck_num, cargs):

    max_load = sum(cargos)
    min_load = max(cargos)
    #print(min_load, max_load)
    while min_load < max_load:
        target_load = int((min_load + max_load)/2)
        if check(truck_num, cargos, target_load):
            max_load = target_load
        else:
            min_load = target_load + 1
        #print(min_load, max_load)
        
    return max_load

if __name__ == "__main__":
    line = input()
    truck_num = int(line.split(" ")[1])
    line_num = int(line.split(" ")[0])
    cargos = [int(input()) for i in range(line_num)]
    print(solve(truck_num,cargos))
a=[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(a[int(input())])

### FIXED CODE ###

a=[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(a[int(input())-1])
K = int(input())  # ぜんぜんちがう
ans = -1

def moduloseven(K):
	for i in range(1000):
		sev = int(str(7)*(i+1))
		if sev % K == 0:
			ans = i+1
			break
	return(ans)


if K % 2 != 0:
	if K % 5 != 0:
		ans = moduloseven(K)
print(ans)


### FIXED CODE ###

#ABC_174_C_Respect_review.py

K = int(input())
ans = 1

if K % 2 == 0:
	print(-1)
	exit()
if K % 5 == 0:
	print(-1)
	exit()

temp = 7
for i in range(1*10**6):
	if temp % K == 0:
		print(ans)
		exit()
	res = temp % K
	temp = res*10 + 7
	ans += 1
print(-1)
for i in range(B):
    if A * i >= B:
        print(i)
        break


### FIXED CODE ###

import math

A, B = map(int, input().split())
if B == 1:
    print(0)
else:
    ans = math.ceil(B / A)
    while A * ans - (ans - 1) < B:
        ans += 1
    print(ans)
N = int(input())
a = map(int, input().split())

sorted_list = sorted(a)
print(sorted_list)
num = 0
last_num = 0

for i in range(N):
    if len(sorted_list) == 1:
        if i == 0:
            last_num = sorted_list[num]
        last_num = (sorted_list[num] + last_num) / 2
        break
    x = sorted_list[num]
    y = sorted_list[num+1]
    z = (x + y) / 2
    last_num = z
    sorted_list.pop(num)
    sorted_list.pop(num)

print(last_num)


### FIXED CODE ###

n = int(input())
v = sorted(list(map(int, input().split())))
ans = v[0]

for i in range(n-1):
    ans = (ans + v[i+1]) / 2
print(ans)
from math import gcd

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

if n == 1:
    ans = 1000000000
elif n == 2:
    ans = max(a)
else:
    l = [a[0]]
    for i in range(1, n):
        l.append(gcd(l[-1], a[i]))
    r = [a[-1]]
    for i in range(n - 1, -1, -1):
        r.append(gcd(r[-1], a[i]))
    r = list(reversed(r))
    ans = max(l[-2], r[1])
    for i in range(1, n - 1):
        ans = max(ans, gcd(l[i - 1], r[i + 1]))
print(ans)

### FIXED CODE ###

from fractions import gcd

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

if n == 1:
    ans = 1000000000
elif n == 2:
    ans = max(a)
else:
    l = [a[0]]
    for i in range(1, n):
        l.append(gcd(l[-1], a[i]))
    r = [a[-1]]
    for i in range(n - 1, -1, -1):
        r.append(gcd(r[-1], a[i]))
    r = list(reversed(r))
    ans = max(l[-2], r[1])
    for i in range(1, n - 1):
        ans = max(ans, gcd(l[i - 1], r[i + 1]))
print(ans)
# tiles = list(map(int, input()))
# inputs = "10010010"
# tiles = list(map(int, inputs))


def count_repaint_tiles(tiles):
    if len(tiles) == 0:
        return 0
    counts = 0
    color = tiles[0]
    for tile in tiles[1:]:
        if tile == color:
            counts = counts + 1
        color = 1 - color
    return counts


print(count_repaint_tiles(tiles))


### FIXED CODE ###

tiles = list(map(int, input()))
# inputs = "10010010"
# tiles = list(map(int, inputs))


def count_repaint_tiles(tiles):
    if len(tiles) == 0:
        return 0
    counts = 0
    color = tiles[0]
    for tile in tiles[1:]:
        if tile == color:
            counts = counts + 1
        color = 1 - color
    return counts


print(count_repaint_tiles(tiles))
N = int(input())
A = [int(hoge) for hoge in input().split()]
DP = [[0]*3 for n in range(N)] #DP[n][y] = n桁目までみて、i//2 -1 + y個選んだときの最大値

DP[0][0] = A[0]


for n in range(N):#n桁目までみる
    DP[n][0] = DP[n-2][0] + A[n]
    DP[n][1] = max((DP[n-2][1],DP[n-3][0]))+A[n]
    DP[n][2] = max((DP[n-2][2],DP[n-3][1],DP[n-4][0]))+A[n]
print(max(DP[N-1]))

### FIXED CODE ###

#基本1つ飛ばしだが、パスも使える。
#奇数ならパス2回、偶数ならパス1回。
N = int(input())
A = [int(hoge) for hoge in input().split()]
DP = [[0]*3 for n in range(N)] #DP[n][y] = n桁目までみて、パスをy回使ったときの最大値

DP[0][0] = A[0]

for n in range(1,N):#n桁目までみる。
    #「選ぶ」か「パスを使う」かの2択。
    DP[n][0] = DP[n-2][0] + A[n]
    DP[n][1] = max((DP[n-2][1]+A[n],DP[n-1][0]))
    DP[n][2] = max((DP[n-2][2]+A[n],DP[n-1][1]))
if N%2:
    print(DP[n][2])
else:
    print(DP[n][1])
N = int(input())
H = [int(x) for x in input().split()]
L = []
count = 1

for n in range(len(H)-1):
    if H[n]-H[n+1]>=0:
        count += 1
        L.append(count)
    else:
        count = 1

print(max(L))


### FIXED CODE ###

N = int(input())
H = [int(x) for x in input().split()]
L = []
count = 0
L.append(0)

for n in range(len(H)-1):
    if H[n]-H[n+1]>=0:
        count += 1
        L.append(count)
    else:
        count = 0

print(max(L))