peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
from collections import  Counter

n = int(input())
A = [int(input()) for _ in range(n)]
cnt_A = Counter(A)

ans = 0
for v in cnt_A.values():
    if v % 2 == 1:
        ans += 1
print(ans)
# Judge status: Accepted
import bisect
N = int(input())
L = list(map(int, input().split()))
L.sort()
cnt = 0

for i in range(N):

  for j in range(i + 1, N):
    
    cnt += bisect.bisect_left(L, L[i] + L[j]) - (j + 1)

print(cnt)
# Judge status: Accepted
n,m=map(int,input().split())
r=[0]*m
l=[0]*m
for i in range(m):
   l[i],r[i]=map(int,input().split())
p=min(r)-max(l)+1
if p>0:
    print(p)
else:
    print(0)
# Judge status: Wrong Answer
n,m=map(int,input().split())
if n==1 or m==1:
  print(n*m-2)
  exit()
if n==2 or m==2:
  print(n*m)
  exit()
print((m-2)*(n-2))
# Judge status: Wrong Answer
N = int(input())
X = list(map(int, input().split()))

ans = 10000
P = 100
while P > 0:
    a = 0
    for x in X:
        a += (x - P) ** 2
    ans = min(ans, a)
    P -= 1
print(ans)
# Judge status: Wrong Answer
def dts():
	return list(map(int,input().split()))

d,t,s=dts()

if d<=t*s:
    print("yes")
else:
    print("No")
# Judge status: Accepted
k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    print(s[:k] + "...")
# Judge status: Accepted
N = int(input())
ans = 0
for i in range(1, N+1):
    temp = N // i
    ans += i * temp * (temp + 1) // 2
print(ans)
# Judge status: Accepted
n=int(input())
s=input()

ans=0
for i in range(n-1):
    l=[left for left in s[:i+1]]
    r=[right for right in s[i+1:]]
    st = set(l) & set(r)
    ans = max(len(st),ans)
print(ans)
# Judge status: Accepted
import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

n=int(input())
ans=0
ans=int(input())
if n==1:
    print(ans)
    exit()

for i in range(n-1):
    t=int(input())
    ans=lcm(ans,t)

print(ans)
# Judge status: Accepted
n=int(input())
v=list(map(int,input().split()))
v.sort()
res=v[0]/(2**(n-1))
for i in range(1,n):
	res += v[i]/(2**(n-i))
print(res)
# Judge status: Accepted
x=int(input())
if x>=2000:
    print(1)
else:
    if (x//100)*100<=x<=(x//100)*105:
        print(1)
    else:
        print(0)
# Judge status: Accepted
S = input()

temp = 'x' * len(S)

print(temp)
# Judge status: Wrong Answer
N = int(input())
a = list(map(int, input().split()))
a.sort(reverse = True)
ans = 0
if N ==1:
    print(a[1])
else:
    for n in range(N):
        ans += a[2*n-1]
    print(ans)
# Judge status: Accepted
# -*- coding: utf-8 -*-

N,M = list(map(int, input().rstrip().split()))
#-----
ans = []
delta = 0
visited = set()


for i in range(M):
    L = 1+i
    R = N-i
    diff = (R - delta) - L
    
    if (2*diff == N) or \
       (diff in visited) or ((N - diff) in visited):
       
        delta = 1
    
    ans.append( [L, R - delta] )
    visited |= {diff , (N - diff)}


for nums in ans:
    print(*nums)
# Judge status: Wrong Answer
n = int(input())
l = list(map(int,input().split()))
count = 0
for i in range(n-2):
  for j in range(i+1,n-1):
    for k in range(j+1,n):
      if l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i]:
        count+=1
print(count)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

sum_A = sum(A)

for i in range(N):
    if B[i] > A[i]:
        B[i] -= A[i]
        A[i] = 0
        A[i + 1] = max(0, A[i + 1] - B[i])
    else:
        A[i] = max(0, A[i] - B[i])

ans = sum_A - sum(A)
print(ans)
# Judge status: Accepted
from fractions import gcd
from functools import reduce

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

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

for i in x:
    y.append(abs(X-i))

