Harryxun/stf_run huggingface dataset:
from sys import stdin
import math

N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]

lcm_a = int(A[0] * A[1] / math.gcd(A[0], A[1]))

for k in A[2:]:
    lcm_a = int(lcm_a * k / math.gcd(lcm_a, k))

modulo_sum = 0

for k in A:
    modulo_sum += (lcm_a - 1) % k

print(modulo_sum)

### FIXED CODE ###

from sys import stdin

N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]

lcm_a = A[0] * A[1]

if len(A) > 2:
    for k in A[2:]:
        lcm_a = lcm_a * k

modulo_sum = 0

for k in A:
    modulo_sum += (lcm_a - 1) % k

print(modulo_sum)
n,k=map(int,input().split())
s=input()
print(s[:k]+s[k].lower()+s[k+1:])

### FIXED CODE ###

n,k=map(int,input().split())
k-=1
s=input()
print(s[:k]+s[k].lower()+s[k+1:])
import sys

sys.setrecursionlimit(50000)

def solve(prev, r, dic):
    d = 0
    t = r
    if r in dic:
        for vtx, cost in dic[r]:
            if vtx == prev:
                continue
            d1, t1 = solve(r, vtx, dic)
            d1 += cost
            if d < d1:
                d = d1
                t = t1
    return d, t

line = input()
n = int(line)
edge = {}
for _ in range(0, n - 1):
    line = input()
    s, t, d = list(map(int, line.split()))
    if s not in edge:
        edge[s] = [[t, d]]
    else:
        edge[s] += [[t, d]]
    if t not in edge:
        edge[t] = [[s, d]]
    else:
        edge[t] += [[s, d]]
r1, t1 = solve(-1, 0, edge)
r2, t2 = solve(-1, t1, edge)
print(r2)


### FIXED CODE ###

def solve(prev, r, dic):
    d = 0
    t = r
    stack = []
    stack += [[prev, r, d]]
    while stack:
        prev, r, d1 = stack.pop(-1)
        if r in dic:
            for vtx, cost in dic[r]:
                if vtx == prev:
                    continue
                stack += [[r, vtx, d1 + cost]]
                if d < d1 + cost:
                    d = d1 + cost
                    t = vtx
    return d, t

line = input()
n = int(line)
edge = {}
for _ in range(0, n - 1):
    line = input()
    s, t, d = list(map(int, line.split()))
    if s not in edge:
        edge[s] = [[t, d]]
    else:
        edge[s] += [[t, d]]
    if t not in edge:
        edge[t] = [[s, d]]
    else:
        edge[t] += [[s, d]]
r1, t1 = solve(-1, 0, edge)
r2, t2 = solve(-1, t1, edge)
print(r2)
n=int(input())
k=int(input())
if k==1:
    counter=0
    for i in range(100):
        for j in range(1,10):
            a="0"*(i)+str(j)+"0"*(99-i)
            if 1<=int(a)<=n:
                counter+=1
    print(counter)
elif k==2:
    counter=0
    for i in range(100):
        for j in range(i+1,100):
            for k in range(1,10):
                for l in range(1,10):
                    a="0"*(i)+str(k)+"0"*(j-i-1)+str(l)+"0"*(99-j)
                    if 1<=int(a)<=n:
                        counter+=1
    print(counter)
elif k==3:
    K=str(n)
    counter=0
    for i in range(100):
        if 100-i>len(str(n)):
            pass
        elif 100-i<len(str(n)):
            for j in range(i+1,100):
                for k in range(j+1,100):
                    counter+=9*9*9
        elif 100-i==len(str(n)):
            for j in range(i+1,100):
                for k in range(j+1,100):
                    for a in range(1,int(K[i])+1):
                        for b in range(1,10):
                            for c in range(1,10):
                                P=str(a)+"0"*(j-i-1)+str(b)+"0"*(k-j-1)+str(c)+"0"*(99-k)
                                if 1<=int(P)<=n:
                                    counter+=1
    print(counter)
                    

### FIXED CODE ###

n=int(input())
K=int(input())
if K==1:
    counter=0
    for i in range(100):
        for j in range(1,10):
            a="0"*(i)+str(j)+"0"*(99-i)
            if 1<=int(a)<=n:
                counter+=1
    print(counter)
