Harryxun/stf_run huggingface dataset:
import math
from functools import reduce

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

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

index=0
max=0
while index < len(listA):
    if index == 0:
        gc = gcd_list(listA[1:])
    elif index == len(listA)-1:
        gc = gcd_list(listA[:len(listA)-1])
    else:
        listB = listA[:index]
        listB.extend(listA[index+1:len(listA)])
        gc = gcd_list(listB)
    if gc > max:
        max = gc
    index+=1
print(max)

### FIXED CODE ###

import fractions
n = int(input())
listA = list(map(int, input().split()))
listA.sort()
if len(listA) < 3:
    print(max(listA))
else:
    minGcd1 = fractions.gcd(listA[0], listA[1])
    minGcd2 = fractions.gcd(listA[1], listA[2])
    minGcd3 = fractions.gcd(listA[0], listA[2])
    ming1 = minGcd1
    maxg1 = 1
    while ming1 > 1:
        count=0
        flag=0
        index1=0
        while index1 < len(listA):
            if listA[index1]%ming1==0:
                pass
            else:
                count+=1
            if count >1:
                flag=1
                break
            index1+=1
        if flag:
            ming1-=1
        else:
            maxg1 = ming1
            break
    ming2 = minGcd2
    maxg2 = 1
    while ming2 > 1:
        count = 0
        flag = 0
        index1 = 0
        while index1 < len(listA):
            if listA[index1] % ming2==0:
                pass
            else:
                count += 1
            if count > 1:
                flag = 1
                break
            index1 += 1
        if flag:
            ming2 -= 1
        else:
            maxg2 = ming2
            break
    ming3 = minGcd3
    maxg3= 1
    while ming3 > 1:
        count = 0
        flag = 0
        index1 = 0
        while index1 < len(listA):
            if listA[index1] % ming3==0:
                pass
            else:
                count += 1
            if count > 1:
                flag = 1
                break
            index1 += 1
        if flag:
            ming3 -= 1
        else:
            maxg3 = ming3

            break
    print(max(maxg1, maxg2, maxg3))
n,k=map(int,raw_input().split())
a=[0]*25
b=[]
count=0
for i in range(n):
	b.append(raw_input())
b=list(set(b))
for i in b:
	a[ord(i[0])-65]+=1
for i in a:
	if i>0:
		count+=i
if len(set(a))==2:
	print 0
else:
    print count/k

### FIXED CODE ###

n,a,b=map(int,raw_input().split())
count=0
for i in range(n):
	z=int(raw_input())
	if z/a>=1 and z/b<1:
		count+=1
print n-count
def main():
  INF = 10 ** 20
  def minimum_cost(rest, init, dic):
    if rest in dic:
      return dic[rest]
  
    if rest == ():
      return 0
  
    ret = INF
    for nex in rest:
      accnex = acc[nex]
      cumsnex = cums[nex]
      nex_init = init + accnex
      tmp =  minimum_cost(tuple([i for i in rest if i != nex]), nex_init, dic) +\
                     accnex - (cumsnex[nex_init] - cumsnex[init])
      if ret > tmp:
        ret = tmp
    dic[rest] = ret
    return ret
  
  n, m = map(int, input().split())
  acc = [0] * m
  cums = [[0] for _ in range(m)]
  for _ in range(n):
    acc[int(input()) - 1] += 1
    for i in range(m):
      cums[i].append(acc[i])
  
  dic = {}
  print(minimum_cost(tuple(i for i in range(m)), 0, dic))

main()


### FIXED CODE ###

def main():
  INF = 10 ** 20
  def minimum_cost(rest, h, init, dic):
    if h in dic:
      return dic[h]
  
    if not h:
      return 0
  
    ret = INF
    for nex in rest:
      accnex = acc[nex]
      cumsnex = cums[nex]
      nex_init = init + accnex
      nex_rest = rest[:]
      nex_rest.remove(nex)
      nex_h = h - 2 ** nex
      tmp =  minimum_cost(nex_rest, nex_h, nex_init, dic) +\
                     accnex - (cumsnex[nex_init] - cumsnex[init])
      if ret > tmp:
        ret = tmp
    dic[h] = ret
    return ret
  
  n, m = map(int, input().split())
  acc = [0] * m
  cums = [[0] for _ in range(m)]
  for _ in range(n):
    acc[int(input()) - 1] += 1
    for i in range(m):
      cums[i].append(acc[i])
  
  dic = {}
  h = sum([2 ** i for i in range(m)])
  print(minimum_cost([i for i in range(m)], h, 0, dic))

