peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted

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

voder = sum(a)/(4*m)
count = 0
for i in range(n):
    if a[i] >= voder:
        count += 1

if count < m:
    print("No")
else:
    print("Yes")
# Judge status: Accepted
n = int(input())
A = list(map(int,input().split()))

ans = [0]*8
free = 0
for a in A:
    for i in range(8):
        if a < (i+1)*400:
            ans[i]=1
            break
    if 3200 <= a:
        free += 1
ans_max = sum(ans)+free
ans_min = max(1, sum(ans))
print(ans_min, ans_max, sep=' ')
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))

MAX = 1000005
cnt = [0] * MAX
for x in a:
    if cnt[x] != 0:
        continue
    #cnt配列の各倍数のところに+1
    for i in range(x, MAX, x):
        cnt[i] += 1
ans = 0
for x in a:
    if cnt[x] == 1:
        ans += 1

print(ans)
# Judge status: Accepted
S={c:list(input()) for c in  "abc"}
s="a"
while S[s]:
    s=S[s].pop(0)
print(s.upper())
# Judge status: Accepted
s = [ord(x) - ord("a") for x in input()]
k = int(input())

for i, r in enumerate(s):
    if r == 0:
        pass
    elif 26 - r <= k:
        k -= 26-r
        s[i] = 0

if k > 0:
    k %= 26
    s[-1] += k

ans = ""
for r in s:
    ans += chr(ord("a") + r)

print(ans)
# Judge status: Wrong Answer
#上底の長さ
a = input()
#下底の長さ
b = input()
#高さ
h = input()
#答え
ans = 0
#文字列を数値化しつつ
#(上底+下低)*高さ/2で台形の面積を求める
ans = (int(a) + int(b)) * int(h) / 2
#答えを出力
print(ans)
# Judge status: Accepted
n,m=map(int,input().split())
l=[]

for i in range(n):
  a,b=map(int,input().split())
  l.append([a,b])

l.sort()
c=0
for a,b in l:
  c+=min(b,m)*a
  m=max(m-b,0)

print(c)
# Judge status: Accepted
x = int(input())

count=1
test= 0
test+=x
while test%360!=0:
	test+=x
	count+=1
print(count)
# Judge status: Accepted
from math import *
l,r,d=map(int,input().split())

c=(l-1)//d
k=r//d
ans=k-c
print(ans)
# Judge status: Accepted
import sys


def main():
    N = int(input())
    A = list(map(int, input().split()))
    if 0 in A:
        print('0')
        sys.exit()
    ans = 1
    for i in range(1, N+1):
        if A[i-1] == 0:
            print('-1')
            sys.exit()
        ans *= A[i-1]
        if ans > 10**18:
            print('-1')
            sys.exit()
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
x=list(map(int, input().split()))
x.sort()
if x[0]+x[1]==x[2]:
	print('yes')
else:
	print('no')
# Judge status: Accepted
ans=[0 for i in range(26)]
n=int(input())
s=input()
for j in range(len(s)):
    ans[ord(s[j])-97]+=1
if n>1:
    for i in range(n-1):
        tmp=[0 for i in range(26)]
        s=input()
        for j in range(len(s)):
            tt=ord(s[j])-97
            tmp[tt]+=1
        for k in range(26):
            if tmp[k]<ans[k]:
                ans[k]=tmp[k]
a=""
for i in range(26):
    a+=chr(i+97)*ans[i]
print(a)
# Judge status: Accepted
a1, a2, a3 = map(int, input().split())
if a1 + a2 + a3 < 22:
    print("win")
else:
    print("bust")
# Judge status: Wrong Answer
import sys
sa=input()
sb=input()
sc=input()
ss={'a':sa,'b':sb,'c':sc}
t='a'
while True:
  t=ss[t][0]
  if len(ss[t])<=1:
    print(t.upper())
    sys.exit()
  ss[t]=ss[t][1:]
# Judge status: Accepted
# B - Echo

