Harryxun/stf_run huggingface dataset:
import math


def resolve():
    import sys
    import string
    input = sys.stdin.readline
    # row = [int(x) for x in input().rstrip().split(" ")]
    # n = int(input().rstrip())
    n = int(input().rstrip())
    a_list = [int(input().rstrip()) * -1 for i in range(n)]

    import numpy
    indices = numpy.argsort(a_list)
    max_num = a_list[indices[0]] * -1
    second_max_num = a_list[indices[1]] * -1

    for i in range(len(a_list)):
        if i != indices[0]:
            print(max_num)
        else:
            print(second_max_num)


if __name__ == "__main__":
    resolve()


### FIXED CODE ###

import math


def resolve():
    import sys
    import string
    input = sys.stdin.readline
    # row = [int(x) for x in input().rstrip().split(" ")]
    # n = int(input().rstrip())
    n = int(input().rstrip())
    a_list = [int(input().rstrip()) * -1 for i in range(n)]

    import numpy
    indices = numpy.argsort(a_list)
    max_num = a_list[indices[0]] * -1
    second_max_num = a_list[indices[1]] * -1

    for i in range(len(a_list)):
        if i != indices[0]:
            print(max_num)
        else:
            print(second_max_num)


if __name__ == "__main__":
    resolve()
x,*s=open(0)
h,w,k=map(int,x.split())
p=lambda b:b and(b&1)+p(b>>1)
g=lambda b,j,t,d,i=0,c=0:j==w and~p(b)or i==h and g(b,j+1,t,d)or d.__setitem__(c,d[c]+int(s[i][j]))or d[c]>k and(t<j and-1+g(b,j,j,[0]*h)or h*w)or g(b,j,t,d,i+1,c+(b>>i&1))
print(min(~g(b,0,0,[0]*h)for b in range(512)))

### FIXED CODE ###

x,*s=open(0)
h,w,k,*m=map(int,x.split())
for b in range(512):
 r=t=j=0;d=[0]*h
 while j<w:
  i=c=0
  while h-i:
   d[c]+=s[i][j]>'0';x=d[c]>k
   if(t<j)&x:r+=1;t=j;d=[0]*h;break
   r+=x*h*w;c+=b>>i&1;i+=1
  else:j+=1
 while b:r+=b&1;b>>=1
 m+=r,
print(min(m))
n, y = map(int, input().rstrip().split())
a, b, c = -1, -1, -1

for i in range(n+1):
    for j in range(n+1-i):
        if 10000*i + 5000*j + 1000*(n-i-j) ==  y:
            a, b, c = i, j, n-i-j
            break
    else:
        continue
    break
print(a, b, c)

### FIXED CODE ###

#85

S = list(input())
S[3] = "8"

print("".join(S))
X = input()
flag = ['+','-']
for i in flag:
    if i == '+':
        ans = int(X[0]) + int(X[1])
    else:
        ans = int(X[0]) - int(X[1])
    for j in flag:
        if j == '+':
            ans += int(X[2])
        else:
            ans -= int(X[2])
        for k in flag:
            if k == '+':
                ans += int(X[3])
            else:
                ans -= int(X[3])
            if ans == 7:
                anslist = [X[0],i,X[1],j,X[2],k,X[3]]
print(''.join(anslist))

### FIXED CODE ###

X = input()
flag = ['+','-']
check = 0
for i in flag:
    if check == 1:
        break
    for j in flag:
        if check == 1:
            break
        for k in flag:
            ans = 0
            if i == '+':
                ans = int(X[0]) + int(X[1])
            else:
                ans = int(X[0]) - int(X[1])
            if i == '+':
                ans = int(X[0]) + int(X[1])
            else:
                ans = int(X[0]) - int(X[1])
            if j == '+':
                ans += int(X[2])
            else:
                ans -= int(X[2])
            if k == '+':
                ans += int(X[3])
            else:               
                ans -= int(X[3])
            if ans == 7:
                anslist = [X[0],i,X[1],j,X[2],k,X[3],'=','7']
                check = 1