#print(y)
print(gcd_list(y))
# Judge status: Accepted
a, b = map(int, input().split())
print((a+b)%24)
# Judge status: Accepted
import itertools

N = int(input())
Q = tuple(map(lambda x: int(x)-1,input().split()))
P = tuple(map(lambda x: int(x)-1,input().split()))

a = 0
for _ in itertools.permutations(range(N)):
    if not(_ > Q) and not(_ < Q):
        break
    a += 1

b = 0
for _ in itertools.permutations(range(N)):
    if not(_ > P) and not(_ < P):
        break
    b += 1

print(abs(a-b))
# Judge status: Accepted
N,M  = map(int, input().split())
# N : Sの数
# M : Cの数

if M <= 2*N: #Cの数が少ない
    print(M//2)
else:
    cnt = N
    M -= 2*N
    print(cnt+M//4)
# Judge status: Accepted
import numpy as np
def f(a, b, c, x, y):
    Min = np.inf
    for use_c in range(max(x, y) * 2 + 1):
        price = use_c * c + max(0, x - use_c // 2) * a + max(0, y - use_c // 2) * b
        if price < Min:
            Min = price
    print(Min)

a, b, c, x, y = map(int, input().split())
f(a, b, c, x, y)
# Judge status: Accepted
def main():
    s=input()
    t=input()
    ans=[]
    for i in range(len(s)-len(t)+1):
        for j in range(len(t)):
            if len(s) <= i+j or (s[i+j] != t[j] and s[i+j] != "?"):
                break
        else:
            ans.append((s[:i]+t+s[i+j+1:]).replace("?", "a"))
    ans.sort()
    print(ans[0] if len(ans) > 0 else "UNRESTORABLE")
    
if __name__ == "__main__":
    main()
# Judge status: Accepted
n, m = map(int, input().split())
k = []
for _ in range(n):
    a = list(map(int, input().split()))[1:]
    k.append(a)

ans = 0
for i in range(m):
    flag = True
    for j in range(n):
        if i+1 not in k[j]:
            flag = False
            break
    if flag:
        ans += 1

print(ans)
# Judge status: Wrong Answer
n = int(input())
s = list(map(int, input().split()))
mx, cnt = 0, 0
for i in s[::-1]:
    if i >= mx:
        mx = i
        cnt += 1
    else:
        pass
    if cnt >= 2:
        break

print("Yes") if cnt < 2 else print("No")
# Judge status: Accepted
N, M = map(int, input().split())

print(abs(N - 2) * abs(M - 2))
# Judge status: Accepted
S = input()
if 'A' in S and 'B' in S:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
S = input()
sorted_S = sorted(S)

if len(set(S)) == 2 and sorted_S[0] != sorted_S[2]:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n, m = map(int, input().split())

total = ((n + m) * (n + m -1)) / 2
odd = m * n
#print(n, m)
#print(total)
#print(odd)

print(int(total - odd))
# Judge status: Wrong Answer
a,b=map(int,input().split())
print(b**a if b>=a else a**b)
# Judge status: Wrong Answer
a,b,c,d = map(int, input().split())
if abs(a-b)<=d and abs(b-c)<=d: print('Yes')
else: print('No')
# Judge status: Accepted
n, x = map(int, input().split())
lst = [0] + sorted(list(map(int, input().split())))
for i in range(n):
  lst[i + 1] += lst[i]
for i in range(n):
  if lst[i] <= x < lst[i + 1]:
    print(i)
    exit()
if x == lst[n]:
  print(n)
else:
  print(n - 1)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
BC = [list(map(int, input().split())) for _ in range(Q)]

indexA = {}

for a in A:
  if a not in indexA:
    indexA[a] = 0
  indexA[a] += 1

sumA = sum(A)

for (b,c) in BC:
  if b in indexA:
    sumA += (c-b) * indexA[b]
    if c not in indexA:
      indexA[c] = 0
    indexA[c] += indexA[b]
    indexA[b] = 0
  print(sumA)
# Judge status: Wrong Answer
S,W = map(int,input().split())
if S/2 <= W:
  print('unsafe')
else:
  print('safe')
# Judge status: Wrong Answer
def main():
    k = int(input())
    hp = [i for i in range(k+4)]
    r, w = 1, 10
    while w < k:
        n = hp[r]
        r += 1
        nm = n % 10
        val = n * 10 + nm
        
        if nm != 0:
            hp[w] = val - 1
            w += 1
        hp[w] = val
        w += 1
        if nm != 9:
            hp[w] = val + 1
            w += 1

    print(hp[k])

main()
# Judge status: Accepted
n = int(input())
h = list(map(int, input().split()))

last=h[0]-1
for now in h[1:]:
    if last > now:
        print("No")
        exit()
    elif last == now: # don't
        last = now
    else: # do
        last = now-1
print("Yes")
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))
num_4 = 0
num_2 = 0
for a in A:
    if a%4 == 0:
        num_4 += 1
    elif a%2 == 0:
        num_2 += 1
    else:
        continue

flag = False
if num_4 >= n//2:
    flag = True
else:
    num = num_2 - num_2%2
    if num_4 >= (n - num)//2:
        flag = True

if flag:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
#!/usr/bin/env python3
# coding:utf-8

def main():
    stdIn = int(input())
    stdOut = solve(stdIn)
    print(stdOut)

"""
方針


"""

def solve(stdIn):
    if stdIn == 0:
        return 1
    return 0

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
n = input()

if n[0] == n[1] == n[2] == n[3]:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n = int(input())

prev = 2
now = 1
for i in range(1, n):
    temp = now
    now += prev
    prev = temp

print(now)
# Judge status: Accepted
N, K = map(int, input().split())
MOD = 10 ** 9 + 7

ans = 0
for i in range(K, N + 2):
    ans += (N + N - i + 3) * i // 2 - i * (i + 1) // 2 + 1
    ans %= MOD
print(ans)
# Judge status: Accepted
N, K = (int(x) for x in input().split())
ans=0
while(N>=1):
  N = int(N/K)
  ans+=1

print(ans)
# Judge status: Wrong Answer
N = 2
R = 2919
if N<=10:
  R = R + (100*(10-N))
# Judge status: Accepted
n = input()
a = int(n[-1])
b = 10 - int(n[-1])

for i in range(len(n)-2,-1,-1):
    a,b = min(a+int(n[i]), b + int(n[i]) + 1), min(a + 10-int(n[i]), b + 9 -int(n[i]))

print(min(a,b+1))
# Judge status: Wrong Answer
n = str(input())
cnt = 0
for i in n:
  if n == "9":
    cnt += 1
if cnt >= 1:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
s = input()

a, b, c = s.count('a'), s.count('b'), s.count('c')
cnt = max(abs(a - b), abs(b - c), abs(c - a))
print('YES' if cnt <= 1 else 'NO')
# Judge status: Wrong Answer
n,m = list(map(int,input().split()))
A = list(map(int,input().split()))
sum = sum(A)
MM = 4*m
A.sort(reverse=True)
for i in range(m):
    if A[i] < sum // MM:
        print('No')
        exit()
print('Yes')
# Judge status: Accepted
a = int(input())

def main():
    a_2 = a*a
    a_3 = a*a*a
    print(int(a+a_2+a_3))
main()
# Judge status: Accepted
n=int(input())
ans=":("

for i in range(1,n+1):
    if int(i*1.08)==n:
        ans=i
print(ans)
# Judge status: Accepted
n =int(input())
list=[]
for i in range(n):
    s = input()
    list.append(s)
print('AC x '+str(list.count('AC')))
print('WA x '+str(list.count('WA')))
print('TLE x '+str(list.count('TLE')))
print('RE x '+str(list.count('RE')))
# Judge status: Wrong Answer
n = int(input())
d = {}
for _ in range(n):
    s, p = input().split()
    if s not in d.keys():
        d[s] = [p]
    else:
        d[s].append(p)
c = 1
for i in sorted(d):
    for j in sorted(d[i], reverse=True):
        d[i][d[i].index(j)] = c
        c += 1
for k in d:
    for l in d[k]:
        print(l)
# Judge status: Accepted
N = int(input())
print(sum(range(N)))
# Judge status: Accepted
XN = [int(x) for x in input().split()]
p = [int(x) for x in input().split()]
tmp=100
tmp_i=0
for i in range(102):
  if not i in p:
    if abs(XN[0]-i)<tmp:
      tmp=abs(XN[0]-i)
      tmp_i=i
print(tmp_i)

"""
10 5
4 7 10 6 5
"""
# Judge status: Accepted
n, k, s = map(int, input().split())

if s < 10**9:
    ans = [s] * k + [s + 1] * (n - k)
else:
    ans = [s] * k + [1] * (n - k)

print(*ans)
# Judge status: Wrong Answer
n = int(input())
count = [0] * (10**6)
s = 0

for i in range(1, 10):
    for j in range(1, 10):
        for k in range(1, 10):
            s = i * i + j * j + k * k + i * j + j * k + k * i 
            count[s - 1] += 1
            # if s != 0:
            #     print(i,j,k)
for i in range(n):
    print(count[i])
# Judge status: Accepted
N = int(input())
arr = list(map(int, input().split()))
count = 0
gokei = 0
mi = float('inf')
flg = False
for i in arr:
    gokei += abs(i)
    mi = min(mi,abs(i))
    if i < 0:
        count += 1
    if i == 0:
        flg = True
if flg or count % 2 == 0:
    print(gokei)
else:
    print(gokei-mi*2)
# Judge status: Accepted
h=int(input())

def bupdp(l,h):
    dp=[0]*(h+1)
    dp[0] = 0
    for i in range(0,h):
        if i>1:
            dp[i] = min(dp[i-1]+abs(l[i]-l[i-1]),dp[i-2]+abs(l[i]-l[i-2]))
        if i==1:
            dp[i] = abs(l[i]-l[i-1])
        if i<1:
            dp[i] = 0   
    # print(dp)
    return dp[-2]

l = list(map(int,input().split()))
print(bupdp(l,h))
# Judge status: Accepted
S = input()
S = S.replace('><','>,<').split(',')

ans = 0

for s in S:
    small = s.count('<')
    big = s.count('>')
    tmp = max(small,big)\
        + (max(small,big)-1)*max(small,big)//2\
        + (min(small,big)-1)*min(small,big)//2
    ans += tmp
print(ans)
# Judge status: Accepted
K, X = map(int, input().split())
left = X-K+1
right = X+K
for i in range(left, right):
  print(i, end=" ")
# Judge status: Wrong Answer
def main():
    n, m = map(int, input().split())
    a = [int(x) for x in input().split()]

    threshold = sum(a) / (4 * m)
    if sum(1 for i in a if i >= threshold):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()
# Judge status: Accepted
s = int(input())
y2 = -(-s//10**9)
y1 = 10**9*y2-s
print(0,0,10**9,y1,1,y2)
# Judge status: Accepted
n = int(input())
s = input()
for i in s:
    print(chr((ord(i)-ord('A')+n)%26+ord('A')),end="")
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
a.sort()
num1=a[-1]
num2=a[-1]/2
num3=a[-1]
ans=-1
for i in range(n-1):
    if abs(a[i]-num2)<num3:
        ans=a[i]
        num3=abs(a[i]-num2)
print(num1,ans)
# Judge status: Accepted
n=int(input())
s=input()
w=s.count(".")
b=0
ans=10**9
for i in range(n):
    if w+b<ans: ans=w+b
    if s[i]==".": w-=1
    else: b+=1
if w+b<ans: ans=w+b
print(ans)
# Judge status: Wrong Answer
a,b,c=map(int, input().split())
if b-a == c-b:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N,C,K = [int(hoge) for hoge in input().split()]
ans = 0
time = -float("inf")
bus = 0
Ts = sorted([int(input()) for i in range(N)])
for T in Ts:
    if (T > time + K) or bus==C:
        ans += 1
        time = T
        bus = 1
    else:
        bus += 1
print(ans)
# Judge status: Accepted
n,a,b=map(int,input().split())
s=input()
all=a+b
inter=b
for i in range(n):
  if all==0:
    print('No')
  elif s[i]=='a':
    print('Yes')
    all-=1
  elif s[i]=='b' and inter>0:
    print('Yes')
    all-=1
    inter-=1
  else:
    print('No')
# Judge status: Accepted
n=int(input())

A=list(map(int,input().split()))
B=list(map(int,input().split()))
s=0
for i in range(n):
    if A[i]>B[i]:
        s+=B[i]
    
    elif A[i]<=B[i] and B[i]<=A[i+1]+A[i]:
        s+=B[i]
        A[i+1]=A[i+1]+A[i]-B[i]
    elif B[i]>A[i+1]+A[i]:
        s+=A[i]+A[i+1]
        A[i+1]=0
print(s)
# Judge status: Wrong Answer
def kuku(a,b):
    if a<=9 and b<=9:
        return a*b
    return -1
# Judge status: Accepted
n,k=map(int,input().split())
count=0
ba=[0]*(10**5+1)
for i in range(n):
    a,b=map(int,input().split())
    ba[a]+=b
 
for i in range(len(ba)):
    k-=ba[i]
    if k<=0:
        print(i)
        break
# Judge status: Wrong Answer
N = int(input())

C0 = 0
C1 = 0
C2 = 0
C3 = 0

for i in range(0,N):
  S = str(input())
  if S == 'AC':
    C0 += 1
  elif S == 'WA':
    C1 += 1
  elif S == 'TLE':
    C2 += 1
  elif S == 'RE':
    C3 += 1
    
print('AC ×',C0)
print('WA ×',C1)
print('TLE ×',C2)
print('RE ×',C3)
# Judge status: Wrong Answer
def main():
  n = int(input())
  a = list(map(int,input().split()))
  q = int(input())
  for _ in range(q):
    b, c = map(int, input().split())
    sum=0
    for i in range(0,n):
      if(a[i]==b):
        a[i]=c
        sum+=a[i]
    print(sum)
main()
# Judge status: Accepted
def dfs(i,s,sum):
  if i == 3:
    if sum == 7:
      print(s+"=7")
      exit()

  else:
    dfs(i+1, s + "+" + S[i+1], sum + int(S[i+1]))
    dfs(i+1, s + "-" + S[i+1], sum - int(S[i+1]))

S = str(input())
dfs(0,S[0],int(S[0]))
# Judge status: Accepted
x = int(input())

if x == 1:
  print(0)
 
else:
  print(1)
# Judge status: Wrong Answer
w,a,b = map(int,input().split())
c = b - a
if c - w >= 0:
    print(c - w)
else:
    print(0)
# Judge status: Accepted
import math
n, m = map(int, input().split())
div = 10**9 + 7

if abs(n-m)>1:
    print(0)
    exit()
elif n == m:
    ans1 = math.factorial(n)
    ans2 = math.factorial(m)
    ans = 2 * ans1 * ans2 
else:
    ans1 = math.factorial(n)
    ans2 = math.factorial(m)
    ans = ans2*ans1

print(ans % div)
# Judge status: Accepted
def main():
    N = int(input())
    a = [int(input()) for _ in range(N)]

    tmp = 0

    for i in range(N):
        if a[tmp] == 2:
            print(i+1)
            exit()
        else:
            tmp = a[tmp]-1

    print(-1)


if __name__ == "__main__":
    main()
# Judge status: Accepted
from collections import Counter
S = input()
d = Counter(S)

na = 0 if "a" not in d.keys() else d["a"]
nb = 0 if "b" not in d.keys() else d["b"]
nc = 0 if "c" not in d.keys() else d["c"]

if abs(na - nb) <= 1 and abs(nc - na) <= 1 and abs(nb - nc) <= 1:
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
ans = 0
for i in range(n):
    if b[i] <= a[i]:
        ans += b[i]
    elif b[i] < a[i] + a[i+1]:
        a[i+1] = a[i] - b[i]
        ans += b[i]
    else:
        ans += a[i] + a[i+1]
        a[i+1] = 0
print(ans)
# Judge status: Accepted
import collections
N = int(input())
A = collections.Counter([int(input()) for _ in range(N)])
A = A.values()
ans = [x for x in A if x&1]
print(len(ans))
# Judge status: Accepted
N = int(input())
D = {}
for _ in range(N):
  s = input()
  if s in D:
    D[s] += 1
  else:
    D[s] = 1
m = max(D.values())
for k, v in sorted(D.items()):
  if v==m:
    print(k)
# Judge status: Accepted
A = []
for i in range(5):
    A.append(int(input()))
K = int(input())

print(':(' if A[4]-A[0] > K else 'Yay!')
# Judge status: Accepted
a = input().split()
print(a[0][0] + a[1][0] + a[2][0])
# Judge status: Accepted
N = int(input())
D = [list(map(int, input().split())) for _ in range(N)]

for i, j, k in zip(range(N), range(1, N), range(2, N)):
    if D[i][0] == D[i][1] and D[j][0] == D[j][1] and D[k][0] == D[k][1]:
        print('Yes')
        exit()
print('No')
# Judge status: Accepted
import bisect


def main():
    INF = 10 ** 10
    N = int(input())
    A = [int(input()) for _ in range(N)]
    A.reverse()
    B = [INF for _ in range(N)]
    for a in A:
        index = bisect.bisect_right(B, a)
        B[index] = a
    ans = 0
    for b in B:
        if b == INF:
            break
        ans += 1
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
t = list(input())
n = len(t)

for i in range(n):
    if(t[i] == "?" ):
        if(t[i-1] == "P"):
            t[i] = "D"
        elif(t[i-1] == "D"):
            t[i] = "D"
t1 = "".join(t)
print(t1)
# Judge status: Wrong Answer
# d
import numpy as np
n, k = [int(i) for i in input().split()]
r, s, p = [int(i) for i in input().split()]
t = np.array(list(input()))
t = np.where(t == 'r', p, t)
t = np.where(t == 's', r, t)
t = np.where(t == 'p', s, t)
t = t.astype(dtype='int64')
tt = t
point = 0
point += np.sum(t[:k])

for i in range(k+1,n):
    if t[i] == t[i-k]:
        pass
    elif t[i] != t[i-k]:
        point += t[i]

print(point)
# Judge status: Accepted
n = int(input())
ls = [int(input()) for _ in range(n)]

ls.sort()

ans = sum(ls)

if ans % 10 != 0:
	print(ans)
else:
	for i in range(n):
		if ls[i] % 10 != 0:
			print(ans - ls[i])
			break
		elif i == n - 1:
			print(0)
# Judge status: Accepted
s = input()
n = len(s)
print(len([i for i in range(n // 2) if s[i] != s[n - 1 - i]]))
# Judge status: Accepted
n = int(input())
X = tuple(map(int, input().split()))
Xs = sorted(X)

ml = Xs[n//2-1]
mr = Xs[n//2]

for i in range(n):
    if X[i] <= ml:
        print(mr)
    else:
        print(ml)
# Judge status: Wrong Answer
a,b,c = map(int, input().split())
k = int(input())
if max(a,b,c)==a: print(a*2*k+b+c)
elif max(a,b,c)==b: print(b*2*k+a+c)
else: print(c*2*k+b+a)
# Judge status: Accepted
n,m = map(int, input().split())
a_list = list(map(int, input().split()))
cost_days = sum(a_list)

play_days = n - cost_days
if play_days < 0:
    print(-1)
else:
    print(play_days)
# Judge status: Accepted
n=int(input())
l=map(int,input().split())
x,y,z=0,0,0
for a in l:
    if a%4==0:
        z+=1
    elif a%2==0:
        y+=1
    else:
        x+=1
if y>0:
    x+=1
print('Yes'if x<=z+1 else'No')
# Judge status: Accepted
n = int(input())
d = list(map(int, input().split()))

d.sort()

print(d[n//2]-d[n//2-1])
# Judge status: Accepted
n, a, b, c, d = map(int, input().split())
s = input()
for i in range(a, max(c, d)):
  if s[i-1: i+1] == "##":
    print("No")
    exit()

if c < d:
  print("Yes")
  exit()
for i in range(b-1, d):
  if s[i-1:i+2] == "...":
    print("Yes")
    exit()
print("No")
# Judge status: Accepted
n = int(input())
l = list(sorted(map(int, input().split())))
x = 0
for k in range(n - 2):
    for j in range(k + 1):
        for i in range(j + 1):
            if l[i] < l[j + 1] < l[k + 2] and l[i] + l[j + 1] > l[k + 2]:
                x += 1
print(x)
# Judge status: Wrong Answer
x, y, z = map(int, input().split())
print("z", "x", "y")
# Judge status: Accepted
import fractions
a,b,c,d=map(int,input().split())
count=0
def cc(a,b,c):
    if a%c==0:
        k=a
    else:
        k=a+c-(a%c)
    return ((b//c)-(k//c)+1)
print(b-a+1-cc(a,b,c)-cc(a,b,d)+cc(a,b,(c*d)//fractions.gcd(c,d)))
# Judge status: Accepted
s = set(input())
if {"N","S"} == s or {"W","E"} == s or {"N","S","W","E"} == s:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N = int(input())
AB = [list(map(int,input().split())) for _ in range(N)]
 
A = []
B = []
for i in range(N):
  A.append(AB[i][0])
  B.append(AB[i][1])
A.sort()
B.sort()
if N % 2 == 0:
    n = N // 2
    med1 = A[n-1] + A[n]
    med2 = B[n-1] + B[n]
    x = med2 - med1 + 1
else:
    n = N // 2
    med1 = A[n]
    med2 = B[n]
    x = med2 - med1 + 1
    
print(x)
# Judge status: Accepted
D,N=map(int, input().split())
print((N+int(N/100))*100**D)
# Judge status: Wrong Answer
import  math
x=math.pi
r=int(input())

print(int((r*r*x)/x))
# Judge status: Accepted
N=int(input())
S=list(int(input()) for _  in range(N))
S=sorted(S)
ans=0
if sum(S)%10!=0:
  ans=sum(S)
else:
    for i in range(N):
      if (sum(S)-S[i])%10!=0:
        ans=sum(S)-S[i]
        break
    
print(ans)
# Judge status: Accepted
a, b, c = map(int, input().split())
print(max(a * 10 + b + c, a + b * 10 + c, a + c * 10 + b))
# Judge status: Accepted
N=input()
if ("9" in N):
    print ("Yes")
else:
    print ("No")
# Judge status: Wrong Answer
N, L =map(int, input().split())
cost = 1000
count = 0
for i in range(N):
  c, t =map(int, input().split())
  if t <= L:
    if c < cost:
      cost = c
      count += 1
  elif t > L:
    continue;
if count == 0:
  print("TLE")
else:
  print(cost)
# Judge status: Accepted
a,b=map(int, input().split())

if a*b%2==0:
    print("Even")
else:
    print("Odd")
# Judge status: Wrong Answer
N = int(input())
A = [list(map(int, input().split())) for _ in range(2)]
result = A[0][0] + A[1][N - 1]
s0 = sum(A[0][1:])
s1 = sum(A[1][:-1])
for j in range(1, N):
    if s0 <= s1:
        result += s1
        break
    result += A[0][j]
    s0 -= A[0][j]
    s1 -= A[1][j - 1]
print(result)
# Judge status: Wrong Answer
n = int(input())
print((n/3)*3)
# Judge status: Accepted
s = input()
if s == "hi" or s == "hihi" or s == "hihihi" or s == "hihihihi" or s == "hihihihihi" :
    print("Yes")
else:
    print("No")
# Judge status: Accepted
coordinate_lst = []
for _ in range(5):
    coordinate_lst.append(int(input()))
k = int(input())

coordinate_lst.sort()
max_distance = coordinate_lst[-1] - coordinate_lst[0]

if max_distance <= k:
    print('Yay!')
else:
    print(':(')
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

sum1 = sum(B)

cn = 0
SUM = 0

for i in range(N-1):
    if A[i] + 1 == A[i+1]:
        SUM = SUM + C[A[i]-1]
        




print(sum1 + SUM)