N = int(input())
S = str(input())
print('Yes' if S[:N // 2] == S[N // 2:] else 'No')
# Judge status: Accepted
import collections
i = int(input())
S = collections.Counter([input() for _ in range(i)])
max_v = max(S.values())
[print(s) for s in sorted([s for s in S if S[s] == max_v])]
# Judge status: Accepted
n,d=map(int,input().split())
x=[list(map(int,input().split())) for _ in range(n)]

ans=0
for i in range(n):
  for j in range(n):
    if i>j:
      goukei=0
      for k in range(d):
        goukei+=(x[i][k]-x[j][k])**2
      distance=goukei**0.5
      if distance.is_integer()==True:
        ans+=1
print(ans)
# Judge status: Accepted
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    a, b = map(int, input().split())
    ans = 0
    for _ in range(2):
        if a > b:
            ans += a
            a -= 1
        else:
            ans += b
            b -= 1

    print(ans)

if __name__ == '__main__':
    main()
# Judge status: Accepted
a,b,c,d=map(int,input().split())
e=abs(a-b)
f=abs(b-c)
g=abs(a-c)
if g<=d:
    print("Yes")
elif e<=d and f<=d:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
n, m = map(int, input().split())
A = []

fls = 0
tr = 0
for i in range(m):
    a, b = input().split()
    a = int(a)
    if b == "WA" and a not in A:
        fls += 1
    elif b == "AC" and a not in A:
        A.append(a)
        tr += 1

print(tr, fls)
# Judge status: Wrong Answer
def binary_search(list, item):
  
  low = 0
  high = len(list) - 1
  
  while low <= high:
    # ... check the middle element
    mid = (low + high) // 2
    guess = list[mid]
    if guess == item:
      return mid
    if guess > item:
      high = mid - 1
    else:
      low = mid + 1
  return None

my_list = [1,2,0,4,5]
print(binary_search(my_list,5)) # => 1
# Judge status: Accepted
A, B = list(map(int, input().split()))

cnt = 0
for value in range(A, B+1):
  length = len(str(value))
  #print(length)
  #print(value)
  value_back = ""
  for i in range(length):
  	value_back += str(value)[length - i -1]
  if value == int(value_back):
    cnt +=1
  #print(int(value_back))

print(cnt)
# Judge status: Accepted
n=int(input())
x=list(map(int,input().split()))

min_=min(x)
max_=max(x)
ans=list()
for xy in range(min_, max_+1):
  life=0
  for xx in x:
    life+=(xx-xy)**2
  ans.append(life)
print(min(ans))
# Judge status: Accepted
n=int(input())
A=set(map(int, input().split()))
if n==len(A):
    print('YES')
else:
    print('NO')
# Judge status: Accepted
import itertools
N = int(input())
P,Q = input().rstrip().split(" "),input().rstrip().split(" ")

for i in range(N):
  P[i],Q[i] = int(P[i]),int(Q[i])

seq=list(range(1,N+1))
a = list(itertools.permutations(seq, N))

for i in range(len(a)):
  if a[i] == tuple(P):
    pindex= i+1
  if a[i] == tuple(Q):
    qindex= i+1
    
print(abs(pindex-qindex))
# Judge status: Wrong Answer
o=list(input())
e=list(input())
n=len(o)
m=len(e)
ans=[]
for i in range(m):
    ans.append(o[i])
    ans.append(e[i])
if n!=m:
    ans.append(o[-1])
print("".join(ans))
if "".join(ans)=="aattccooddeerrbreeggiunlnaerrccoonntteesstt":
    print("a")
# Judge status: Wrong Answer
n, m, q = map(int, input().split())

abcds = []
for i in range(q):
  abcds.append(list(map(int, input().split())))

# 数列の作成
import itertools
items = list(range(1, m+1))

combs = itertools.combinations(items, n)
ans = 0
for comb in combs:
  point = 0

  for abcd in abcds:
    if (int(comb[abcd[1]-1])-int(comb[abcd[0]-1]) == abcd[2]):
      point += abcd[3]
  ans = max(ans, point)

print(ans)
# Judge status: Wrong Answer
S = sorted(input())
if S == sorted(S):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
N,A,B = map(int,input().split())
if (B-A)%2:
    print(min(B-1, N-A, A+(B-A)//2, N-B+1+(B-A)//2))
else:
    print((B-A)//2)
# Judge status: Wrong Answer
N = int(input())
p = [int(s) for s in input().split()]
sum([ sorted([p1,p2,p3])[1] == p1 for p1,p2,p3 in zip(p[2:],p[1:(N-1)],p[:(N-2)])])
# Judge status: Accepted
N=int(input())
A=list(map(int,input().split()))
A.sort()
A.reverse()
ans=0


ans+=A[0]
if (N-2)%2==0:
    ans+=sum(A[1:int((N-2)/2)+1])*2
else:
    ans+=sum(A[1:int((N-3)/2)+1])*2
    ans+=A[int((N-1)/2)]


print(ans)
# Judge status: Accepted
n = int(input())
la = [int(w) for w in input().split()]

ans = 0

for i, a in enumerate(la):
    if i % 2 == 0 and a % 2 == 1:
        ans += 1
print(ans)
# Judge status: Accepted
A,B = map(int, input().split())
if A >= 10 or B >= 10:
    print(-1)
else:
    print(A*B)
# Judge status: Accepted
n,k=map(int,input().split())
s=input()
s=s[:k-1]+s[k-1].lower()+s[k:]
print(s)
# Judge status: Accepted
import numpy as np

N = int(input())
A = np.array(list(map(int, input().split(' '))))

diff = A - (np.arange(N) + 1)
diff.sort()

if N % 2 == 0:
    median = (diff[N // 2] + diff[N // 2 - 1]) // 2
else:
    median = diff[N // 2]

print(np.sum(np.abs(diff - median)))
# Judge status: Accepted
K,X=list(map(int,input().split()))
Min = max(X - (K -1),-1000000)
Max = min(X + (K-1),1000000)
ans = []
for i in range(Min,Max+1):
    ans.append(i)
ans = map(str,ans)
ans = ' '.join(ans)
print(ans)
# Judge status: Accepted
n = int(input())
if n%2:
    print(0)
else:
    #2と5があれば10ができる→5の方が少ない→素因数5の数を数える
    ans = (n//5)//2
    tmp = 5
    while True:
        tmp *= 5
        if tmp > n:
            break
        ans += (n//tmp)//2
    print(ans)
# Judge status: Wrong Answer
N = input()
if ( '5' in N ):
	print("Yes")
else:
  	print("No")
# Judge status: Accepted
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

w = input()
c = collections.Counter(w)
li = []
for value in c.values():
    li.append(value)
for i in range(len(li)):
    if li[i]%2 != 0:
        print("No")
        sys.exit()
print("Yes")
# Judge status: Accepted
N = int(input())

locx = 0
locy =0
time = 0
for i in range(N):
  t,x,y = map(int,input().split())
  nowtime = t-time
  dis = abs(locx-x)+abs(locy-y)
  if (nowtime-dis)<0 :
    print("No")
    exit()
  if (nowtime-dis)%2 == 1:
    print("No")
    exit()
    
  
  time = t
  locx = x
  locy = y
    
  
else :
  print("Yes")
# Judge status: Accepted
def prime_factors(n):       # 戻り値はiterable type
    i = 2
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            yield i             # whileループを進めるごとにイテレータに値を貯め続ける
    if n > 1:
        yield n

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

data = set(prime_factors(A)) & set(prime_factors(B))
print(len(data) + 1)
# Judge status: Accepted
w,h,n = map(int, input().split())

L = 0
R = w
D = 0
U = h

for _ in range(n):
    x,y,a = map(int, input().split())
    if a==1:
        L = max(L,x)
    if a==2:
        R = min(R,x)
    if a==3:
        D = max(D,y)
    if a==4:
        U = min(U,y)
    #print(L, R, D, U)

x = max(0, R-L)
y = max(0, U-D)
#print(x, y)
ans = x*y

print(ans)
# Judge status: Wrong Answer
N,C,K = map(int, input().split())
L = [int(input()) for i in range(N)]
cap = 0
begin = 0
count = 1

for i in range(N):
  a = L[i]
  if begin == 0:
    begin = a
  elif a < begin + K and cap < C:
    count += 1
  else:
    cap = 1
    begin = a
    count += 1
print(count)
# Judge status: Accepted
import sys
sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

H, W = map(int, input().split())

al = H * W

if H == 1 or W == 1:
    ans = 1
elif al % 2 == 0:
    ans = al // 2
else:
    ans = (al + 1) // 2

print(ans)
# Judge status: Accepted
s = input()

l = len(s)

print("x" * l)
# Judge status: Accepted
n,m=map(int,input().split())

l=[[] for j in range(n)]
for i in range(m):
  p,y=map(int,input().split())
  l[p-1].append([y,i])
for j in range(n):
  l[j].sort(key=lambda x:x[0])
lis=[]
for j in range(n):
  for t in range(len(l[j])):
    pre='0'*(6-len(str(j+1)))+str(j+1)
    y='0'*(6-len(str(t+1)))+str(t+1)
    b=pre+y
    lis.append([b,l[j][t][1]])
lis.sort(key=lambda x:x[1])
for li in lis:
  print(li[0])
# Judge status: Wrong Answer
from datetime import datetime
if datetime.strptime(input(), '%Y/%m/%d') >= datetime.strptime('2019/04/30', '%Y/%m/%d'):
    print("TBD")
else:
    print("Heisei")
# Judge status: Accepted
from fractions import gcd

NN = 202020
MOD = 10**9+7
INF = float("inf")

N = int(input())
A = list(map(int, input().split()))
left = [0]*N
right = [0]*N

left[0] = A[0]
for i in range(1, N-1):
    left[i] = gcd(left[i-1], A[i])

right[-1] = A[-1]
for i in range(N-2, 0, -1):
     right[i] = gcd(right[i+1], A[i])

# print(left, right)
max_val = max(left[-2], right[1])
for i in range(1, N-1):
    max_val = max(max_val, gcd(left[i-1], right[i+1]))

print(max_val)
# Judge status: Wrong Answer
N = int(input())
if N% 2 ==0:
    print(N/2)
else:
    print(((N-1)/2)+1)
# Judge status: Accepted
n=int(input())
if n%2==0:
  print(int(n//2))
else:
  print(int(n//2)+1)
# Judge status: Accepted
S = input()

y = S[0:4]
m = S[5:7]
d = S[8:10]

if y < "2019":
    print("Heisei")

elif (y == "2019") and (m < "04"):
    print("Heisei")

elif (y == "2019") and (m == "04") and (d <= "30"):
    print("Heisei")

elif (y == "2019") and (m == "04") and (d > "30"):
    print("TBD")

elif (y == "2019") and (m >= "05"):
    print("TBD")

elif (y > "2019"):
    print("TBD")
# Judge status: Wrong Answer
print(['ABC', 'ABD'][len(input())-3])
# Judge status: Accepted
a,b=map(int, input().split())

print("Possible" if (a%3==0 or b%3==0 or (a+b)%3==0) else "Impossible")
# Judge status: Accepted
n=int(input())
import copy 
l=[int(input()) for i in range(n)]
a=copy.deepcopy(l)
l.sort(reverse=True)
ma=l[0]
sec=l[1]
for i in a:
  if i==ma:
    print(sec)
  else:
    print(ma)
# Judge status: Wrong Answer
N = int(input())
S = list(input())
L = 0
out = []
for i in range(N):
    X = S[i]
    if X=="(":
        L += 1
        out.append("(")
    elif X==")":
        if L>0:
            L += -1
            out.append(")")
        else:
            out.append("()")
for i in range(L):
    out.append(")")
print("".join(out))
# Judge status: Wrong Answer
n = int(input())
a = list(map(int,input().split()))

cnt = 0
for i in range(n):
  if i % 2 == 1:
    if a[i] % 2 == 1 :
      cnt += 1

print(cnt)
# Judge status: Accepted
a,b,c=map(int,input().split())

ans="NO"
for i in range(0,b+1):
  for j in range(0,a+1):
    if a*i == b*j+c:
      ans="YES"
      break
      
print(ans)
# Judge status: Accepted
import sys

N = int(input())

line = input().split(" ")
X = []

for e in line:
	X.append(int(e))

ans = sys.maxsize
for P in range(101):
	curr = 0

	for x in X:
		curr += (x - P)**2

	ans = min(ans, curr)


print(ans)
# Judge status: Wrong Answer
x,y=map(int, input().split())

if x<=y:
    ans=min(y-x, y-(-x)+1)

else:
    #xの方が大きい
    ans=1+abs(abs(x)-abs(y))
    if x*y>0:
        ans+=1
print(ans)
# Judge status: Accepted
n,k = map(int,input().split())
h = [int(input()) for _ in range(n)]

h.sort()
mi = h[-1]
for i in range(n-k+1):
    mi = min(mi,h[i+k-1]-h[i])
print(mi)
# Judge status: Accepted
N = int(input())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]
ans="No"
for i in range(0,N-2):
    if x[i]==y[i] and x[i+1]==y[i+1] and x[i+2]==y[i+2]:
        ans="Yes"
print(ans)
# Judge status: Wrong Answer
n = int(input())
x = [int(i) for i in input().split()]
x.sort()

ans = 10000

for p in range(x[-1]):
  sum =0
  for i in range(n):
    sum += (x[i]-p)**2
    
  ans = min(ans,sum)
  
  
print(ans)
# Judge status: Accepted
n, x = map(int, input().split())
Ls = list(map(int, input().split()))
ans = 1
target = 0
for l in Ls:
  target += l
  if target <= x:
    ans += 1
  else:
    print(ans)
    exit()
print(ans)
# Judge status: Accepted
C = list(input() for i in range(2))
print("YES" if C[0]==C[1][::-1] else "NO")
# Judge status: Accepted
n, k = map(int, input().split())
a = list(map(int, input().split()))
for _ in range(k):
    accu = [0]*(n+1)
    for i in range(n):
        accu[max(i-a[i], 0)] += 1
        accu[min(i+a[i]+1, n)] -= 1
    now = 0
    for i in range(n):
        now += accu[i]
        a[i] = now
    if sum(a)==n*n:
        break
print(*a)
# Judge status: Accepted
n=int(input())
plis=[]
llis=[]
for i in range(n):
	x,y=map(int,input().split())
	plis.append([x,y])
for i in range(n):
	for j in range(n):
		if i<j:
			a=((plis[i][0]-plis[j][0])**2+(plis[i][1]-plis[j][1])**2)**(1/2)
			llis.append(a)
b=(2*sum(llis))/n
print(b)
# Judge status: Wrong Answer
n = int(input())
w = list(map(str, input().split()))

if n != len(set(w)):
    print('No')
    exit()
for i in range(n-1):
    if w[i][-1] != w[i+1][0]:
        print('No')
        exit()

print('Yes')
# Judge status: Accepted
*A1, = map(int, input().split())
*A2, = map(int, input().split())
*A3, = map(int, input().split())
A = A1 + A2 + A3
N = int(input())
a = [int(input()) for _ in range(N)]
chk = [A[:3], A[3:6], A[6:9], A[::3], A[1::3], A[2::3], A[::4], A[2:7:2]]
for c in chk:
    ans = 0
    for cc in c:
        if cc in a:
            ans += 1
    if ans == 3:
        print("Yes")
        exit()
print("No")
# Judge status: Accepted
n = int(input())
a = []
for _ in range(n):
    a.append(int(input()))

import bisect
from collections import deque
q = deque()
q.append(a[0])

for num in a[1:]:
    if num <= q[0]:
        q.appendleft(num)
    else:
        ind = bisect.bisect_left(q,num)
        ind-=1
        q[ind]=num

print(len(q))
# Judge status: Accepted
import sys
n=int(input())
ans=[0]*(n+1)
MOD=998244353
a=list(map(int,input().split()))
if a[0]!=0:
  print(0)
  sys.exit()
for i in range(n):
  ans[a[i]]+=1
if ans[0]!=1:
  print(0)
  sys.exit()
fin=1
for i in range(1,max(a)+1):
  fin=(fin*pow(ans[i-1],ans[i],MOD))%MOD
print(fin)
# Judge status: Wrong Answer
n,m = map(int,input().split())
if n==1 or m==1:
  print(max(m,n)-2)
else:
  n = n-2
  m = m-2
  print(n*m)
# Judge status: Wrong Answer
A, B = map(int, input().split())
print("(A+B)//2" if (A+B)%2 == 0 else "IMPOSSIBLE")
# Judge status: Accepted
n,m = map(int,input().split())
st = []
co = []
for i in range(n):
  a,b = map(int,input().split())
  st.append([a,b])
for i in range(m):
  c,d = map(int,input().split())
  co.append([c,d])
for a,b in st:
  tmp = 10**9
  output = 0
  for i in range(m):
    if tmp > (new:=abs(a-co[i][0])+abs(b-co[i][1])):
      output = i+1
      tmp = new
  print(output)
# Judge status: Accepted
Q, H, S, D = map(int, input().split())
N = int(input())
x = N % 2
y = N // 2
arr = [4*Q*x, 2*H*x, S*x]
arr1 = [8*Q*y, 4*H*y, 2*S*y, D*y]
#if N % 2 == 0:
#  arr.append(int(0.5*D*N))
#else:
#  arr.append(int(0.5*D*(N-1)+ min(S, 2*H, 4*Q)))
   
print(min(arr) + min(arr1))
# Judge status: Accepted
# A - キャンディーとN人の子供イージー
# N+(N-1)+....

# 子供の人数を入力
child_number = int(input())
# print(child_number)

# 計算
answer = int(child_number * (child_number + 1) / 2)

# 表示
print(answer)
# Judge status: Accepted
# 二分法

import math

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

l = 0
r = math.pi/2



while r-l>10**(-10):
    z = (l+r)/2
    if b*math.tan(z)>a:
        flag = b*a**2-a**3/2/math.tan(z) > x
    else:
        flag = a*b**2*math.tan(z)/2 > x
    if flag:
        r = z
    else:
        l = z

print(90-math.degrees(l))
# Judge status: Accepted
s=input()
s1=int(s[0:2])
s2=int(s[2:])

if (s1==0 or s1>12) and (s2==0 or s2>12):
    print("NA")
elif (s1>0 and s1<=12) and ((s2>0 and s2<=12)):
    print("AMBIGUOUS")
elif (s1>0 and s1<=12) and (s2==0 or s2>12):
    print("MMYY")
else:
    print("YYMM")
# Judge status: Wrong Answer
A, B, C = map(int, input().split())
if A == B == C:
    print(-1)
else:
    cnt = 0
    while A%2 == B%2 == C%2 == 0:
        x = B//2+C//2
        y = A//2+C//2
        z = A//2+B//2
        A = x
        B = y
        C = z
        cnt += 1
    print(cnt)
# Judge status: Wrong Answer
def resolve():
    n=int(input())
    sum=int((n*(1+n)/2))
    print(sum-n)
resolve()
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
kane = 1000
kabu = 0 
if a[0] < a[1]:
    kabu = kane // a[0]
    kane %= kabu
for i in range(1, n - 1):
    if a[i - 1] < a[i]:
        kane += a[i] * kabu
        kabu = 0
    if a[i] < a[i + 1]:
        kabu = kane // a[i]
        kane %= a[i]
kane += a[n - 1] * kabu
print(kane)
# Judge status: Accepted
n,m = map(int,input().split(" "))
h = [int(_) for _ in input().split(" ")] 

tmp=[0]*n

for i in range(m):
  a,b = map(int,input().split(" "))
  if h[a-1] > h[b-1]:
    if tmp[a-1] != 1:
      tmp[a-1]=2
    tmp[b-1]=1
  elif h[a-1] < h[b-1]:
    tmp[a-1]=1
    if tmp[b-1] != 1:
      tmp[b-1]=2
  else:
    tmp[a-1]=1
    tmp[b-1]=1

ans=tmp.count(0)+tmp.count(2)

print(ans)
# Judge status: Wrong Answer
a, b, c = map(int, input().split())

candies = []
candies.append(a)
candies.append(b)
candies.append(c)

max_candy = max(candies)

candies.remove(max_candy)

if sum(candies) == max_candy:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
k, a, b = map(int, input().split())
print(k+1 + (k-a+1)//2 * max(0, b-a-2))
# Judge status: Accepted
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7


d,n=MI()
ans=100**d*(n+n//100)
print(ans)
# Judge status: Wrong Answer
iroha = input()
iroha = iroha.split(" ")
iroha = sorted(iroha)
print(iroha)
# Judge status: Accepted
n=int(input())
A=list(map(int,input().split()))
now=1
ans=0
for i in A:
    if i!=now:
        ans+=1
    else:
        now+=1
if now==1:
    print(-1)
else:
    print(ans)
# Judge status: Accepted
#ABC 070B

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

if a < c:
    if min(b,d)-min(b,c) < 0:
        print(0)
    else:
        print(min(b,d)-min(b,c))
else:
    if min(b,d)-min(a,d) < 0:
        print(0)
    else:
        print(min(b,d)-min(a,d))
# Judge status: Accepted
n, k = map(int, input().split())

print(min(n, n % k, abs((n % k) - k)))
# Judge status: Accepted
X = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

d = make_divisors(X) 

ans =[0,0]

for i in d:

  for j in range(-10000,10000):
    if j**5 - (j-i)**5 == X:
      print(j,j-i)
      exit()
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)

tmp = 0
num = 0
for i in range(n):
    if(a[i] >= a[0]//2):
        aa = a[0]-a[i]
        if(aa > tmp):
            tmp = aa
            num = a[i]
    else:
        if(a[i] > tmp):
            tmp = aa
            num = a[i]

print(a[0], num)
# Judge status: Accepted
N = int(input())
A = sorted(list(map(int, input().split())))
# A = sorted(list(map(int, input().split())), reverse=True)


# print(A)

idx = []
for i in range(N + 1 // 2):
    idx.append(i)
    idx.append(i)

idx = idx[::-1]
idx = idx[1:N]
# print(idx)
ans = 0
for i in idx:
    ans += A[i]
print(ans)
# Judge status: Wrong Answer
from math import gcd
N,X=map(int,input().split())
x=list(map(int,input().split()))

if N==1:
  print(abs(X-x[0]))

else:
  l=[]
  for i in range(N-1):
    l_=abs(x[i+1]-x[i])
    l.append(l_)
  #print(l)
  ans=l[0]
  for i in range(1,len(l)):
    ans=gcd(ans,l[i])

  print(ans)
# Judge status: Wrong Answer
N = int(input())

A = list(map(int,input().split()))

sum = 0
for i in range(N):
    print(A.count(i+1))
    sum += A.count(i+1)
    if sum == (N-1):
        break
# Judge status: Accepted
from collections import Counter
n = int(input())
a = list(map(int,input().split()))
c = Counter(a)
d = [0,0]
for i in c:
    if c[i]>1:
        d.append(i)
    if c[i]>3:
        d.append(i)
d.sort()
print(d[-1]*d[-2])
# Judge status: Wrong Answer
r = input()
# print(r)
if len(str(int(r)+1)) == len(r)+1:
    print(len(r)*9)
if r[0] == 1:
    print((len(r)-1)*9)
else:
    print(int(r[0])-1+(len(r)-1)*9)
# Judge status: Wrong Answer
n = int(input())
l = sorted(list(map(int,input().split())))
print(sum(l[n:-n]))
# Judge status: Accepted
data = input()
name = ['pon','pon','hon', 'bon','hon','hon','pon','hon','pon','hon']
print(name[int(data[-1])])
# Judge status: Accepted
N, A, B = map(int, input().split())

if abs(A-B) % 2 == 0:
    print(abs(A-B)//2)

else:
    ans1 = min(A, B) + (max(A, B)-min(A, B)-1)//2
    ans2 = N-max(A, B)+1 + (N-min(A, B) - (N-max(A, B)) -1)//2
    print(min(ans1, ans2))
# Judge status: Accepted
a,b,t=map(int,input().split())
print(int((t//a)*b))