print(''.join(anslist))
S = input()
N = len(S)
ans = 0
for i in range(N):
  for j in range(N):
    if all('ATGC'.count(c) == 1 for c in S[i:j + 1]:
           ans = max(ans,j-i+1)
           
print(ans)

### FIXED CODE ###

S = input()
N = len(S)
ans = 0
for i in range(N):
  for j in range(i,N):
    if all('ATGC'.count(c) == 1 for c in S[i:j+1]):
      ans = max(ans,j - i + 1)

      

      

print(ans)
n=input()
if (n==1):
print("Hello world")
else:
a=input()
b=input()
print(a+b)

### FIXED CODE ###

n=input()
if int(n) == 1:
  print("Hello World")
else:
  a=input()
  b=input()
  print(int(a)+int(b))
a,b = list(map(int, input().split()))

def calc(n):
    if n==1:
        return 1
    else:
        return n+calc(n-1)


diff = b-a
tall = calc(diff)
print(tall-b)

### FIXED CODE ###

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

diff = b-a
tall = diff*(diff+1)/2
print(int(tall-b))
input()
print(input().count('ABC'))


### FIXED CODE ###

a = list(map(int, input().split()))
K = a[0]
X = a[1]

if 500 * K >= X:
    print('Yes')
else:
    print('No')
n = int(raw_input())
s = raw_input()

x = []
cnt = 0
for i in s:
    if s[i] == 'I':
        cnt += 1
        x.append(cnt)
    elif s[i] == 'D':
        cnt -= 1
        x.append(cnt)
    else:
       x.append(cnt)

print max(x)

### FIXED CODE ###

n = int(raw_input())
s = raw_input()

cnt =0
x =[0]
for i in xrange(n):
    if s[i] == 'I':
        cnt += 1
        x.append(cnt)
    elif s[i]  == 'D':
        cnt -= 1
        x.append(cnt)

print max(x)
r=input()
S=r**2*pi
l=2*pi*r
print("{0} {1}",format(S,l))

### FIXED CODE ###

import math
r=float(input())
s=r**2*math.pi
l=2*r*math.pi
print("{0:5f} {1:5f}".format(s,l))
S = list(map(int,input().split()))
N = S[0]
K = S[1]
TDlist = []
for x in range(0,N):
    T = list(map(int,input().split()))
    TDlist.append(T)

sorted_list = sorted(TDlist, key = lambda x: x[1], reverse=True)
kinds = []
seconds =[]
answer = 0

for x in range(0,K):
    if not sorted_list[x][0] in kinds:
        kinds.append(sorted_list[x][0])
    else:
        seconds.append(sorted_list[x][1])
    answer += sorted_list[x][1]

answer += len(kinds)**2
score = answer

for x in range(K,N):
    if seconds is []:
        break
    if sorted_list[x][0] in kinds:
        continue
    kinds.append(sorted_list[x][0])
    score += (sorted_list[x][1] - seconds[-1]) + (len(kinds)*2 -1)
    max_score = max(score,answer)

answer = max(answer,max_score)

print(answer)

### FIXED CODE ###

N,K = list(map(int,input().split()))
TDlist = []

for x in range(0,N):
    TDlist.append(list(map(int,input().split())))

TDlist= sorted(TDlist, key = lambda x: x[1],reverse=True)
kinds = set()
seconds = []
answer = 0

for x in TDlist[:K]:
    if not x[0] in kinds:
        kinds.add(x[0])
    else:
        seconds.append(x[1])
    answer += x[1]

answer += len(kinds)**2
score = answer

for x in TDlist[K:]:
    if seconds == []:
        break
    if x[0] in kinds:
        continue
    kinds.add(x[0])
    y = seconds.pop()
    score += (x[1] - y) + (len(kinds)*2 -1)
    answer = max(score,answer)

print(answer)
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
B=[list(map(int,input().split())) for i in range(Q)]

dp=[0 for i in range(1,10**5+1)]
for i in A:
    dp[i]+=1
S=sum(A)
for i in B:
    S+=(i[1]-i[0])*dp[i[0]]
    print(S)
    dp[i[1]]+=dp[i[0]]
    dp[i[0]]=0
    

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
Q=int(input())
B=[list(map(int,input().split())) for i in range(Q)]

dp=[0 for i in range(1,10**6)]
for i in A:
    dp[i]+=1
S=sum(A)
for i in B:
    S+=(i[1]-i[0])*dp[i[0]]
    print(S)
    dp[i[1]]+=dp[i[0]]
    dp[i[0]]=0
'''
INPUT SHORTCUTS
N, K = map(int,input().split())
N ,A,B = map(int,input().split())
string = str(input())
arr = list(map(int,input().split()))
N = int(input())
'''

N = int(input())
arr = list(map(int,input().split()))
arr.sort()
ans = 0
for i in range(N-1):
	if arr[i]==arr[i+1]:
		ans = 1
        break

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




### FIXED CODE ###

'''
INPUT SHORTCUTS
N, K = map(int,input().split())
N ,A,B = map(int,input().split())
string = str(input())
arr = list(map(int,input().split()))
N = int(input())
'''

N = int(input())
arr = list(map(int,input().split()))
arr.sort()
ans = 0
for i in range(N-1):
	if arr[i]==arr[i+1]:
		ans = 1
		break

if ans:
	print("NO")
else:
	print("YES")
innum = raw_input()
print innum[1]
if int(innum[0]) <= 8 and int(innum[2]) <= 8:
    print "Yay!"
else:
    print ":("

### FIXED CODE ###

S = raw_input()
L = S.split(" ")
if int(L[0]) <= 8 and int(L[1]) <= 8:
    print "Yay!"
else:
    print ":("
from pprint import pprint
N, C = [int(i) for i in input().split()]
D_xy = []
for _ in range(C):
    D_xy.append([int(i) for i in input().split()])
c_ij = []
for _ in range(N):
    c_ij.append([int(i) for i in input().split()])

# pprint(D_xy)
# pprint(c_ij)

clusters = [[] for _ in range(3)]
for i in range(N):
    for j in range(N):
         if (i+j) % 3 == 0:
             clusters[0].append(c_ij[i][j])
         elif (i+j) % 3 == 1:
             clusters[1].append(c_ij[i][j])
         elif (i+j) % 3 == 2:
             clusters[2].append(c_ij[i][j])
         else:
             # print(i+j % 3) # % の前は()でくくらないと順番が狂う
             # print("Something wrong")
             pass

# 色が c 通りある場合，色の組み合わせは およそ c**3 通りある訳だけれども．
# 現実的なアプローチとしては，まずそれっぽい解を見つける．
# 他の候補は，計算過程でその最小値を超えたらpassするみたいな感じで進めるのが良いのかな?

cost_matrix = [[0 for i in range(3)] for j in range(C)] # cluster_i to c の距離を予め計算する
for i in range(3):
    for c in range(C):
        cost = 0
        for item in clusters[i]:
            cost += D_xy[item-1][c] # item-1 が index に対応
        cost_matrix[i][c] = cost

# print("cost_matrix")
# pprint(cost_matrix)

## cost_matrixの中から一番賢い組み合わせを選択する
min = float('infinity')
for i in range(C):
    for j in range(C):
        if j == i:
            continue
        for k in range(C):
            if k == i or k == j:
                continue
            score = cost_matrix[0][i] + cost_matrix[1][j] + cost_matrix[2][k]
            # print(i,j,k,"score:",score)
            if score < min:
                min = score
print(min)


### FIXED CODE ###

from pprint import pprint

# --- データ読み込み ---
N, C = [int(i) for i in input().split()]
D_xy = []
for _ in range(C):
    D_xy.append([int(i) for i in input().split()])
c_ij = []
for _ in range(N):
    c_ij.append([int(i) for i in input().split()])

# --- 読み込み結果確認 ---
# pprint(D_xy)
# pprint(c_ij)

# --- 各クラスタに分類 ---
clusters = [[] for _ in range(3)]
for i in range(N):
    for j in range(N):
         if (i+j) % 3 == 0:
             clusters[0].append(c_ij[i][j])
         elif (i+j) % 3 == 1:
             clusters[1].append(c_ij[i][j])
         elif (i+j) % 3 == 2:
             clusters[2].append(c_ij[i][j])
         else:
             # print(i+j % 3) # % の前は()でくくらないと順番が狂う
             # print("Something wrong")
             pass

# まずは，各クラスタをある色にするために必要なコストを計算する
# つまり， clusters[i] to c の距離を予め計算する
cost_matrix = [[0 for _ in range(C)] for _ in range(3)]
# print(cost_matrix)
for i in range(3):
    for c in range(C):
        cost = 0
        for item in clusters[i]:
            cost += D_xy[item-1][c] # item-1 が index に対応
        # print(i,c)
        cost_matrix[i][c] = cost

# print("cost_matrix")
# pprint(cost_matrix)

## cost_matrixの中から一番賢い組み合わせを選択する
min = float('infinity')
for i in range(C):
    for j in range(C):
        if j == i:
            continue
        for k in range(C):
            if k == i or k == j:
                continue
            score = cost_matrix[0][i] + cost_matrix[1][j] + cost_matrix[2][k]
            # print(i,j,k,"score:",score)
            if score < min:
                min = score
print(min)
O = input()
E = input()
P = ''
for i in range(min(len(O)+1,len(E)+1)) :
    P = P + O[i]
    P = P + E[i]
print(P)

### FIXED CODE ###

O = str(input())
E = str(input())
P = ''
for i in range(len(E)) :
    P = P + O[i]
    P = P + E[i]
if len(O) == len(E) :
    print(P)
else :
    print(P + O[-1])
def B(N,X,m):
    ret=0
    X-=sum(m)
    ret+=len(m)

    ret+=int(X/min(m))

    return ret

inp = input().split()
inp=[int(i) for i in inp]
print(B(inp[0], inp[1], inp[2:]))

### FIXED CODE ###

def main(func):
    ret=func(input())
    print(ret)


def A(S):
    ret=700
    ret+=S.count("o")*100
    return ret

main(A)
#include <iostream>
using namespace std;

int main() {
  string s;
  cin >> s;

  for (int i=0; i<s.size(); i++) {
    if (i==4) cout << ' ';
    else cout << s[i];
  }
}

### FIXED CODE ###

s=input()

for i, j in enumerate(s):
    if i==4:
        print(" ", end="")
    print(j, end="")
print("")
prices = map(int, raw_input())
left = prices[0] - prices[1]
print left % prices[2]

### FIXED CODE ###

x = int(raw_input())
a = int(raw_input())
b = int(raw_input())
left = x - a
print left % b
import math
N,M = list(map(int, input().split()))


def combinations_count(n, r):
    if n==1:
        return 0
    else:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

print(combinations_count(N,2)+combinations_count(M,2))

### FIXED CODE ###

import math
N,M = list(map(int, input().split()))


def combinations_count(n, r):
    if n==1 or n==0:
        return 0
    else:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

print(combinations_count(N,2)+combinations_count(M,2))
n = int(input())
s = [input() for _ in range(n)]

s_sort = sorted(s)

s_num = [1]*n

for i in range(1,n):
    if s_sort[i] == s_sort[i-1]:
        s_num[i] += s_num[i-1]

Maxnum = max(s_num)

index_num = [n for n, v in enumerate(s_num) if v == Maxnum]

[print(s_sort[i]) for i in index_num,]


### FIXED CODE ###

n = int(input())
s = [input() for _ in range(n)]

s_sort = sorted(s)

s_num = [1]*n

for i in range(1,n):
    if s_sort[i] == s_sort[i-1]:
        s_num[i] += s_num[i-1]

Maxnum = max(s_num)

index_num = [n for n, v in enumerate(s_num) if v == Maxnum]

[print(s_sort[i]) for i in index_num]
from itertools import accumulate
def inpl(): return list(map(int, input().split()))

N, M = inpl()
A = sorted(inpl())
B, C = [], []
BC = sorted([inpl() for _ in range(M)], key=lambda x: x[1])
i = 0
while BC:
    b, c = BC.pop()
    while b:
        if A[i] < c:
            A[i] = c
            i += 1
            b -=1
        else:
            break
print(sum(A))

### FIXED CODE ###

from itertools import accumulate
def inpl(): return list(map(int, input().split()))

N, M = inpl()
A = sorted(inpl())
BC = sorted([inpl() for _ in range(M)], key=lambda x: x[1])
i = 0
while BC:
    b, c = BC.pop()
    while b and i < N:
        if A[i] < c:
            A[i] = c
            i += 1
            b -=1
        else:
            break
print(sum(A))
s = input()
print(2018 + s[3:])

### FIXED CODE ###

s = input()
print("2018" + s[4:])
n=int(input())
v=list(map(int,input().strip().split()))
a=[0]*n
for i in range(n-1,-1,-1):
  c=0
  for j in range(i,n,i):
    c ^= a[j]
  if c != v[i]:
    a[i] = 1
ans = []
for i in range(n):
  if a[i]: ans.append(i+1)
print(len(ans))
print(*ans)

### FIXED CODE ###

n=int(input())
v=list(map(int,input().strip().split()))
a=[0]*n
for i in range(n-1,-1,-1):
  c=0
  for j in range(i,n,i+1):
    c ^= a[j]
  if c != v[i]:
    a[i] = 1
ans = []
for i in range(n):
  if a[i]: ans.append(i+1)
print(len(ans))
print(*ans)
import datetime
import string
import re
import math

N=int(input())
input = input()
str = []
for i in range(N):
    str.append(input[i])

count = 0
begin = 0
end = len(str) - 1
while True:
    if begin < len(str):
        while str[begin] == 'W':
            begin += 1
            if begin == len(str):
                break

    if end >= 0:
        while str[end] == 'R':
            end -= 1
            if end == -1:
                break

    if begin < end:
        str[begin] = 'R'
        str[end] = 'W'
        begin += 1
        end -= 1
        count += 1
    elif begin == len(str) and end != -1:
        if str[end + 1] == 'R':
            str[end] = 'W'
            end -= 1
            count += 1
        else:
            end -= 1
    elif begin != len(str) and end == -1:
        if str[begin - 1] == 'W':
            str[begin] = 'R'
            begin += 1
            count += 1
        else:
            begin += 1
    else:
        print(count)
        break

### FIXED CODE ###

import datetime
import string
import re
import math

N=int(input())
input = input()
str = []
for i in range(N):
    str.append(input[i])
str.reverse()

count = 0
begin = 0
end = len(str) - 1
while True:
    if begin < len(str):
        while str[begin] == 'W':
            begin += 1
            if begin == len(str):
                break

    if end >= 0:
        while str[end] == 'R':
            end -= 1
            if end == -1:
                break

    if begin < end:
        str[begin] = 'R'
        str[end] = 'W'
        begin += 1
        end -= 1
        count += 1
    elif begin >= len(str) and end > -1:
        if end != len(str) - 1:
            if str[end + 1] == 'R':
                str[end] = 'W'
                end -= 1
                count += 1
            else:
                end -= 1
        else:
            end -= 1
    elif begin < len(str) and end <= -1:
        if begin != 0:
            if str[begin - 1] == 'W':
                str[begin] = 'R'
                begin += 1
                count += 1
            else:
                begin += 1
        else:
            begin += 1
    else:
        print(count)
        break
K=int(input().split())
A,B=map(int,input().split())
n=A//K
print("OK" if A<=K*n<=B or K*(n+1)<=B else "NG")

### FIXED CODE ###

K=int(input())
A,B=map(int,input().split())
n=A//K
print("OK" if A<=K*n<=B or K*(n+1)<=B else "NG")
from math import *

n, k = [int(item) for item in input().split()]
ans = 0
for p in range(1, n + 1):

    if p >= k:
        ans += 1;
    else:
        x = ceil(log2(k / p))
        ans += 1.0 / (1 << x);
print(ans / n)


### FIXED CODE ###

from math import *

n, k = [int(item) for item in input().split()]
ans = 0
for p in range(1, n + 1):

    if p >= k:
        ans += 1;
    else:
        x = ceil(log2(k) - log2(p))
        ans += 1.0 / (1 << x);
print(ans / n)
N, M = map(int, input().split())
tmp = [[] for i in range(N)]

for i in range(M):
    A, B = map(int, input().split())
    tmp[A-1].append(B)

for i in range(N):
    tmp[i].sort()
    
for i in range(M):
    X = tmp[F[i][0]-1].index(F[i][1])+1
    print(('0'*(6-len(str(F[i][0]))) + str(F[i][0])) + '0'*(6-len(str(X))) + str(X))

### FIXED CODE ###

N, M = map(int, input().split())
#tmp = [[] for i in range(N)]
tmp = []
res = ['' for i in range(M)]
count = [1 for i in range(N+1)]
for i in range(M):
    A, B = map(int, input().split())
    tmp.append([A,B,i])

tmp.sort(key=lambda tmp: tmp[1])

for i in range(M):
    res[tmp[i][2]] += '0'*(6-len(str(tmp[i][0]))) + str(tmp[i][0]) + '0'*(6-len(str(count[tmp[i][0]]))) + str(count[tmp[i][0]])
    count[tmp[i][0]] += 1

for i in range(M):
    print(res[i])
n=int(input())
m=int(input())
if n>1:
    c=int((n*(n-1))/2)
else:
    c=int(0)
if m>1:
    d=int((m*(m-1))/2)
else:
    d=int(0)
print(c+d)
return 0

### FIXED CODE ###

n,m=map(int,input().split())
print((n*(n-1)+m*(m-1))//2)
n=int(input())
x=input()
one=x.count("1")
amari_m=0
amari_p=0
for i in range(n):
	if x[-i-1]=="1":
		amari_p+=pow(2,i,one+1)
		amari_m+=pow(2,i,one-1)
		amari_p%=one+1
		amari_m%=one-1
for i in range(n):
	cnt=0
	if x[i]=="1":
		r=(amari_m-pow(2,(n-i-1),one-1))%(one-1)
	else:
		r=(amari_p+pow(2,(n-i-1),one+1))%(one+1)
	while r:
		r%=bin(r).count("1")
		cnt+=1
	print(cnt+1)


### FIXED CODE ###

n=int(input())
x=input()
one=x.count("1")
amari_m=0
amari_p=0
for i in range(n):
	if x[-i-1]=="1":
		amari_p+=pow(2,i,one+1)
		if one==1:
			amari_m=-1
		else:
			amari_m+=pow(2,i,one-1)
		amari_p%=one+1
		if one!=1:
			amari_m%=one-1
for i in range(n):
	cnt=0
	if x[i]=="1":
		if one==1:
			print(0)
			continue
		r=(amari_m-pow(2,(n-i-1),one-1))%(one-1)
	else:
		r=(amari_p+pow(2,(n-i-1),one+1))%(one+1)
	while r:
		r%=bin(r).count("1")
		cnt+=1
	print(cnt+1)
h,w=map(int,input().split())
s=[list(input()) for i in range(h)]


def bombcount(hi,wi):
  cnt=0
  for x in range(-1,2):
    for y in range(-1,2):
      
      if 0<=hi+x<h-1 and 0<=wi+y<w-1:
        if s[hi+x][wi+y]=="#":
          cnt+=1
  return cnt
      
for i in range(h):
  for j in range(w):
    
    if s[i][j]=="#":
      continue
    else:
      s[i][j]=bombcount(i,j)
      
for i in range(h):
  print("".join(s[i]))



### FIXED CODE ###

h,w=map(int,input().split())
s=[list(input()) for i in range(h)]

dxy=[(-1,-1),(-1,0),(-1,1),(0,-1),(0,1),(1,-1),(1,0),(1,1)]
def bombcount(hi,wi):
  cnt=0
  for x,y in dxy:
    
      
    if 0<=hi+x<=h-1 and 0<=wi+y<=w-1:
      if s[hi+x][wi+y]=="#":
        
        cnt+=1
  return cnt
      
for i in range(h):
  for j in range(w):
    
    
    if s[i][j]==".":
      s[i][j]=str(bombcount(i,j))
      
for i in range(h):
  print("".join(s[i]))
a = list(map(int,input().split()))
A = a.sort()

print(A[2]-A[0])

### FIXED CODE ###

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

print(a[2]-a[0])
a, b = map(int, input().split())
if ((a * b % 2) == 0:
    print('Even')
else:
    print('Odd')

### FIXED CODE ###

input_line = list(map(int, input().split()))
if ((input_line[0] * input_line[1]) % 2) == 0:
    print('Even')
else:
    print('Odd')
# -*- coding: utf-8 -*-

X=int(input())

400 <= X <=1999

if (400<= X <= 599):
    print("8")
elif (600<= X <=799):
    print("7")
elif(800<= X <=999):
    print("6")
elif(1000<= X <＝1199):
    print("5")    
elif(1200<= X <=1399):
    print("4")   
elif(1400<= X <=1599):
    print("3")   
elif(1600<= X <=1799):
    print("2")   
elif(1800<= X <=1999):
    print("1")   

### FIXED CODE ###

# -*- coding: utf-8 -*-

X=int(input())

400 <= X <=1999

if (400<= X <= 599):
    print("8")
elif (600<= X <=799):
    print("7")
elif(800<= X <=999):
    print("6")
elif(1000<= X <=1199):
    print("5")    
elif(1200<= X <=1399):
    print("4")   
elif(1400<= X <=1599):
    print("3")   
elif(1600<= X <=1799):
    print("2")
elif(1800<= X <=1999):
    print("1")
def gcd(a,b):
    if a<b:
     d=a
     a=b
     b=d

    if b==0:
     b=1
    if a==0:
     a=1

    c=a%b

    if c==0:
     return b
    else:
     return 5

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



n=int(input())
t=[0]*n

for lop2 in range(n):
    t[lop2]=int(input())

ans=t[0]

for lop in range(1,n):
    ans=lcm(ans,t[lop])
print(int(ans))


### FIXED CODE ###

'''
def gcd(a,b):
    if a<b:
     c=a
     a=b
     b=c

    c=a%b

    if c==0:
     return b
    else:
     return gcd(b,c)
'''

def gcd(a,b):
    return a if b == 0 else gcd(b,a%b)

def lcm(e,f):
    c=gcd(e,f)
    g=e*f
    return g//c



n=int(input())
t=[0]*n

for lop2 in range(n):
    t[lop2]=int(input())

ans=t[0]

for lop in range(1,n):
    ans=lcm(ans,t[lop])
print(int(ans))
a, b, c, d  = map(int, input().split())
import math
divc = (b-a)//c
if a % c == 0:
    divc += 1
if b % c == 0:
    divc += 1
if a % c == 0 and b % c == 0:
    divc -= 1
if b-a<c:
    divc += 1

divd = (b-a)//d
if a % d == 0:
    divd += 1
if b % d == 0:
    divd += 1
if a % d == 0 and b % d == 0:
    divd -= 1   
if b-a<d:
    divd += 1

gcd = math.gcd(c,d)
cd = c * d // gcd
divcd = (b-a)//cd
if a % cd == 0:
    divcd += 1
if b % cd == 0:
    divcd += 1
if a % cd == 0 and b % cd == 0:
    divcd -= 1 
if b-a<cd:
    divcd += 1
wareru = divc + divd - divcd
ans = b - a - wareru +1
print(ans)

### FIXED CODE ###

a,b,c,d = map(int,input().split())
a -= 1
from fractions import gcd
divac = a // c
divad = a // d
divbc = b // c
divbd = b // d
divacd = a // (c*d//gcd(c,d))
divbcd = b // (c*d//gcd(c,d))
Acd = divac + divad - divacd
Bcd = divbc + divbd - divbcd
wareru = Bcd - Acd
ans = b-a-wareru
print(ans)
n,m,k = map(int,input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
A = [0]
B = [0]

for i in range(len(a)):
  A.append(a[i] + A[i])
for i in range(len(b)):
  B.append(b[i] + B[i])

num = 0
x = m 

for i in range(len(A)+1):
  if A[i] > k:
    break
  while A[i] + B[x] > k:
    x -= 1
  num = max(num, i + x )
  
print(num)




### FIXED CODE ###

n,m,k = map(int,input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
A,B = [0],[0]

for i in range(n):
  A.append(a[i] + A[i])
for i in range(m):
  B.append(b[i] + B[i])

num,x = 0,m

for i in range(n+1):
  if A[i] > k:
    break
  while A[i] + B[x] > k:
    x -= 1
  num = max(num, i + x)
  
print(num)