main()
d = int(input())
t = int(input())
s = int(input())

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

### FIXED CODE ###

s = input()
l = s.split(' ')

if(int(l[0]) <= int(l[1]) * int(l[2])):
	print("Yes")
else:
	print("No")
A = input()
B = input()
ans = 0
tmp = A
while tmp < B:
	ans += 1
	tmp += A-1
print(ans)

### FIXED CODE ###

A, B = map(int, input().split())
print((B-2)//(A-1)+1)
S = input()
T = input()

s = len(S)

if S != T[:s]:
  print("No")

else:
  if (s + 1) = len(T):
    print("Yes")
  else:
    print("No")


### FIXED CODE ###

S = input()
T = input()

s = len(S)

if S != T[:s]:
  print("No")

else:
  if (s + 1) == len(T):
    print("Yes")
  else:
    print("No")
def main():
    n=int(input())
    a=list(map(int,input().split()))
    if 0 in a:
        print(0)
        return
    ans=1
    for i in a:
        pro=pro*i
        if pro>1000000000000000000:
            print(-1)
            return    
    print(ans)
    return
main()            

### FIXED CODE ###

def main():
    n=int(input())
    a=list(map(int,input().split()))
    if 0 in a:
        print(0)
        return
    ans=1
    for i in a:
        ans=ans*i
        if ans>1000000000000000000:
            print(-1)
            return    
    print(ans)
    return
main()
n=int(input())
a,b,c=map(int,input().split())
d,e,f=map(int,input().split())
s=[0]*(n+1)
for i in range(a,n+1):
  s[i]=max(s[i],s[i-a]+d-a)
for i in range(b,n+1):
  s[i]=max(s[i],s[i-b]+e-b)
for i in range(c,n+1):
  s[i]=max(s[i],s[i-b]+f-c)
n+=s[-1]
s=[0]*(n+1)
for i in range(d,n+1):
  s[i]=max(s[i],s[i-d]+a-d)
for i in range(e,n+1):
  s[i]=max(s[i],s[i-e]+b-e)
for i in range(f,n+1):
  s[i]=max(s[i],s[i-f]+c-f)
print(n+s[-1])

### FIXED CODE ###

n=int(input())
a,b,c=map(int,input().split())
d,e,f=map(int,input().split())
s=[0]*(n+1)
for i in range(a,n+1):
  s[i]=max(s[i],s[i-a]+d-a)
for i in range(b,n+1):
  s[i]=max(s[i],s[i-b]+e-b)
for i in range(c,n+1):
  s[i]=max(s[i],s[i-c]+f-c)
n+=s[-1]
s=[0]*(n+1)
for i in range(d,n+1):
  s[i]=max(s[i],s[i-d]+a-d)
for i in range(e,n+1):
  s[i]=max(s[i],s[i-e]+b-e)
for i in range(f,n+1):
  s[i]=max(s[i],s[i-f]+c-f)
print(n+s[-1])
n,k,x,y=(int(input())for i in range(4)
if k>=n:
         c=n*x+(k-n)*y
else:
         c=n*x
print(c)
       

### FIXED CODE ###

n,k,x,y=(int(input()) for i in range(4))
if n>=k:
    c=k*x+(n-k)*y
else:
    c=n*x
print(c)
def main():
    X, K, D = list(map(int, input().split()))
    right = X % D
    left = right - D
    if X in [left, right]:
        if K % 2 == 0:
            print(abs(X))
        else:
            if X == left:
                print(right)
            else:
                print(abs(left))
        return
    if X > right:
        to_right = (X - right) // D
        if to_right >= K:
            print(X - K * D)
        else: # to_right < K
            if (K - to_right) % 2 == 0:
                print(right)
            else:
                print(abs(left))
    else:  # X < left
        to_left = (left - X) // D
        if to_left >= K:
            print(abs(X + K * D))
        else: # to_left < K
            if (K - to_right) % 2 == 0:
                print(abs(left))
            else:
                print(right)


if __name__ == '__main__':
    main()

### FIXED CODE ###


def main():
    X, K, D = list(map(int, input().split()))
    right = X % D
    left = right - D
    if X in [left, right]:
        if K % 2 == 0:
            print(abs(X))
        else:
            if X == left:
                print(right)
            else:
                print(abs(left))
        return
    if X > right:
        to_right = (X - right) // D
        if to_right >= K:
            print(X - K * D)
        else: # to_right < K
            if (K - to_right) % 2 == 0:
                print(right)
            else:
                print(abs(left))
    else:  # X < left
        to_left = (left - X) // D
        if to_left >= K:
            print(abs(X + K * D))
        else: # to_left < K
            if (K - to_left) % 2 == 0:
                print(abs(left))
            else:
                print(right)


if __name__ == '__main__':
    main()
A, B = (int(x) for x in input().split())
K = 0
K = (A+B)/2
if K == int(K):
  print((A+B)//2)
else:
  print(IMPOSSIBLE)

### FIXED CODE ###

A, B = (int(x) for x in input().split())
K = 0
K = (A+B)/2
if K == int(K):
  print((A+B)//2)
else:
  print("IMPOSSIBLE")
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    N=ii()
    A=list(mi()) + [0]

    dp = [[0] * (2*10**3+10) for _ in range(N+1)]
    x = 1000//A[0]
    dp[0][x] = 1000 - x * A[0]

    if A[0] == max(A):
        print(1000)
        exit()
 

    for i in range(x):
        dp[0][i] = 1000 - i * A[0]

    mx = x
    for i in range(N):
        _mx = mx
        for m in range(mx+1):
            for n in range(m+1):
                dp[i+1][m-n] = dp[i][m] + A[i+1] * n
                assert dp[i+1][m-n] >= 0
            
            if A[i+1] != 0:
                for j in range((dp[i][m] // A[i+1])+1):
                    dp[i+1][m+j] = max(dp[i+1][m+j],dp[i][m] - A[i+1] * j)
                    _mx = max(_mx,m+j)
                    
                    assert dp[i+1][m+j] >= 0

        mx = _mx

    ans = 0
    for i in range(len(dp[N-1])):
        if dp[N-1][i] == 0: continue
        ans = max(ans, dp[N-1][i] + A[N-1] * i)

    # print(dp[3][10])
    # print(max(dp[N]))
    print(ans)

if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    N=ii()
    _A=list(mi())
    A = []

    for a in _A:
        if len(A) > 0 and A[-1] == a: continue
        A.append(a)
    
    N = len(A)
    bottoms = []
    
    if N < 2:
        print(1000)
        exit()

    if A[0] < A[1]:
        bottoms.append(0)

    for i in range(N-1):
        if not i+2 < len(A): continue
        # print(A[i], A[i+1], A[i+2])
        if A[i] > A[i+1] and A[i+1] < A[i+2]:
            bottoms.append(i+1)
    
    money = 1000
    kabu = 0
    # print(bottoms)
    for bi in bottoms:
        bottom = A[bi]
        i = bi
        while i < N-1 and A[i] < A[i+1]:
            i += 1
        
        top = A[i]

        # print(bi,i)
        # print(bottom,top)
        kabu += money//bottom
        money -= money//bottom * bottom
        
        money += kabu * top
        kabu = 0
        # print("money",money)
    
    print(money)

    

if __name__ == "__main__":
    main()
a,b = [int(i) i for i in input().split()]
if a*b == 15:
	print('*')
elif a+b == 15:
	print('+')
else:
  	print('x')

### FIXED CODE ###

a,b = [int(i) for i in input().split()]

if a+b == 15:
    print('+')
elif a*b == 15:
    print('*')
else:
    print('x')
n = input()
k = int(input())

def solve1(n):
    l = len(n)
    if l > 0:
        return int(n[0]) + 9 * (l-1)
    else:
        return 0

def solve2(n):
    l = len(n)
    ret = (int(n[0]) - 1) * 9 * (l-1) + 9 * 9 * (l - 1) * (l - 2)  // 2
    n = n[1:]
    while (n[0] == "0"):
        n = n[1:]
    return ret + solve1(n)

def solve3(n):
    l = len(n)
    ret = (int(n[0])-1) * 9 * 9 * (l - 1) * (l - 2) // 2 + 9 * 9 * 9 * (l - 1) * (l - 2) * (l - 3) // 6
    n = n[1:]
    while (n[0] == "0"):
        n = n[1:]
    return ret + solve2(n)

if k == 1:
    print(solve1(n))
elif k == 2:
    print(solve2(n))
else:
    print(solve3(n))
    

### FIXED CODE ###

n = input()
k = int(input())

def solve1(n):
    l = len(n)
    if l > 0:
        return int(n[0]) + 9 * (l-1)
    else:
        return 0

def solve2(n):
    l = len(n)
    if l > 1:
        ret = (int(n[0]) - 1) * 9 * (l-1) + 9 * 9 * (l - 1) * (l - 2)  // 2
        n = n[1:]
        while (n[0] == "0"):
            if (n == "0"):
                n = ""
                break
            
            n = n[1:]
        return ret + solve1(n)
    else:
        return 0

def solve3(n):
    l = len(n)
    if l > 2:
        ret = (int(n[0])-1) * 9 * 9 * (l - 1) * (l - 2) // 2 + 9 * 9 * 9 * (l - 1) * (l - 2) * (l - 3) // 6
        n = n[1:]
        while (n[0] == "0"):
            
            if (n == "0"):
                n = ""
                break
            n = n[1:]
        return ret + solve2(n)
    else:
        return 0

if k == 1:
    print(solve1(n))
elif k == 2:
    print(solve2(n))
else:
    print(solve3(n))
N, K = map(int, input().split())
H = list(map(int, input().split()))
H = sort(H)
print(sum(H[:-K]))

### FIXED CODE ###

N, K = map(int, input().split())
H = list(map(int, input().split()))
if N <= K:
  print(0)
elif K == 0:
  print(sum(H))
else:
  H = sorted(H)
  print(sum(H[:-K]))
a, b, c, d, e, k = int(input()) for in range(6)
print("Yey!" if (e-a)<=k else ":(")

### FIXED CODE ###

a, b, c, d, e, k = [int(input()) for i in range(6)]
print("Yay!" if (e-a)<=k else ":(")
import math

n, m = map(int, input().split())
a = list(map(int, input().split()))
a.append(0)
a.sort(reverse=True)


def waru(i, tempb):
    if a[i] >= 1:
        a[i - 1] = a[i]
        a[i] = tempb

        if a[i] < a[i + 1]:
            waru(i + 1, tempb)


while m > 0:
    a[0] /= 2
    if a[0] < a[1]:
        waru(1, a[0])
    if a[0] < 1:
        break
    m -= 1

if a[0] < 1:
    print(0)
else:
    b = []
    for i in a:
        b.append(math.floor(i))

    print(sum(b))



### FIXED CODE ###

import heapq

n,m  = map(int,input().split())
a = list(map(lambda x: int(x)*(-1), input().split()))
heapq.heapify(a)

for _ in range(m):
    tmax = heapq.heappop(a)
    tmax = -(-tmax //2)
    heapq.heappush(a,tmax)

print(-1*sum(a))
ans = []
x,n = map(int,input().split())
l = list(map(int,input().split()))

l.sort()

ans.append(x)

nl = [0] * 100


for i in l:
    nl[i] = i

if(not (n == 0)):
    #プラス方向
    mx = x+1
    if(mx < 100):
        for i in range(x+1,len(nl)+1):
            if( nl[i] ==  0):
                ans.append(mx)
                break
            mx = mx + 1
    
    
    mi = x - 1
    if(mi > 1):
        for i in range(x-1,1,-1):
            if( nl[i] ==  0):
                ans.append(mi)
                break
            mx = mx + 1        

print(min(ans))


### FIXED CODE ###

import sys

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

for d in range(X + 1):
    for s in [-1, +1]:
        a = X + s * d
        if p.count(a) == 0:
            print(a)
            sys.exit(0)
A = list(input())
B = list(input())
C = list(input())
next = A.pop(0)
while 1:
  if next == 'a':
    next = A.pop(0)
  elif next == 'b':
    next = B.pop(0)
  else:
    next = C.pop(0)
  if len(A) == 0:
    print("A")
    break
  elif len(B) == 0:
    print("B")
    break
  elif len(C) == 0:
    print("C")
    break
    
          

### FIXED CODE ###

A = list(input())
B = list(input())
C = list(input())
next = A.pop(0)
while 1:
  if next == 'a':
    if len(A) == 0:
      print("A")
      break
    next = A.pop(0)
  elif next == 'b':
    if len(B) == 0:
      print("B")
      break
    next = B.pop(0)
  else:
    if len(C) == 0:
      print("C")
      break
    next = C.pop(0)
N = int(input())
if N % 11 > 6:
  print(N+10//11*2)
elif n % 11 == 0:
  print(N//11*2)
else:
  print(N//11*2+1)

### FIXED CODE ###

N = int(input())
if N % 11 > 6:
  print((N+10)//11*2)
elif N % 11 == 0:
  print(N//11*2)
else:
  print(N//11*2+1)
a,b,c,d = (int(i) for i in input().split())

if abs(c-a) <= d:
	print(“Yes”)
elif abs(b-a) + abs(c-b) <= 2*d:
	print(“Yes”)
else:
	print(“No”)

### FIXED CODE ###

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

if abs(c-a) <= d:
	print('Yes')
elif abs(b-a) <= d and abs(c-b) <= d:
	print('Yes')
else:
	print('No')
n,x = map(int,input().split())
l = [int(input()) for i in range(n)]
print((x-sum(l)//min(l)+n)

### FIXED CODE ###

n,x = map(int,input().split())
l = [int(input()) for i in range(n)]
print((x-sum(l))//min(l)+n)
from collections import Counter
N = int(input())
S = []
count = 0
for i in range(N):
  for j in range(i+1, N):
    if Counter(S[i]) == Counter(S[j]):
      count += 1
print(count)

### FIXED CODE ###

from collections import Counter
N = int(input())
S = [str(sorted(input())) for _ in range(N)]
count = 0
for i in Counter(S).values():
  count += i*(i-1)//2
print(count)
str = input()
p = 0
count = 0
while(True):
	if p >= len(str) - 1:
		break
	if str[p] != str[p+1]:
		newstr = str[0:p] + str[p+2:]
		p -= 1
		count += 2
		str = newstr
	else:
		p += 1
print(count)
	

### FIXED CODE ###

str = input()
num0,num1 = 0,0
for i in range(len(str)):
	if str[i] == '0':
		num0 += 1
	elif str[i] == '1':
		num1 += 1
if num1 >= num0:
	count = num0*2
	print(count)
else:
	count = num1*2
	print(count)
n = int(input())
*l, = map(int,input().split())
ans = 0
for i in range(n-1):
  if l[i] == i+1:
    l[i+1] = l[i]
    ans += 1
if l[-1] = n:
  ans += 1
print(ans)

### FIXED CODE ###

n = int(input())
*l, = map(int,input().split())
ans = 0
for i in range(n-1):
  if l[i] == i+1:
    l[i+1] = l[i]
    ans += 1
if l[-1] == n:
  ans += 1
print(ans)
n, k, q = map(int, input().split())
nlist = [0 for i in range(n)]

for i in range(q):
    nlist[int(input())-1] += 1

for n in nlist:
    if q - n < k:
        print('Yes')
    else:
        print('No')


### FIXED CODE ###

today = input()
li = ['Sunny', 'Cloudy', 'Rainy']
index = li.index(today)


def next_index(idx):
    if index == 2:
        return 0
    else:
        return idx + 1


print(li[next_index(index)])
a,b=map(int, input().split())
print(max[a+b,a-b,a*b])

### FIXED CODE ###

a,b=map(int, input().split())
print(max([a+b,a-b,a*b]))
N,Q = map(int,input().split())
aLst = [[int(x) for x in input().split()] for _ in range(N-1)]
pLst = [[int(x) for x in input().split()] for _ in range(Q)]

tmpLst = [[] for _ in range(N+1)]
for i, j in aLst:
    tmpLst[i].append(j)
    tmpLst[j].append(i)

ansLst = [0] * N
for i,j in pLst:
    ansLst[i - 1] += j

def dfs(v, p, ansLst):
    for i in tmpLst[v]:
        if i == p:
            continue
        ansLst[i - 1] += ansLst[v - 1]
        dfs(i, v, ansLst)


dfs(1, 0, ansLst)

ans = ' '.join(map(str, ansLst))
print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

# 遅延評価で加えてあげるだけ

N,Q = map(int,input().split())
AB = [[int(x) for x in input().split()] for _ in range(N-1)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]

graph = [[] for _ in range(N+1)]
for a,b in AB:
    graph[a].append(b)
    graph[b].append(a)

value = [0] * (N+1)
for p,x in PX:
    value[p] += x
    
q = [(1,0)]
while q:
    x,parent = q.pop()
    value[x] += value[parent]
    for y in graph[x]:
        if y == parent:
            continue
        q.append((y,x))

answer = ' '.join(map(str,value[1:]))
print(answer)
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
# import math
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# sys.setrecursionlimit(int(pow(10, 2)))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]





# @lru_cache(None)
n=l()[0]
A=l()
d={}
for i in range(n):
    if A[i] not in d:
        d[A[i]]=0
    d[A[i]]+=1
anss=0
for k in d:
    if(d[k]<k):
        ans+=k
    else:
        ans+=(d[k]-k)
print(ans)
    


### FIXED CODE ###

import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
# import math
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# sys.setrecursionlimit(int(pow(10, 2)))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]





# @lru_cache(None)
n=l()[0]
A=l()
d={}
for i in range(n):
    if A[i] not in d:
        d[A[i]]=0
    d[A[i]]+=1
ans=0
for k in d:
    if(d[k]<k):
        ans+=d[k]
    else:
        ans+=(d[k]-k)
print(ans)
N=int(input())
A=list(map(int,input().split()))
ans = 1
uno = []
for i in range(N):
  if A[i] == ans:
    ans += 1
    uno.append(i+1)
L=" ".join(uno)
print(L)

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
X = [0 for _ in range(N)]

for i in range(N):
    X[A[i] - 1] = i + 1

L = " ".join([str(i) for i in X])
print(L)
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
list = [list(map(int, input().split())) for x in range(m)]
list.sort(list, key=lambda x: x[1], reverse=True) # １番の要素で降順ソート

app_count = 0
for i in list:
    a += [i[1]]*i[0]
    app_count += i[0]
    if app_count>n:
        break

a.sort(reverse=True)

print(a[:n])

### FIXED CODE ###

n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
list = [list(map(int, input().split())) for x in range(m)]
list.sort(key=lambda x: x[1], reverse=True) # １番の要素で降順ソート

app_count = 0
for i in list:
    a += [i[1]]*i[0]
    app_count += i[0]
    if app_count>n:
        break

a.sort(reverse=True)

print(sum(a[:n]))
/*
  -> Do Good Die Great
*/
#include <bits/stdc++.h>
#define int long long int
#define pii pair<int, int>
#define rep(s, e) for (int i = s; i < e; i++)
#define reep(s, e) for (int i = s; i <= e; i++)
#define ff first
#define ss second
#define eb emplace_back
#define pb push_back
#define MOD 1000000007
#define Hiraishin                     \
    ios_base::sync_with_stdio(false); \
    cin.tie(nullptr);                 \
    cout.tie(nullptr);
#define tests \
    int t;    \
    cin >> t; \
    while (t--)
using namespace std;

// global
const int mx = 1ull * pow(10, 18);

void solve()
{
    int n;
    cin >> n;
    int res = 1ull;
    while (n--) {
        int t;
        cin >> t;
        res *= t;
    }
    cout << (res <= mx ? res : -1);
}

signed main()
{
    Hiraishin
    //tests
    solve();
    return 0;
}

### FIXED CODE ###

import sys
n = int(sys.stdin.readline())
li = list(map(int, sys.stdin.readline().split()))
if 0 in li:
    print(0)
    exit()
res = 1
for i in range(n):
    res *= li[i]
    if res > 1000000000000000000:
        print(-1)
        exit(0)
print(res)
N,T=map(int,input().split())
li = [list(map(int,input().split())) for i in range(N)]
t_cost=[T - li[i][1] for i in range(N)]
if(all(x < 0 for x in t_cost)):
  print('TLE')
else:
  t_cost_1=[]
  for i in range(N):
    if(t_cost[i]>=0):
      t_cost_1.append(i)
    else:continue
  print(min([li[t_cost_1[i]][0] for i in range(len(t_cost_1))]))

### FIXED CODE ###

if(1==int(input())):
  print('Hello World')
else:
  x,y=[int(input()) for i in range(2)]
  print(x+y)
n,m = map(int, input().split())
ans=[0]*n
for i in range(n):
  a,b = list(map(int,input().split()))
  ans[a-1]+=1
  ans[b-1]+=1
for i in range(n):
  print(ans[i])
  

### FIXED CODE ###

n,m = map(int, input().split())
ans=[0]*n
for i in range(m):
  a,b = list(map(int,input().split()))
  ans[a-1]+=1
  ans[b-1]+=1
for i in range(n):
  print(ans[i])