Harryxun/stf_run huggingface dataset:
N = int(input())
X,Y = [],[]
for _ in range(N):
    x,y = map(int,input().split())
    X.append(x)
    Y.append(y)
inf = 10**10

d = {}
for i in range(N):
    for j in range(i+1,N):
        if X[i] >= X[j]:
            r,l = i,j
        else:
            r,l = j,i
        k = (X[r]-X[l],Y[r]-Y[l])
        if k in d.keys():
            d[k] += 1
        else:
            d[k] = 1

print(N-(max(d.values())))

### FIXED CODE ###

N = int(input())
X,Y = [],[]
for _ in range(N):
    x,y = map(int,input().split())
    X.append(x)
    Y.append(y)
inf = 10**10

d = {}
for i in range(N):
    for j in range(i+1,N):
        if X[i] > X[j]:
            r,l = i,j
        elif X[i] == X[j]:
            if Y[i] > Y[j]:
                r,l = i,j
            else:
                r,l = j,i
        else:
            r,l = j,i
        k = (X[r]-X[l],Y[r]-Y[l])
        if k in d.keys():
            d[k] += 1
        else:
            d[k] = 1

if N == 1:
    print(1)
else:
    print(N-(max(d.values())))
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n, k = map(int, input().split())
    A = list(map(int, input().split()))

    minus = []
    plus = []
    for a in A:
        if a < 0:
            minus.append(a)
        else:
            plus.append(a)

    if len(minus) == 0:
        A.sort(reverse=True)
        res = 1
        for i in range(k):
            res = (res * A[i]) % mod
        print(res)
    elif len(plus) == 0:
        res = 1
        if k % 2 != 0:
            A.sort(reverse=True)
            for i in range(k):
                res = (res * A[i]) % mod
        else:
            A.sort()
            for i in range(k):
                res = (res * A[i]) % mod
        print(res)
    else:
        minus.sort()
        plus.sort(reverse=True)
        if len(plus) > 1 and len(minus) > 1:
            dp = [0 for _ in range(k + 1)]
            dp[0] = 1
            dp[1] = plus[0] % mod
            dp[2] = max(minus[0] * minus[1] % mod, plus[0] * plus[1] % mod)
            for i in range(3, k + 1):
                if i % 2 != 0:
                    dp[i] = dp[i - 1] * plus[i] % mod
                else:
                    dp[i] = max(dp[i - 1] * plus[i] % mod, dp[i - 2] * minus[i - 1] * minus[i] % mod)
            print(dp[-1])
        else:
            if len(plus) == 1:
                dp = [0 for _ in range(k + 1)]
                dp[0] = 1
                for i in range(1, k + 1):
                    if i % 2 != 0:
                        dp[i] = dp[i - 1] * plus[0] % mod
                    else:
                        dp[i] = max(dp[i - 2] * minus[i - 1] * minus[i] % mod)
                print(dp[-1])
            else:
                res = 1
                for i in range(k):
                    res = (res * plus[i]) % mod
                print(res)


if __name__ == '__main__':
    resolve()


### FIXED CODE ###