elif K==2:
    counter=0
    for i in range(100):
        for j in range(i+1,100):
            for k in range(1,10):
                for l in range(1,10):
                    a="0"*(i)+str(k)+"0"*(j-i-1)+str(l)+"0"*(99-j)
                    if 1<=int(a)<=n:
                        counter+=1
    print(counter)
elif K==3:
    counter=0
    for i in range(100):
        if 100-i>len(str(n)):
            pass
        elif 100-i<len(str(n)):
            for j in range(i+1,100):
                for k in range(j+1,100):
                    counter+=9*9*9
        elif 100-i==len(str(n)):
            for j in range(i+1,100):
                for k in range(j+1,100):

                        for b in range(1,10):
                            for c in range(1,10):
                                P=(str(n)[0])+"0"*(j-i-1)+str(b)+"0"*(k-j-1)+str(c)+"0"*(99-k)
                                if 1<=int(P)<=n:
                                    counter+=1
            counter+=((98-i)*(99-i)//2)*9*9*(int(str(n)[0])-1)
    print(counter)
N,M = map(int, input().split())
list = list(map(int, input().split()))

i=0
sum=0

while i<=M:
  sum=sum+list[i]
  i=i+1
  
if sum>N:
  print("-1")
  
else:
  print(sum-N)

### FIXED CODE ###

N,M = map(int, input().split())
list_1 = list(map(int, input().split()))
 
i=0
sum=0
 
while i<M:
  sum=sum+list_1[i]
  i=i+1
  
if sum>N:
  print("-1")
  
else:
  print(abs(sum-N))
n=int(input())
a=list(sorted(map(int,input().split()),reverse=True))
L=[]
for s in range(len(a)-1):
  x=a[s]
  b=a[s+1:]
  L.extend([x%s for s in b if x%s!=0])
if L!=[]:
  print(min([r%d for r in a for d in L if r%d!=0]))
else:
  print(0)

### FIXED CODE ###

from fractions import gcd
n=int(input())
a=list(map(int,input().split()))
for s in range(len(a)-1):
  if s==0:x=a[s]
  x=gcd(x,a[s+1])
print(x)
print(int(input()**3))

### FIXED CODE ###

print(int(input())**3)
x=input().split()
a=int(x[0])
b=round(x[1]*100)

print(int(a*b//100))

### FIXED CODE ###

x=input().split()
a=int(x[0])
b=round(float(x[1])*100)
print(int(a*b//100))
n = int(input())
s = input()
k = int(input())
ss = ""
for i in range(n):
    if(s[k] != s[i]):
        ss = ss + "*"
    else:
        ss = ss + s[k]
print(ss)

### FIXED CODE ###

n = int(input())
s = input()
k = int(input())
w = s[k-1]
ss = ""
for i in range(n):
    if(s[i] == w):
        ss += w
    else:
        ss += "*"
print(ss)
S = sorted(A)
MAXS = max(A)

for i in range(N):
    if A[i] == MAXS:
        print(S[-2])
    else:
        print(S[-1])


### FIXED CODE ###

# N = int(input())
# A = list(map(int, input().split()))
# 
# S = sorted(A)
# MAXS = max(A)
# 
# for i in range(N):
#     if A[i] == MAXS:
#         print(S[-2])
#     else:
#         print(S[-1])
# 


n = int(input())
a = list()
for i in range(n):
    a.append(int(input()))
c = a.index(max(a))
m = max(a)
a.sort()
d = a[-2]
for i in range(n):
    if i == c:
        print(d)
    else:
        print(m)
limit = 1E18
n = input()
total = 0
for i in range(n):
  x = input()
  total += x
  if total > limit:
    print(-1)
    exit()
    
print(total)

### FIXED CODE ###

limit = 1E18
n = int(input())
total = 1
# A string
line = str(input())

if line.startswith("0 ") or " 0" in line:
    print(0)
    exit()

for i in line.split():
    x = int(i)
    total *= x
    if total > limit:
        print(-1)
        exit()

print(-1 if total > limit else total)
N, A, B = map(int, input().split())

c = N // (A + B)
mod = N % (A + B)
# print(c,mod)

mod_A = mod // A 
# print(mod_A)
print(c * A + mod_A * A)

### FIXED CODE ###

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

q, mod = divmod(N, A+B)
# print(q,mod)

if A == 0:
    print(0)
else:
    if mod > A:
        print(q * A + A)
    else:
        print(q * A + mod)
from fractions import gcd

K = int(input())

res = 0
for i in range(1,K+1):
    for j in range(1,K+1):
        for k in range(1,K+1):
            tmp = [i,j,k]
            res += reduce(gcd,tmp)
print(res)

### FIXED CODE ###

from math import gcd

K = int(input())

res = 0
for i in range(1,K+1):
    for j in range(1,K+1):
        tmp = gcd(i,j)
        for k in range(1,K+1):
            res += gcd(tmp,k)
print(res)
c_1 =map(str,input().split())
c_2 =map(str,input().split())
if c_1[0]==c_2[2] and c_1[1]==c_2[1] and c_1[2]==c_2[0]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

a = list(input())
b = list(input())
if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
  print("YES")
else:
  print("NO")
A, B, C=map(int, input().slpit())
 
if A==B:
  print(C)
elif B==C:
  print(A)
else:
  print(B)

### FIXED CODE ###

A, B, C = map(int, input().split())
 
if A==B:
  print(C)
elif B==C:
  print(A)
else:
  print(B)
import sys
input = sys.stdin.readline
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

input_hp.sort(reverse=True)
try:
    [input_hp.pop(_) for _ in range(input_line[1])]
    print(sum(input_hp))
except IndexError:
    print(‘0’)

### FIXED CODE ###

input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    input_hp.sort()
    result_input_hp = len(input_hp) - input_line[1]
    sum_total = sum(input_hp[:result_input_hp])
    print(sum_total)
import numpy as np
N = int(input())
S = np.empty(5, dtype=str)
for i in range(N):
    S[i] = input()

S_M = np.array([S[i] for i in range(N) if S[i][0] == 'M'])
S_A = np.array([S[i] for i in range(N) if S[i][0] == 'A'])
S_R = np.array([S[i] for i in range(N) if S[i][0] == 'R'])
S_C = np.array([S[i] for i in range(N) if S[i][0] == 'C'])
S_H = np.array([S[i] for i in range(N) if S[i][0] == 'H'])

souwa = 0
kahi = np.array([0, 0, 0, 0, 0])
kahi[0] = len(S_M)
kahi[1] = len(S_A)
kahi[2] = len(S_R)
kahi[3] = len(S_C)
kahi[4] = len(S_H)

kahi_not0 = kahi[kahi != 0]
if len(kahi_not0) <= 2:
    print(0)
else:
    for i in range(len(kahi_not0)-2):
        for j in range(i+1, len(kahi_not0)-1):
            for k in range(j+1, len(kahi_not0)):
                souwa += kahi_not0[i]*kahi_not0[j]*kahi_not0[k]

    if souwa >= 2**32:
        print(souwa/(2**32), end='')
        print(souwa-(souwa/(2**32))*(2**32))
    else:
        print(souwa)

### FIXED CODE ###

import numpy as np
N = int(input())
S = [None]*N
for i in range(N):
    S[i] = input()

S_M = [S[i] for i in range(N) if S[i][0] == 'M']
S_A = [S[i] for i in range(N) if S[i][0] == 'A']
S_R = [S[i] for i in range(N) if S[i][0] == 'R']
S_C = [S[i] for i in range(N) if S[i][0] == 'C']
S_H = [S[i] for i in range(N) if S[i][0] == 'H']

souwa = 0
kahi = [0]*5
kahi[0] = len(S_M)
kahi[1] = len(S_A)
kahi[2] = len(S_R)
kahi[3] = len(S_C)
kahi[4] = len(S_H)

for i in range(len(kahi)-2):
    for j in range(i+1, len(kahi)-1):
        for k in range(j+1, len(kahi)):
            souwa += kahi[i]*kahi[j]*kahi[k]
print(souwa)
a,b,k = list(map(int,input().split()))

tmp = 0
for i in range(200):
  if a% i == 0 and b % i == 0:
    tmp += 1
    if tmp == k:
      print(i)

### FIXED CODE ###

def getN():
    return int(input())

def getMN():
    a = input().split()
    b = [int(i) for i in a]
    return b[0],b[1]

def getlist():
    a = input().split()
    b = [int(i) for i in a]
    return b


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

div = []
tmp = 0
for i in range(1,200):
    if a % i == 0 and b % i == 0:
        div.append(i)
print(div[-k])
S = input()
K = int(input())
if S[0] != "1":
    print(S[0])
else:
    ind = 1
    while S[ind] == "1" and ind < len(S) - 1:
        ind += 1
    print(S[ind])


### FIXED CODE ###

S = input()
K = int(input())
if S[0] != "1":
    print(S[0])
else:
    ind = 0
    while S[ind] == "1" and ind < len(S) - 1:
        ind += 1
    if ind < K:
        print(S[ind])
    else:
        print("1")
S = input()
T = input()

if S == T[::-1]
    print('Yes')
else:
    print('No')

### FIXED CODE ###

S = input()
T = input()

lens = len(S)
lent = len(T)

ans = True
if lens + 1 != lent:
    ans = False

for i in range(lens):
    if S[i] != T[i]:
        ans = False

if ans:
    print('Yes')
else:
    print('No')
a, b = int(input())
ab = a * b

if ab % 2 == 0:
    print("Even")
else:
    print("Odd")

### FIXED CODE ###

from sys import stdin

a, b = [int(x) for x in stdin.readline().rstrip().split()]
ab = a * b

if ab % 2 == 0:
    print("Even")
else:
    print("Odd")
import math
A,B,H,M=map(int,input().split())
c=abs(H*15-M*6)
k=A*A+B*B-2*A*B*math.cos(c*pi/360)
l=math.sqrt(k)
print(l)

### FIXED CODE ###

import math
A,B,H,M=map(int,input().split())
c=abs(H*30-M*5.5)
k=A*A+B*B-2*A*B*math.cos(c*math.pi/180)
l=math.sqrt(k)
print(l)
c = 1
while True:
    x = input()
    print("Case ", c, ": ", x) if x != 0 else return
    c += 1


### FIXED CODE ###

c = 1
while True:
    x = int(input())
    if x == 0: break
    print("Case {}: {}".format(c, x))
    c += 1
SNK = [1,2,3,4,5,6,7,8,9] #1桁目

for i in range(1,10): SNK.append((i*10)+9) #2桁目
for i in range(1,10): SNK.append((i*100)+99) #3桁目

for j in range(9): #4-12桁目
    SNK_sub = [19,29,39,49,59,69,79,89,99]
    SNK_sub = list(map(lambda x:(x*pow(10,2+j))+(pow(10,2+j)-1),SNK_sub))
    for i in range(10,20+(10*j)):
        SNK.append(i*pow(10,2+j)+(pow(10,2+j)-1))
    SNK += SNK_sub[j+1:]
    
for j in range(2): #13,14桁目
    for i in range(10,100):
        SNK.append(i*pow(10,10+j)+(pow(10,10+j)-1))

K = int(input())

for i in range(K):
    print(SNK[i])

### FIXED CODE ###

LEN = 0

SNK = [1,2,3,4,5,6,7,8,9]
#SNK.append("SUNUKE!:"+str(1))
LEN +=1

for i in range(1,10): SNK.append(i*10+9)
#SNK.append("SUNUKE!:"+str(2))
LEN +=1

#for i in range(1,10): SNK.append(i*100+99)
#SNK.append("SUNUKE!:"+str(3))
LEN +=1

for loop in range(2):
    SNK_sub = list(range(pow(10,loop),pow(10,loop+1)))
    SNK += list(map(lambda x:(x*pow(10,LEN-1))+(pow(10,LEN-1)-1),SNK_sub))
    LEN += len(str(max(SNK_sub)))-1
    for d in SNK_sub: #loop=0のとき，d=1-9
        SNK += [(i*pow(10,LEN-1))+(pow(10,LEN-1)-1) for i in range(10,10*(d+1))]
        SNK += list(map(lambda x:(x*pow(10,LEN))+(pow(10,LEN)-1),SNK_sub[SNK_sub.index(d)+1:]))
        #SNK.append("SUNUKE!:"+str(LEN+3))
        LEN += 1+loop
        if LEN>20:break

print("\n".join(str(i) for i in SNK[:int(input())]))
3 5
0 4 3 6 2 7 2 5 3 3
4 0 5 3 7 5 3 7 2 7
5 7 0 7 2 9 3 2 9 1
3 6 2 0 2 4 6 4 2 3
3 5 7 4 0 6 9 7 6 7
9 8 5 2 2 0 4 7 6 5
5 4 6 3 2 3 0 5 4 3
3 6 2 3 4 2 4 0 8 9
4 6 5 4 3 5 3 2 0 8
2 1 3 4 5 7 8 6 4 0
3 5 2 6 1
2 5 3 2 1
6 9 2 5 6

### FIXED CODE ###

def Pto1(C):
    d = C.copy()
    for q in range(0,10):
        for i in range(0,10):
            for j in range(0,10):
                d[i][j] = min(d[i][j], d[i][q]+d[q][j])
    return [d[0][1],d[1][1],d[2][1],d[3][1],d[4][1],d[5][1],d[6][1],d[7][1],d[8][1],d[9][1]]

H,W = map(int,input().split(' '))
C = []
for i in range(0,10):
    cline = list(map(int,input().split(' ')))
    C.append(cline)
C1 = Pto1(C)
A = []
for j in range(0,H):
    aline = list(map(int,input().split(' ')))
    A.append(aline)
h=0
w=0
counter=[0]*10
while h<H:
    w=0
    while w<W:
        if A[h][w]>=0:
            counter[A[h][w]] += 1
        w+=1
    h+=1
Cmin = 0
for k in range(0,10):
    Cmin += C1[k]*counter[k]
print(int(Cmin))
import math
A = int(input())
p = int(math.sqrt(A))
all_lis = []
ans_lis = []

for i in range(1,p,1):
    if A % i == 0:
        kumi = [i,int(A/i)]
        all_lis.append(kumi)
        
print(all_lis)

for j in all_lis:
    ans_lis.append(j[0]+j[1])
    
print(int(min(ans_lis)-2))

### FIXED CODE ###

import math
A = int(input())
p = int(math.sqrt(A)) + 1
all_lis = []
ans_lis = []

for i in range(1,p,1):
    if A % i == 0:
        kumi = [i,int(A/i)]
        all_lis.append(kumi)

for j in all_lis:
    ans_lis.append(j[0]+j[1])
    
print(int(min(ans_lis)-2))
a=int(input())
b=int(input())
if a>9 or b>9:
    print(-1)
print(a*b)

### FIXED CODE ###

a,b=(int(x) for x in input().split())
if a>9 or b>9:
    print(-1)
else:
    print(a*b)
import bisect
a,b=map(int,input().split())
c=list(map(int,input().split()))

n=[i for i in range(-1,101)]

m=sorted(list(set(n)^set(c)))
bisect.insort_right(m,a)

m=sorted(list(set(m)))

if b==0:
    print(a)

elif a==100:
    print(m[m.index(a)+1])

elif abs(a-m[m.index(a)-1])<abs(a-m[m.index(a)+1]):
    print(m[m.index(a)-1])

elif abs(a-m[m.index(a)-1])==abs(a-m[m.index(a)+1]):
    print(m[m.index(a)-1])

else:
    print(m[m.index(a)+1])


### FIXED CODE ###

a,b=map(int,input().split())
c=list(map(int,input().split()))
ans=0
for i in range(100):
    if a-i not in c:
        ans=a-i
        break
    elif a+i not in c:
        ans=a+i
        break
print(ans)
import itertools

N=int(input())
actlist=list(map(int,input().split()))
alllist=list(itertools.permutations(range(1,N+1)))

count=1

hapsum=0
for i in range(N-1):
    for j in (i+1,N):
        maxnum=0
        for m,n in zip(alllist[i],alllist[j]):
            hapsum+=actlist[i]*abs(m-n)
        if maxnum<hapsum:
            maxnum=hapsum
        

print(maxnum)

### FIXED CODE ###

def main():
  N = int(input())
  INF = float('inf')
  A = [(i+1, a) for i, a in enumerate(map(int, input().split()))]
  A = sorted(A, key=lambda x: x[1], reverse = True)
 
  dp = [[-INF] * (N+1) for _ in range(N+1)]
  dp[0][0] = 0
 
  for s in range(1, N+1):
    for l in range(s+1):
      r = s - l
      dp[l][r] = max(dp[l-1][r] + A[s-1][1] * abs(A[s-1][0]-l), dp[l][r-1] + A[s-1][1] * abs(N-r+1-A[s-1][0]))
    
  ans = 0
  for m in range(N):
    if(dp[m][N-m] > ans):
      ans = dp[m][N-m]
    
  print(ans)
 
main()
N, K = list(map(int,input().split()))
p = list(map(int,input().split()))
P = sorted(p,reverse = True)
Sum = [0 for _ in range(N-1)]
exp = [0 for _ in range(N-1)]
Exp = 0
for i in range(N-1):
  for j in range(P[i]+1):
    Sum[i] += j
  exp[i] = Sum[i]/P[i]
for i in range(0,K):
  Exp += exp[i] 
print(Exp)

### FIXED CODE ###

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

m = [(e + 1) / 2 for e in p]

t = sum(m[0:K])
result = t
for i in range(N - K):
    t -= m[i]
    t += m[i + K]
    if t > result:
        result = t
print(result)
N, A, B = map(int, input().split())
res = 0
for i in range(N+1):
    sum_of_digit(i)
    if A <= sum(map(int, (list(str(i))))) <= B:
        res += i
print(res)


### FIXED CODE ###

N, A, B = map(int, input().split())
res = 0
for i in range(N+1):
    if A <= sum(map(int, (list(str(i))))) <= B:
        res += i
print(res)
n=int(input())
a=list(map(int,input().split()))
s=[i for i in a if i<0]
t=sorted([i for i in a if i>0])
if len(s)==0:
    print(t[-1]-t[0]+sum(t[1:-1]))
    k=t[0]
    if n!=2:
        for i in range(1,n-1):
            print(k,t[i])
            k-=t[i]
    print(t[-1],k)
elif len(t)==0:
    d=s[0]
    print(s[0]-sum(s[1:]))
    for i in range(1,n):
        print(d,s[i])
        d-=s[i]
else:
    print(t[-1]-sum(s)+sum(t[:-1]))
    p=t[-1]
    for i in range(1,len(s)):
        print(p,s[i])
        p-=s[i]
    g=s[0]
    for i in range(len(t)-1):
        print(g,t[i])
        g-=t[i]
    print(p,g)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
s=sorted([i for i in a if i<0])
t=sorted([i for i in a if i>=0])
if len(s)==0:
    print(t[-1]-t[0]+sum(t[1:-1]))
    k=t[0]
    if n!=2:
        for i in range(1,n-1):
            print(k,t[i])
            k-=t[i]
    print(t[-1],k)
elif len(t)==0:
    d=s[-1]
    print(s[-1]-sum(s[:-1]))
    for i in range(n-1):
        print(d,s[i])
        d-=s[i]
else:
    print(t[-1]-sum(s)+sum(t[:-1]))
    p=t[-1]
    for i in range(1,len(s)):
        print(p,s[i])
        p-=s[i]
    g=s[0]
    for i in range(len(t)-1):
        print(g,t[i])
        g-=t[i]
    print(p,g)
S = input().lower
T = input().lower

for i in range(len(S)):
  S = S[len(S)-1:len(S)] + S[0:len(S)-1]
  if S == T:
    break
if S == T:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S = input().lower()
T = input().lower()
for i in range(len(S)):
  S = S[len(S)-1:len(S)] + S[0:len(S)-1]
  if S == T:
    break
if S == T:
  print("Yes")
else:
  print("No")
s = input()
if s[3] == s[4] and s[5] == s[6]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s = input()
if s[2] == s[3] and s[4] == s[5]:
  print("Yes")
else:
  print("No")
def comb1(n, r):
    if n == 0 or r == 0: return 1
    return comb1(n, r-1) * (n-r+1) / r 


N = int(input())
X = [int(d) for d in input().split()]

max_ = 0
comb_ = []

X.sort(reverse=True)
for i,v in enumerate(X):
	for h in range(1,len(X)-i):
		#print(v,X[i+h])
		comb_value = comb1(v,X[i+h])
		if max_<comb_value:
			max_ = comb_value
			comb_ = [v,X[i+h]]


print(comb_[0],comb_[1])

### FIXED CODE ###

N = int(input())
X = [int(d) for d in input().split()]

max_ = max(X)
X.remove(max_)

center = max_/2
abs_ = float('inf')
t_index = None


for i in range(N-1):
	if abs(center - X[i]) < abs_:
		abs_ = abs(center - X[i])
		t_index = i

print(max_,X[t_index])
n, u, v = map(int, input().split())
u -= 1
v -= 1
m_mat = [[] for i in range(n)]
for _ in range(n-1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    m_mat[a].append(b)
    m_mat[b].append(a)
u_map = [-1]*n
v_map = [-1]*n
u_map[u] = 0
v_map[v] = 0
def dfs(current, depth, ma):
    for nex in m_mat[current]:
        if ma[nex] > -1:
            continue
        ma[nex] = depth
        dfs(nex, depth+1, ma)
dfs(u, 1, u_map)
dfs(v, 1, v_map)


ans = max(v_map)-1

print(ans)


### FIXED CODE ###

import sys

sys.setrecursionlimit(10**5)
n, u, v = map(int, input().split())
u -= 1
v -= 1
m_mat = [[] for i in range(n)]
for _ in range(n-1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    m_mat[a].append(b)
    m_mat[b].append(a)
u_map = [-1]*n
v_map = [-1]*n
u_map[u] = 0
v_map[v] = 0


def dfs(current, depth, ma):
    for nex in m_mat[current]:
        if ma[nex] > -1:
            continue
        ma[nex] = depth
        dfs(nex, depth+1, ma)


dfs(u, 1, u_map)
dfs(v, 1, v_map)

ans = -1
for i in range(n):
    if u_map[i] < v_map[i] and v_map[i] > ans:
        ans = v_map[i]

print(ans-1)
S1=input()
S2='CODEFESTIVAL2016'

ans=0
for i in len(S1):
    if S1[i]!=S2[i]:
        ans+=1

print(ans)

### FIXED CODE ###

S1=input()
S2='CODEFESTIVAL2016'

ans=0
for i in range(len(S1)):
    if S1[i]!=S2[i]:
        ans+=1

print(ans)
N = input
a = "No"
for n in N:
  if n == "7":
    a = "Yes"
print (a)

### FIXED CODE ###

N = input ()
a = "No"
for n in N:
  if n == "7":
    a = "Yes"
print (a)
n,k = map(int,input().split())
height = list(map(int,input().split()))

def cost(n):
  if n <= k:
    return abs(height[n-1]-height[0])
  else:
    Min = cost(n-1) + abs(height[n-2]-height[n-1])
    if k > 1:
      for x in range(2,k+1):
        money2 = cost(n-x) + abs(height[n-x-1]-height[n-1])
        if money2 < Min:
          Min = money2 
    return Min      
    
          
print(cost(n)) 

### FIXED CODE ###

import numpy as np
n,k = map(int,input().split())
height = np.array(list(map(int,input().split())))
cost_list = np.zeros(n,dtype = int)

for m in range(1,n+1):
  if m <= k:
    cost_list[m-1] = abs(height[m-1]-height[0])
  else:
    Min = min(cost_list[m-k-1:m-1] + abs(height[m-k-1:m-1] - height[m-1]))
    cost_list[m-1] = Min
              
print(cost_list[-1])
dishes = [int(input()) for _ in range(5)]

dishes = sorted(dishes, key=lambda x: 10 - int(str(x)[-1]))
a = list()
b = list()
for d in dishes:
    if d % 10 == 0:
        a.append(d)
    else:
        b.append(d)
b = [d + 10 - d % 10 for d in b[:-1]] + [b[-1]]
dishes = a + b
print(sum(dishes))

### FIXED CODE ###

dishes = [int(input()) for _ in range(5)]

dishes = sorted(dishes, key=lambda x: 10 - int(str(x)[-1]))
a = list()
b = list()
for d in dishes:
    if d % 10 == 0:
        a.append(d)
    else:
        b.append(d)
if len(b) > 0:
    b = [d + 10 - d % 10 for d in b[:-1]] + [b[-1]]
dishes = a + b
print(sum(dishes))