import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n, k = map(int, input().split())
    A = list(map(int, input().split()))
    M, P = [], []
    for a in A:
        M.append(a) if a < 0 else P.append(a)

    m, p = len(M), len(P)
    ok = False
    if p > 0:
        ok = m % 2 == 0 if n == k else True
    else:
        ok = k % 2 == 0

    res = 1
    if not ok:
        A.sort(key=lambda x: abs(x))
        for i in range(k):
            res = (res * A[i]) % mod
    else:
        P.sort()
        M.sort(reverse=True)
        if k % 2:
            a = P.pop()
            res = (res * a) % mod
        M_2 = []
        while len(P) >= 2:
            a = P.pop()
            a *= P.pop()
            M_2.append(a)
        while len(M) >= 2:
            a = M.pop()
            a *= M.pop()
            M_2.append(a)
        M_2.sort(reverse=True)
        for i in range(k // 2):
            res = (res * M_2[i]) % mod
    print(res)


if __name__ == '__main__':
    resolve()
def comb(n, k, mod=10 ** 9 + 7):
    denominator = 1
    numerator = 1
    for i in range(1, k + 1):
        denominator = denominator * i % mod
    for i in range(n - k + 1, n + 1):
        numerator = numerator * i % mod
    return numerator * pow(denominator, mod - 2, mod) % mod


def main():
    n, m, k = map(int, input().split())
    mod = 998244353
    ans = 0
    for i in range(k + 1, -1, -1):
        ans += m * pow(m - 1, n - 1 - i, mod) * comb(n - 1, i, mod)
        ans %= mod
    print(ans)


if __name__ == '__main__':
    main()



### FIXED CODE ###

def comb(n, k, nk, mod):
    return (n * pow(k * nk, mod - 2, mod)) % mod


def main():
    n, m, k = map(int, input().split())
    mod = 998244353
    ans = 0
    base = pow(m - 1, n - 1 - k, mod)
    fact = [1 for _ in range(n + 1)]
    for i in range(1, n + 1):
        fact[i] = fact[i - 1] * i
        fact[i] %= mod
    for i in range(k, -1, -1):
        ans += base * comb(fact[n - 1], fact[i], fact[n - i - 1], mod)
        ans %= mod
        base *= m - 1
        base %= mod
    ans *= m
    ans %= mod
    print(ans)


if __name__ == '__main__':
    main()
a, b = int(input())

d = a//b
r = a%b
f = a/b

print(d, r, f)


### FIXED CODE ###

a, b = map(int, input().split())

d = a//b
r = a%b
f = a/b

print(f'{d} {r} {f:.5f}')
N,K=list(map(int,input().split()))
height=list(map(int,input().split()))
ans=10**10
for i in range(2**N):
    cost=0
    height2=height.copy()
    for j in range(N):
        if i>>j&1:
            count=0
            for k in range(j):
                if height2[k]>=height2[j]:
                    cost+=height2[k]-height2[j]+1
                    height2[j]+=height2[k]-height2[j]+1
            for x in range(1,N):
                if height2[0]<height2[x]:
                    count+=1

            if ans>cost and count==K-1:
                ans=cost


print(ans)

### FIXED CODE ###

N, K = list(map(int, input().split()))
height = list(map(int, input().split()))
ans = 10 ** 10
if N==K:
    cost=0
    for i in range(1,N):
        if height[i-1]>=height[i]:
            cost+=height[i-1]-height[i]+1
            height[i]+=height[i-1]-height[i]+1
    print(cost)
    exit()
for i in range(2 ** N):
    count=1
    cost = 0
    height2 = height.copy()
    for j in range(N):
        if i >> j & 1:
            if j!=0:
                tarou=max(height2[:j])
                if height2[j]<=tarou:
                    cost+=tarou-height2[j]+1
                    height2[j]+=tarou-height2[j]+1
                    count+=1
                else:count+=1
    # zenkai=0
    # for x in range(1,N):
    #     if height2[zenkai] < height2[x]:
    #         count += 1
    #         zenkai=x
    if ans > cost and count >= K:
        ans = cost

print(ans)
N = int(input())
hlist = list(map(int, input().split()))

#再帰
"""
def function(n)
if 終了条件 return 初項
return function(n-1)を処理したもの
"""
def dp(n):
  if n==0: return 0
  if n==1: return abs(hlist[1] - hlist[0])
  else: return min(dp(n-1)+abs(hlist[n]-hlist[n-1]), dp(n-2)+abs(hlist[n]-hlist[n-2]))

print(dp(N-1))

### FIXED CODE ###

N = int(input())
hlist = list(map(int, input().split()))
cost = [-1 for _ in range(N)]

def dp(n):
  if n==0: return 0
  if n==1: return abs(hlist[1] - hlist[0])
  else: return min(cost[n-1]+abs(hlist[n]-hlist[n-1]), cost[n-2]+abs(hlist[n]-hlist[n-2]))

for i in range(N):
  cost[i]=dp(i)
print(cost[-1])
N = int(input())
Hs = map(int, input().split())

"""
SEA H_1 H_2 H_3 H_4 ... H_N
"""

# 0 ~ i番目の旅館のうち最も高いもの
# max(Hs[0:i+1])

ret = 0
for i in range(N):
    if Hs[i] == max(Hs[0:i+1]):
        ret += 1

print(ret)

### FIXED CODE ###

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

"""
SEA H_1 H_2 H_3 H_4 ... H_N
"""

# 0 ~ i番目の旅館のうち最も高いもの
# max(Hs[0:i+1])

ret = 0
for i in range(N):
    if Hs[i] == max(Hs[0:i+1]):
        ret += 1

print(ret)
N = input()
final = 1000 - N%1000
if final == 1000:
    print(0)
else:
    print(final)

### FIXED CODE ###

N = int(input())
final = 1000 - N%1000
if final == 1000:
    print(0)
else:
    print(final)
import sys
import itertools
from operator import itemgetter #sortedの対象を決めたい
from fractions import gcd #最大公約数
from math import ceil, floor, sqrt, isinf #小数点切り上げ、切り捨て、平方根、inf
from copy import deepcopy #参照で影響されないコピー
from collections import Counter, deque #要素ごとの出現回数、双方向アクセス可能データ型
import heapq
import numpy as np
from functools import reduce
sys.setrecursionlimit(200000)

input = sys.stdin.readline
# template


n = int(input())
h = list(map(int, input().split()))
# h = [int(x) for x in input().split()]

dp = [isinf()] * n
dp[0] = 0

for i in (0, n):
    dp[i+1] = max(dp[i+1], dp[i] + abs(h[i] + h[i+1]))
    dp[i+2] = max(dp[i+2], dp[i] + abs(h[i] - h[i+2]))

print(dp[-1])









### FIXED CODE ###

import sys
import itertools
from operator import itemgetter #sortedの対象を決めたい
from fractions import gcd #最大公約数
from math import ceil, floor, sqrt, isinf #小数点切り上げ、切り捨て、平方根
from copy import deepcopy #参照で影響されないコピー
from collections import Counter, deque #要素ごとの出現回数、双方向アクセス可能データ型
import heapq
import numpy as np
from functools import reduce
sys.setrecursionlimit(200000)

input = sys.stdin.readline
# template


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

dp = [1e9] * n

dp[0] = 0

for i in range(1, n):
    dp[i] = min(dp[i], dp[i-1] + abs(h[i] - h[i-1]))
    if(i > 1):
         dp[i] = min(dp[i], dp[i-2] + abs(h[i] - h[i-2]))

print(dp[-1])
k, x = input().split()
if x % 500 == 0 and k * 500 <= x:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

k, x = map(int, input().split())
if k * 500 >= x:
    print('Yes')
else:
    print('No')
print('YNeos'['AC'in input()::2]

### FIXED CODE ###

print('YNeos'[not'AC'in input()::2])
import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
#! //Users/daigofujiwara/anaconda3/bin python3

#h行で列和がyかy+1であるかどうかとサンプルを出力

input1=input()

input2=input()

x,y=input1.split(" ")
N,M=int(x),int(y)

A=input2.split(" ")

A=[int(a) for a in A ]

B=[]
for a in A:
    B.append(a//2)


Mb=lcm_list(B)
gmp=None

i=1
while True:
    m=Mb*i
    if m>M:
        break
    T=1
    for b in B:
        if not ((m//b)%2==1):
            T=0
    if T==1:
        gmp=m
        break
    
    i+=1


if gmp is None:
    print(0)
else:
    print(int(math.floor(M/gmp+1.0)/2.0))




### FIXED CODE ###

import math
from functools import reduce
from fractions import gcd

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

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
#! //Users/daigofujiwara/anaconda3/bin python3

#h行で列和がyかy+1であるかどうかとサンプルを出力

input1=input()

input2=input()

x,y=input1.split(" ")
N,M=int(x),int(y)

A=input2.split(" ")

A=[int(a) for a in A ]

B=[]
for a in A:
    B.append(a//2)


Mb=lcm_list(B)
gmp=None


T=1
for b in B:
    if not (Mb//b)%2==1:
        T=0
if T==1:
    gmp=Mb




if gmp is None:
    print(0)
else:
    print(int(math.floor(M/gmp+1.0)/2.0))
n,m = map(int,input().split())
tree_list  = []
answer_list = [0]
for i in range(n-1):
    tree_list.append(list(map(int,input().split())))
    answer_list.append(0)
for i in range(m):
    num1,num2 = map(int,input().split())
    answer_list[num1-1] +=  num2
for i in range(n): 
    true = True
    while true:
        true = False
        print(i)
        for _ in tree_list:
            if i == _[0]-1:
                answer_list[_[1]-1] += answer_list[i]
                tree_list.remove(_)
                true = True
for i in answer_list:
    print(i)

### FIXED CODE ###

num = int(input())
s = input()
if num  >= 3200:
    print(s)
else:
    print('red')
def main():
  M=10**9+7
  r=tuple(tuple((j-k)*9%13for j in range(10))for k in range(13))
  d=[1]+[0]*12
  for c in input():
    d = if c>'9' [sum(d[j]for j in k)%M for k in r] else [d[(int(c)-k)*9%13]for k in range(13)]
  print(d[5])
main()

### FIXED CODE ###

import numpy as np

s = input()
p = np.array([0]*13)
p[0] = 1

amari = [[0]*13 for _ in range(13)]
for j in range(10):
  for i in range(13):
    amari[i][(i*10+j)%13] += 1
M = np.array(amari)

for si in range(len(s)):
  a = np.array([0]*13)
  if s[si] == '?':
    a = np.dot(p,M)
  else:
    c = int(s[si])
    for i in range(13):
      a[(i*10+c)%13] += p[i]
  p = np.mod(a,1000000007)
print(p[5])
def prod(array):
    res = 1
    for a, _ in array:
        res *= a
        res %= MOD
    return res

MOD = 10**9 + 7
N, K = map(int, input().split())
A = []
for a in map(int, input().split()):
    A.append((abs(a), a < 0))
A.sort(reverse=True)
sgn = 0
s0 = -1
lastA = -1
for i, p in enumerate(A[:K]):
    a, s = p
    sgn += s
    if s != s0:
        lastA = i-1
    s0 = s
lasts = s0
if sgn%2==0:
    print(prod(A[:K])%MOD)
    exit()
if sgn + sum(s for _, s in A[K:])==N:
    print(-prod(A[-K:])%MOD)
    exit()
if lasts != A[K][1]:
    res = prod(A[:K-1])*A[K][0]
else:
    firstA = None
    for i, p in enumerate(A[K:],start=K):
        a, s = p
        if s != lasts:
            firstA = i
            break
    print(firstA)
    res1 = prod(A[:K-1])*A[firstA][0] if firstA is not None else -float("inf")
    res2 = prod(A[:lastA])*prod(A[lastA+1:K+1]) if lastA != -1 else -float("inf")
    res = max(res1, res2)
print(res%MOD)
"""
6 4
5 -3 -3 -3 -3 -2

3 3
-1 -1 0
"""

### FIXED CODE ###

def prod(array):
    res = 1
    for a, _ in array:
        res *= a
        res %= MOD
    return res

MOD = 10**9 + 7
N, K = map(int, input().split())
if N==K:
    res = 1
    for a in map(int, input().split()):
        res *= a
        res %= MOD
    print(res)
    exit()
A = []
allsgn = 0
for a in map(int, input().split()):
    A.append((abs(a), a < 0))
    allsgn += a<0
A.sort(reverse=True)
sgn = 0
s0 = -1
lastA = -1
for i, p in enumerate(A[:K]):
    a, s = p
    sgn += s
    if s != s0:
        lastA = i-1
    s0 = s
lasts = s0
if allsgn==N:
    if K%2==1:
        print((-prod(A[-K:]))%MOD)
        exit()
    else:
        print(prod(A[:K])%MOD)
        exit()
if sgn%2==0:
    print(prod(A[:K])%MOD)
    exit()
if lasts != A[K][1]:
    res = prod(A[:K-1])*A[K][0]
else:
    firstA = None
    for i, p in enumerate(A[K:],start=K):
        a, s = p
        if s != lasts:
            firstA = i
            break
    if lastA == -1 or (firstA is not None and A[K][0]/A[lastA][0] < A[firstA][0]/A[K-1][0]):
        res = prod(A[:K - 1]) * A[firstA][0]
    else:
        res = prod(A[:lastA]) * prod(A[lastA + 1:K + 1])
print(res%MOD)
"""
6 3
5 -3 -3 -3 -3 -2

10 7
-10 -10 -10 -10 10 10 10 10 10 10
"""
N, X = [int(_) for _ in input().split()]
xs = [abs(int(_) - X) for _ in input().split()]

def gcd(p, q):
    if p < q:
        return gcd(q, p)
    if p % q == 0:
        return q
    return gcd(q, p % q)

def gcdList(numbers):
    if len(numbers) == 1:
        return numbers[0]
    if len(numbers) == 2:
        return gcd(numbers[0], numbers[1])
    else:
        return gcdList([gcd(numbers[0], numbers[1])] + numbers[2:])

print(gcdList(xs))

### FIXED CODE ###

N, X = [int(_) for _ in input().split()]
xs = [abs(int(_) - X) for _ in input().split()]

def gcd(p, q):
    while q != 0:
        p, q = q, p % q
    return p

y = xs[0]
for i in range(N):
    if xs[i] % y != 0:
        y = gcd(y, xs[i])

print(y)
letters = eval(input("Enter your words: "))
for i in letters:
  print(["Yes" if (i[2]==i[3] and i[4]==i[5]) else "NO" )


### FIXED CODE ###

l = input()
print("Yes" if (l[2]==l[3] and l[4]==l[5]) else "No")
n = int(input())
    a = list(map(int, input().split()))
    b = [0 for _ in range(max(a)+1)]
    for x in a:
        b[x] += 1
    c = sum([x*(x-1)//2 for x in b])
    for i in range(n):
        print(c-b[a[i]]+1)

### FIXED CODE ###

from collections import Counter
N = int(input(""))
A = list(map(int,input().split()))
X = 0

A_e = list(set(A))

x = Counter(A)

for i in A_e:
    if x[i] >= 2:
        xc2 = x[i]*(x[i]-1)/2
        X = X + xc2

for k in A:
    print(int(X-x[k]+1))
S=input()

from collections import Counter

c=Counter([S[0],S[1],S[2],S[3]])

if len(list(c.keys()))==2:
    flag=True
    for key in c.keys():
        if c[key]!=2:
            flag=False:
            break

    if flag:
        print("Yes")
    else:
        print("No")
else:
    print("No")

### FIXED CODE ###

S=input()

from collections import Counter

c=Counter([S[0],S[1],S[2],S[3]])

if len(list(c.keys()))==2:
    flag=True
    for key in c.keys():
        if c[key]!=2:
            flag=False
            break

    if flag:
        print("Yes")
    else:
        print("No")
else:
    print("No")
x, y, z = int(input().split)
print(int(z, x, y))

### FIXED CODE ###

x, y, z = map(int, input().split())
 
x, y, z = y, z, x
print(y, z, x)
3 3 10
60 2 2 4
70 8 7 9
50 2 3 9

### FIXED CODE ###

from collections import deque
import itertools

n,m,x=map(int, input().split())

li = deque()

sum = -1
ans = 0
for i in range(n):
    li.append(list(map(int, input().split())))

for i in range(1,n+1):
    for v in itertools.combinations(li, i):
        ok = True
        for j in range(1,m+1):
            ans = 0
            for k in v:
                ans += k[j]
                if ans >= x:
                    break
            if ans < x:
                ok = False
                break

        if ok == True:
            s=0
            for j in range(i):
                s+=v[j][0]
            if sum > s or sum == -1:
                sum=s


print(sum)
import numpy as np
N, M, K = map(int, input().split())
MOD = 998244353
dp = np.array([0]*(K+1))
dp[0] = M

for _ in range(N-1):
    dp = dp + np.append(0, dp)[:K+1]*(M-1)%MOD
    dp %= MOD
print(sum(dp[:K+1])%MOD)

### FIXED CODE ###

import numpy as np
N, M, K = map(int, input().split())
MOD = 998244353

def prepare(n, MOD):
    """
    nCr mod MOD
    :param n:
    :param MOD:
    :return:
    """
    facts = [1]*(n+1)
    for i in range(1, n+1):
        facts[i] = facts[i-1]*i%MOD
    invs = [1]*(n+1)
    invs[n] = pow(facts[n], MOD-2, MOD)
    for i in range(0, n)[::-1]:
        invs[i] = invs[i+1] * (i+1) % MOD
    return facts, invs

facts, invs = prepare(N, MOD)
ans = 0
col = M*(M-1)**(N-K-1)%MOD
for i in range(K+1)[::-1]:
    combi = facts[N-1]*invs[N-1-i]*invs[i]
    ans += col*combi
    ans %= MOD
    col *= (M - 1)
    col %= MOD
print(ans)
a = list(input().split())
ans = a[0][0]+b[0][0]+c[0][0]
print(ans)

### FIXED CODE ###

#48a
a = list(input().split())
ans = a[0][0]+a[1][0]+a[2][0]
print(ans)
# C
N, K = map(int, input().split())
x_list = list(map(int, input().split()))

zero_cnt = 0
posi_ind = N+1
nega_ind = -1
# minus
for i in range(N):
    if x_list[i] == 0:
        zero_cnt = 1
        nega_ind = i-1
    elif x_list[i] > 0:
        posi_ind = i
        if zero_cnt == 0:
            nega_ind = i-1
        break
if zero_cnt == 1:
    K -= 1
res = 10**13
if K == 0:
    res = 0
for i in range(1, min(nega_ind+1, K)+1):
    p = x_list[posi_ind+(K-i-1)]
    n = -x_list[nega_ind - i + 1]
    r = min(2*p+n, 2*n+p)
    res = min(res, r)
l = posi_ind+(K-1)
if l < N:
    r = x_list[l]
    res = min(res, r)
print(res)

### FIXED CODE ###

# C
N, K = map(int, input().split())
x_list = list(map(int, input().split()))

zero_cnt = 0
posi_ind = N
nega_ind = -1

# minus
for i in range(N):
    if x_list[i] == 0:
        zero_cnt = 1
        nega_ind = i-1
    elif x_list[i] > 0:
        posi_ind = i
        if zero_cnt == 0:
            nega_ind = i-1
        break
if zero_cnt == 1:
    K -= 1

if x_list[N-1] < 0:
    nega_ind = N-1
    
nega_seq = list(reversed(x_list[:(nega_ind+1)]))
posi_seq = x_list[posi_ind:]

res = 10**13
if K == 0:
    res = 0
else:
    for i in range(1, min(len(posi_seq)+1, K)):
        if K-i-1 >= len(nega_seq) or K-i-1 < 0:
            continue
        p = posi_seq[i-1]
        n = -nega_seq[K-i-1]
        r = min(2*p+n, 2*n+p)
        res = min(res, r)
    if len(posi_seq) >= K:
        r = posi_seq[K-1]
        res = min(res, r)
    if len(nega_seq) >= K:
        r = -nega_seq[K-1]
        res = min(res, r)
print(res)
import sys
sys.setrecursionlimit(10**6)

n,m,x = map(int,input().split())
ca = [list(map(int,input().split())) for _ in range(n)]
inf = float('inf')

def solve(s):
    if len(s) == n:
        res = 0
        li = [0]*n
        for i in range(n):
            if s[i] == '1':
                res += ca[i][0]
                for j in range(m):
                    li[j] += ca[i][j+1]

        if all(a >= x for a in li):
            return res
        else:
            return inf
    
    else:
        return min(solve(s+'1'), solve(s+'0'))

print(solve(""))

### FIXED CODE ###

n,m,x=map(int,input().split())
ca = [list(map(int,input().split())) for _ in range(n)]

ans = 1234567890123

for bit in range(1<<n):
    syu = [0]*m
    cost = 0
    for i in range(n):
        if (bit>>i)&1:
            cost += ca[i][0]
            for j in range(1,m+1):
                syu[j-1] += ca[i][j]
    ok = True
    for i in range(m):
        if syu[i] < x:
            ok = False

    if ok:
        ans = min(ans,cost)
print(ans if ans != 1234567890123 else -1)
x = list(map(int,input().split())
         
for i in range(5):
	if x[i] == 0:
    	print(i+1)
  

### FIXED CODE ###

a, b, c, d, e = map(int,input().split())

if a == 0:
  print(1)
elif b == 0:
  print(2)
elif c == 0:
  print(3)
elif d == 0:
  print(4)
elif e == 0:
  print(5)
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり

N = I()
A = LI()

from functions import gcd

L = [0]*N  # L[i] = A[0]からA[i]までの最大公約数
R = [0]*N  # R[i] = A[i]からA[N-1]までの最大公約数

for i in range(N-1):
    if i == 0:
        L[i] = A[i]
        R[N-1-i] = A[N-1-i]
    else:
        L[i] = gcd(L[i-1],A[i])
        R[N-1-i] = gcd(R[N-i],A[N-1-i])

a = max(L[N-1],R[1])

if N == 2:
    print(a)
else:
    print(max(a,max(gcd(L[i],R[i+2]) for i in range(N-2))))

### FIXED CODE ###

import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり

N = I()
A = LI()

from fractions import gcd

L = [0]*N  # L[i] = A[0]からA[i]までの最大公約数
R = [0]*N  # R[i] = A[i]からA[N-1]までの最大公約数

for i in range(N-1):
    if i == 0:
        L[i] = A[i]
        R[N-1-i] = A[N-1-i]
    else:
        L[i] = gcd(L[i-1],A[i])
        R[N-1-i] = gcd(R[N-i],A[N-1-i])

a = max(L[N-2],R[1])

if N == 2:
    print(a)
else:
    print(max(a,max(gcd(L[i],R[i+2]) for i in range(N-2))))
t=input()
a,*b,c=t
print(a+len(*b)+c)

### FIXED CODE ###

t=input()
a,*b,c=t
print(a+str(len(b))+c)
import sys
 
args = sys.argv
prices = map(int, args[2:])
min = prices[0]
max_profit = 0

for price in prices:
    if min > price:
        min = price
    max_profit = price - min

print(max_profit)


### FIXED CODE ###

n = input()
prices = list()
for idx in range(int(n)):
    tmp = input()
    prices.append(int(tmp))

minp = prices[0]
maxv = prices[1] - prices[0]

for price in prices[1:]:
    maxv = max(maxv, price - minp)
    minp = min(minp, price)

print(maxv)
N = int(input())
S = input().split()

list = []
befor

for i in len(S):
  if len(list) == 0:
    list.append(S[i])
  else:
    if list[-1] == S[i]:
      continue
    else:
      list.append(S[i])
print(len(list))

### FIXED CODE ###

N = int(input())
S = list(input())
 
list = []
 
for i in range(len(S)):
  if len(list) == 0:
    list.append(S[i])
  else:
    if list[-1] == S[i]:
      continue
    else:
      list.append(S[i])


print(len(list))
x, y = list(map(int, input().split()))

flg = true
for i in range(x):
  if 2*i + 4*(x-i) == y:
    print('Yes'):
    flg = False
      break
      
if flg:print('No')

### FIXED CODE ###

x, y = list(map(int, input().split()))

flg = True

for i in range(x+1):
  if i*2 + (x-i)*4 == y:
    print('Yes')
    flg = False
    break
    
if flg:print('No')
n=int(input())
s=list(input())
count=0
for i in range(n):
  if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
    count+=1
    
print(count)

### FIXED CODE ###

n=int(input())
s=list(input())
count=0
for i in range(n-2):
  if i<=48 :
    if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
      count+=1
    
print(count)
a, b, k = map(int, input().split())
list = []

for i in range(1, 101):
  if a%i == 0 and b %i == 0:
    list.append(i)
    list.sort(reverse=True)
    
print(list[k-1])

### FIXED CODE ###

a, b, c = map(int, input().split())

num = b // a

if num <= c:
  print(num)
else:
  print(c)