peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
D = int(input())
if D==25: print("Christmas")
if D==24: print("Christmas Eve")
if D==23: print("Christmas Eve Eve")
if D==22: print("Christmas Eve Eve Eve")
# Judge status: Accepted
N=int(input())
L=[]
for i in range(N):
    a,b=map(int,input().split())
    L.append([a+b,a-b])
L.sort()
#print(L)
ans=0
X=-10**9
for i in range(N):
    if L[i][1]>=X:
        ans+=1
        X=L[i][0]
print(ans)
# Judge status: Accepted
import math

n = int(input())
town = [list(map(int, input().split())) for _ in range(n)]

dist = 0
from itertools import permutations
for p in permutations(town):
    for i in range(n-1):
         dist += math.sqrt((p[i][0] - p[i+1][0]) **2 + (p[i][1] - p[i+1][1]) **2)
ans = dist / math.factorial(n)
print(ans)
"""
dist = 0
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        dist += math.sqrt((town[i][0] - town[j][0]) **2 + (town[i][1] - town[j][1]) **2)
ans = dist / n
print(ans)
"""
# Judge status: Accepted
n = int(input())
s = input()

ans=0
for i in range(1, n):
    ans = max(ans, len(set(s[:i]) & set(s[i:])))
print(ans)
# Judge status: Accepted
n,y=map(int,input().split())

for i in range(n+1):
  for j in range(n+1-i):
    k=n-i-j
    if 10000*i+5000*j+1000*k==y:
      print(i,j,k)
      exit()
print(-1,-1,-1)
# Judge status: Accepted
S = int(input())

mod = 10**9 + 7
dp = [0, 0, 0, 1]
for i in range(4, S+1):
    dp.append((dp[-1]+dp[-3])%mod)
print(dp[S])
# Judge status: Wrong Answer
n_people,bus_capacity,can_wait = map(int,input().split())
n_waiting = 0
bus_count = 0
arriving_time_ls = [0] * n_people
for i in range(n_people):
    arriving_time_ls[i] = int(input())
arriving_time_ls.sort()

waiting_last = 0
for i in range(1,n_people):
    if arriving_time_ls[i] - arriving_time_ls[waiting_last] >= can_wait:
        bus_count += 1
        waiting_last = i
    elif i - waiting_last + 1 > bus_capacity:
        bus_count += 1
        waiting_last = i
if waiting_last <= n_people - 1:
    bus_count += 1
print(bus_count)
# Judge status: Wrong Answer
A,B,N=map(int,input().split())

def fl_m(a,b,n):
  if n>=(a-1)*b/a:
    z=a-1
  else:
    k=int(n*a/b)
    z=k
  return(z)
    
print(fl_m(A,B,N))
# Judge status: Wrong Answer
a,b,k=map(int,input().split())

l=[]
cnt=0
i=0
while cnt < k:
    i = i+1
    if a%i == 0 and b%i == 0:
        cnt+=1
        l.append(i)
    else:
        continue

print(l[cnt-1])
# Judge status: Wrong Answer
S=[]
N=int(input())
A=list(map(int,input().split()))
C=[0]*(N);x=10**9;p=0
S.append(A[0])
for i in range(1,N):
  S.append(S[i-1]+A[i])
#print(S)
C[0]=abs(A[0]-(S[-1]-S[0]))
for i in range(1,N):
  if N-i==1:
    break
  else:
    C[i]=abs(C[i-1]+A[i]-(S[-1]-S[i]))
    if x>C[i]:
      x=C[i]
      p=i
print(abs(C[p-1]+A[p]-(S[-1]-S[p])))
# Judge status: Accepted
K = int(input())
A, B = map(int, input().split())

if A % K == 0 or B % K == 0:
    print('OK')
elif ((B // K) - (A // K)) >=1:
    print('OK')
else:
    print('NG')
# Judge status: Accepted
n,d = map(int, input().split())
X = [list(map(int, input().split())) for _ in range(n)]

l = len(X)
cnt = 0

for i in range(l):
    for j in range(i+1, l):
        distance = sum((X[i][d]-X[j][d])**2 for d in range(d))**0.5
        if distance == int(distance):
            cnt += 1
        else:
            continue
            
print(cnt)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

A.sort()

n = A[-1]
r1 = n / 2
temp = 10 ** 9
r = 0

for i, x in enumerate(A):
  if abs(r1 - x) <= temp and i != N-1:
    r = x
    temp = abs(r1 - x)

print(str(n)+" "+str(r))
# Judge status: Accepted
n = int(input())
s = list(str(input()))
t = list(str(input()))
ans = 0

for i in range(n+1):
    if s[len(s) - i:] == t[:i]:
        ans = i


print(n*2 - ans)
# Judge status: Accepted
n = int(input())

ans = 0
for i in range(1, n+1, 2):
    cnt = 0
    for j in range(1, i+1):
        if i%j == 0:
            cnt += 1

    if cnt == 8:
        ans += 1

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

max_bubun_length=0
tmp_bubun_length = 0
for i in range(len(S)):
    # print(S[i])
    # print(tmp_bubun_length)
    # print(max_bubun_length)
    if S[i] in "ACGT":
        tmp_bubun_length += 1
    else:
        if tmp_bubun_length > max_bubun_length:
            max_bubun_length = tmp_bubun_length
            # print(S[(i-tmp_bubun_length):i])
        tmp_bubun_length = 0
if tmp_bubun_length > max_bubun_length:
    max_bubun_length = tmp_bubun_length
print(max_bubun_length)
# Judge status: Accepted
n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n-k):
    if a[i]<a[i+k]:
        print('Yes')
    else:
        print('No')
# Judge status: Accepted
from fractions import gcd
import numpy as np
n=int(input())
data=list(map(int,input().split()))
left=np.zeros(n+1,dtype=np.int)
right=np.zeros(n+1,dtype=np.int)
kotae=1
for i in range(n):
    left[i+1]=gcd(left[i],data[i])
    right[n-i-1]=gcd(right[n-i],data[n-i-1])
for j in range(n):
    num=gcd(left[j],right[j+1])
    kotae=max(num,kotae)
print(kotae)
# Judge status: Wrong Answer
N = int(input())
W = list(map(int,input().split()))
print(W)
ans = 10 ** 9
for i in range(1,N):
  ans = min(ans, abs(sum(W[:i]) - sum(W[i:])))
print(ans)
# Judge status: Wrong Answer
K,X=input().split()
K=int(K)
X=int(X)
if K*500>X:
  print("yes")
else:
  print("no")
# Judge status: Wrong Answer
a,b,c = map(int,input().split())
if a + b >= c:
    print("YES")
else:
    print("No")
# Judge status: Wrong Answer
w, h, x, y = list(map(int, input().split()))
res = 0
s = w * h / 2
if x == w // 2 and y == h // 2:
    res = 1
print("%s %s" % (s, res))
# Judge status: Accepted
n,d = map(int, input().split())
k = n%(2*d + 1)
if k == 0:
  print(n//(2*d+1))
else:
  print(n//(2*d+1) + 1)
# Judge status: Wrong Answer
from collections import Counter
N = int(input())
S = input()
S_c = Counter(S)
ans = 1
mod = 10 ** 9 + 1
for val in S_c.values():
    ans *= (val + 1)
    ans %= mod

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

mod = a % b
for i in range(1000000):
    if mod == c:
        print('YES')
        exit()
    mod = (mod + a) % b
print('NO')
# Judge status: Accepted
icase=100
if icase==100:    
    d,n=map(int,input().split())
    if n<100:
        print(n*100**d)
    else:
        print((n+1)*100**d)
# Judge status: Accepted
s = input()
print(min(s.count('0'),s.count('1'))*2)
# Judge status: Accepted
# ???
n,a,b,c,d=map(int,input().split())
s=input()
ans="Yes"

if c<d:
    btod=s[b:d]
    atoc=s[a:c]
    if btod.count("##")>0:ans="No"
    if atoc.count("##")>0:ans="No"
else:
    btod=s[b-1-1:d+1]
    atoc=s[a:c]
    if atoc.count("##")>0:ans="No"
    else:
        if btod.count("...")==0:ans="No"
    
print(ans)
# Judge status: Accepted
import math

h = int(input())
w = int(input())
n = int(input())
ans = 0
if h < w:
    ans = math.ceil(n/w)
else:
    ans = math.ceil(n/h)

print(ans)
# Judge status: Accepted
N=int(input())
A=input().split()
list=[]
for i in range(0,N):
  list.append(0)
for i in range(0,N):
  list[int(A[i])-1]=i+1
for i in range(0,N):
  print(list[i])
# Judge status: Accepted
x, y = map(int,input().split())
print(x+(y//2))
# Judge status: Accepted
N = int(input())
a = list(map(int,input().split()))

p = 0
cnt = 1

for i in range(N-1):
    if a[i] == a[i+1]:
        continue
    elif p == 0 and a[i] > a[i+1]:
        p = 1
    elif p == 0 and a[i] < a[i+1]:
        p = -1
    elif p == 1 and a[i] < a[i+1]:
        cnt += 1
        p = 0
    elif p == -1 and a[i] >a[i+1]:
        cnt += 1
        p = 0

print(cnt)
# Judge status: Accepted
N,K=map(int,input().split())
Array={}
for n in range(0,N):
    a,b=map(int,input().split())
    if a in Array:
        Array[a]+=b
    else:
        Array[a]=b
numbers=sorted(list(Array.keys()))
n=0
k=0
while True:
    k+=Array[numbers[n]]
    if k>=K:
        break
    n+=1
print(numbers[n])
# Judge status: Wrong Answer

import itertools


def main():
    N = int(input())
    *PArry, = list(map(int, input().split()))
    *QArry, = list(map(int, input().split()))

    a = 0
    b = 0
    comb = [i for i in range(1, N+1)]
    for i, iter in enumerate(itertools.permutations(comb)):
        listIter = list(iter)
        if PArry == listIter:
            a = i+1
        if QArry == listIter:
            a = i+1

    print(abs(a-b))


if __name__ == '__main__':
    main()
# Judge status: Accepted
#B
from collections import deque
s = deque(list(input()))
cnt = 0
while 1 < len(s):
    r = s.pop()
    l = s.popleft()
    if r != l:
        cnt += 1
print(cnt)
# Judge status: Accepted
N, M = map(int, input().split())
se = set(range(1,M+1))
for _ in range(N):
  k, *A = map(int, input().split())
  se &= set(A)
  
print(len(se))
# Judge status: Accepted

s = [input() for i in range(2)]

n = int(s[0])
x = [int(s) for s in s[1].split()]

mina = 0
a = max(x)
b = min(x)
for i in range(b,a+1):
    tem = 0
    for j in range(n):
        tem += (x[j]-i)*(x[j]-i)
    if(i==b or tem<mina):
        mina = tem
print(mina)
# Judge status: Accepted
import sys
n = int(input())
a = sorted(list(map(lambda x: int(x),input().split())))
for i in range(n - 1):
    if a[i] == a[i+1] :
        print('NO')
        sys.exit()
print('YES')
# Judge status: Accepted
from collections import Counter

n = int(input())
a = list()
ans = 0
while n % 2 == 0:
    a.append(2)
    n //= 2
f = 3
while f * f <= n:
    if n % f == 0:
        a.append(f)
        n //= f
    else:
        f += 2
if n != 1:
    a.append(n)
m = list(Counter(a).values())
for i in range(len(m)):
    j, k = 1, 1
    while m[i] >= j:
        k += 1
        j += k
        ans += 1
print(ans)
# Judge status: Accepted
import bisect

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

l.sort()
ans=0

for i in range(n-2):
  for j in range(i+1,n-1):
    a=l[i]+l[j]
    b=l[j]-l[i]
    
    x=bisect.bisect_right(l,b)
    y=bisect.bisect_left(l,a)-1
    X=max(j+1,x)
    if y-X+1>0:
      ans+=y-X+1
      
print(ans)
# Judge status: Wrong Answer
# coding: utf-8
# Your code here!
Q,H,S,D=map(int,input().split())
N=int(input())
temp=min(4*Q,2*H,S,D/2)

if temp!=D/2:
    print(N*temp)
else:
    if N%2==1:
        print(((N-1)*temp+min(4*Q,2*H,S)))
    else:
        print((N*temp))
# Judge status: Wrong Answer
#abc170
n = int(input())
ln = list(map(int, input().split()))
ln = list(set(ln))
#print(ln)
counter = []
for i in range(len(ln)):
    
    for j in range(i +1, len(ln)):
        if ln[j] % ln[i] == 0:
            counter.append(j)
            #print(i,j)
            
print(len(set(counter)))
# Judge status: Accepted
N = int(input())
flag = 0
for i in range(26):
    for j in range(16):
        if i * 4 + j * 7 == N:
            flag = 1
ans = 'Yes' if flag else 'No'
print(ans)
# Judge status: Wrong Answer
#template
def inputlist(): return [int(j) for j in input().split()]
#template
#issueから始める
N,P = inputlist()
A = inputlist()
for i in range(N):
    A[i] = A[i] % 2
from collections import Counter
c = Counter(A)
n0 = c[0]
n1 = c[1]
import math
def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
ans = 0
for i in range(1,n1+1):
    if i % 2 == 0:
        continue
    ans += comb(n1,i)
if P == 1:
    print((2**n0)*ans)
if P == 0:
    d = 2**N - ((2**n0)*ans)
    print(ans)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
ans = sum(a)
tot = ans

# say we pick some prefix of the bars
# what's the min cost to make that prefix the halfway point?
# never contract, always expand?
pref = 0
for x in a:
    pref += x
    rem = tot - pref
    ans = min(ans, abs(rem - pref))

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

Ssum = 0
for i in range(1, n+1):
    tmp = i
    sum = 0
    while i>0 :
        sum = i%10
        i //= 10
    if a<=sum and sum<=b:
        Ssum += tmp

print(Ssum)
# Judge status: Accepted
s=input()
print(sum(s[i]!=s[-i-1] for i in range(len(s)//2)))
# Judge status: Accepted
import sys
import math
input = lambda: sys.stdin.readline().rstrip()
n, k = map(int, input().split())

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

print(math.ceil((n-1)/(k-1)))
# Judge status: Accepted
a,b,c=map(int,input().split())
l=sorted([int(input()) for i in range(a)])
ans=0
now=l[0]
cur=1
for i in range(1,a):
  x=l[i]
  if cur==b:
    now=x
    cur=1
    ans+=1
  elif x-now>c:
    now=x
    ans+=1
    cur=1
  else:
    cur+=1
print(ans+1)
# Judge status: Accepted
n,m=map(int,input().split())
a=[1]*n
b=[0]*n
b[0]=1
for _ in range(m):
    x,y=map(lambda x:int(x)-1,input().split())
    a[x] -= 1
    a[y] += 1
    if b[x]:
        if a[x] == 0:
            b[x]=0
        b[y]=1 
print(sum(b))
# Judge status: Accepted
N, K = map(int, input().split())
A = []
for i in range(1, N+1):
    tmp = i
    cnt = 0
    while tmp<K:
        tmp *= 2
        cnt += 1
    A.append(cnt)
pro = []
for i in A:
    pro.append(1/N*(1/2)**i)
print(sum(pro))
# Judge status: Wrong Answer
X, Y = map(int, input().split())
a = (2*Y-X)/3
b = (2*X-Y)/3

def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

if a.is_integer() and b.is_integer():
    a = int(a)
    b = int(b)
    print(combination(a+b, a))
else:
    print(0)
# Judge status: Accepted
X,Y,Z=map(int,input().split())
print((X-Z)//((Y+Z)))
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))

s = [0]*(n+10)
for a in A:
    s[a-1] += 1

for i in range(n):
    print(s[i])
# Judge status: Accepted
s = input()

for i in range(len(s) // 2):
    if s[0:i] == s[i:i * 2]:
        ans = i * 2

print(ans)
# Judge status: Wrong Answer
lst = [input() for i in range(2)]

n = int(lst[0])
s = lst[1]

if n % 2 == 1:
    print('No')

t = ''

for i in range(0, n//2):
    t += s[i]

if t + t == s:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
N,M = map(int, input().split())
A = sorted(list (map(int, input() .split() ) ) )

if A[N-M] >= sum(A)/M/4 :
	print( 'Yes' )

else :
	print( 'No' )
# Judge status: Accepted
N = int(input())

s=0
for i in range(1,N+1):
    n = int(N/i)
    s += n*(i+i*n)/2
print(int(s))
# Judge status: Wrong Answer
s=input()
f=int(s[:2])
b=int(s[2:4])

if f>=1 and f<=12:
    if b>=1 and b<=12:
        print('AMBIGUOUS')
    else:
        print('MMYY')

else:
    if b>=1 and b<=12:
        print('YYMM')
    else:
        print('NA')
# Judge status: Wrong Answer
n=int(input())
h= list(map(int,input().split()))
n=len(h)
res=[0]*n
for i in range(n-1):
  j=i+1
  while j<=n-1:
    if h[i]>=h[j]:
      res[i]+=1
      j+=1
    else:
      break
print(max(res))
# Judge status: Wrong Answer
import math
from decimal import Decimal
X = int(input())
now = 100
year = 0

while True:
    if now >= X:
        break
    #now = int(now * Decimal("1.01"))
    #now = int(now * round(Decimal(1.01), 2))
    now += now / 100

    year += 1

print(year)
# Judge status: Accepted
l = int(input())
p = l/3
p = p**3
print(p)
# Judge status: Accepted
n=int(input())
p=list(map(int, input().split()))
i=0
ans=1
flag=0
k=1e18
while(n>i):
	if(p[i]==0):
		flag=1
	i+=1
if(flag==1):
	print(0)
else:
	flag=0
	i=0			
	while(n>i):
		ans*=p[i]
		if(ans>k):
			flag=1
			break
		i+=1		
	if( flag==1):
		print(-1)
	else:
		print(ans)
# Judge status: Wrong Answer
import math


def main():

    v = list(map(int, input().split()))
    n = v[0]
    a = v[1]
    b = v[2]

    answer = 0
    if n < a+b:
        answer = a
    elif a == 0 and b == 0:
        answer = 0
    else:
        answer += math.floor(n / (a+b)) * a
        rest = n % (a+b)
        if rest <= a:
            answer += rest
        else:
            answer += a
    print(answer)


if __name__ == "__main__":
    main()
# Judge status: Accepted
#145_D
x,y=map(int,input().split())
mod=10**9+7
if (x+y)%3!=0:
    print(0)
else:
    n=(2*x-y)//3
    m=(2*y-x)//3
    if n<0 or m<0:
        print(0)
    else:
        f=[1 for i in range(m+n+1)]
        for i in range(2,m+n+1):
            f[i]=f[i-1]*i%mod
        print(f[m+n]*pow(f[n],mod-2,mod)*pow(f[m],mod-2,mod)%mod)
# Judge status: Wrong Answer
a,b,c = map(int,input().split())

print("{} {} {}".format(c,b,a))
# Judge status: Accepted
a, b, c, k = map(int, input().split())
if a>=k:
  print(k)
elif a+b>=k>a:
  print(a)
elif k>a+b:
  print(a-(k-a-b))
# Judge status: Wrong Answer
w, h, x, y = list(map(int, input().split(" ")))

s = w*h/2

flag = 0

if w == h:
    flag = 1
    
print(s, flag)
# Judge status: Wrong Answer
import collections

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

A = collections.Counter(A).most_common()
N = len(A)

ans = [0]

for i in range(N):
    if A[i][1] >= 4:
        ans.append(A[i][0]**2)

ref = []
for j in range(N):
    if A[i][1] >= 2:
        ref.append(A[i][0])

if len(ref) >= 2:
    ans.append(ref[0]*ref[1])

print(max(ans))
# Judge status: Accepted
import math
a,b,c = map(int,input().split())
if a+b >= c:
    print("No")
    exit()
print("Yes" if (c-a-b)**2 > 4*a*b else "No")
# Judge status: Wrong Answer
n, m = map(int, input().split())
d = dict()
for i in range(m):
    s, c = map(int, input().split())
    if s==1 and c==0:
        print("-1")
        exit()
    if s in d.keys():
        print("-1")
        exit()
    d[s] = c
target = 0
all = set(range(1,n+1))
kouho = set(d.keys())
dif = all - kouho
for s, c in d.items():
    target += 10**(n-s)*c
if n in dif:
    print(100+target)
else:
    print(target)
# Judge status: Accepted
import math

x = int(input())
n = 0
m = 100
while m < x:
    n += 1
    m = math.floor(m * 1.01)
print(n)
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-

N = int(input())
A = list(map(int, input().split()))
count=0

for i in range(N):
    for j in range(N-i-A[i]):
        k=i+j+A[i]
        if A[i]+A[k]==abs(i-k):
            count = count+1
            print("{} {}".format(i+1,k+1))



print("{}".format(count))
# Judge status: Accepted
a,b,k = map(int, input().split())
if k*2+a-1<=b:
    for i in range(a,a+k):
        print(i)
    for i in range(b-k+1,b+1):
        print(i)
else:
    for i in range(a,b+1):
        print(i)
# Judge status: Accepted
from collections import defaultdict

N,X,Y=map(int,input().split())

d=defaultdict(int)


for i in range(1,N):
    for j in range(i+1,N+1):
        d[min(abs(j-i),abs(X-i)+1+abs(j-Y),abs(Y-i)+1+abs(j-X))]+=1

for i in range(1,N):
    print(d[i])
# Judge status: Wrong Answer
n = int(input())
print(n*800-(n//15)*-200)
# Judge status: Wrong Answer
N,K = (int(X) for X in input().split())
A  = [int(X) for X in input().split()]
Left  = A.index(1)
Right = (N-1)-Left
Count = (Right%(K-1)!=0)+Right//2
Left  -= min(0,Right%(K-1))
Count += (Left%(K-1)!=0)+Left//2
print(Count)
# Judge status: Wrong Answer
import bisect
N, K = map(int, input().split())
x = list(map(int, input().split()))
id = bisect.bisect_left(x, 0)
ans = 10**10
if id >= K:
    ans = min(ans, x[id-K])
if id + K - 1 < N:
    ans = min(ans, x[id+K-1])

for i in range(max(0, id - K + 1), id):
    if i+K-1 < N:
        ans = min(ans, -x[i]*2 + x[i+K-1], -x[i]+x[i+K-1]*2)

print(ans)
# Judge status: Accepted
n = int(input())
a = sorted(list(map(int,input().split())), reverse=True)
alice = 0
bob = 0
for i in range(n):
    if i % 2 == 0:
        alice += a[i]
    else:
        bob += a[i]

print(alice - bob)
# Judge status: Accepted
import sys
input = sys.stdin.readline
f = lambda:map(int,input().split())
n,m = f()
llm = []
lln = [[] for _ in range(n)]
ll = []
for i in range(m):
  p,y = f()
  llm.append([i,p,y])
  lln[p-1].append([y,i])
for j in range(n):
  lln[j].sort()
  for k in range(len(lln[j])):
    ll.append([lln[j][k][1],j+1,k+1])
ll.sort()
for i in range(m):
  print(str(ll[i][1]).zfill(6)+str(ll[i][2]).zfill(6))
# Judge status: Wrong Answer
a,b=map(int,input().split())
if a>b and a-b>2:
  print(2*a-1)
elif a>b and a-b<2:
  print(a+b)
elif b>a and b-a>2:
  print(2*b-1)
elif b>a and b-a<2:
  print(a+b)
elif a==b:
  print(a+b)
# Judge status: Accepted
x,y = map(int, input().split())
n = [x]
while n[-1] < y:
  n.append(n[-1]*2)
if n[-1] > y: n.pop(-1)
print(len(n))
# Judge status: Accepted
n, k, q = map(int, input().split())
A = []
for i in range(q):
    A.append(int(input()))

# 正解数でリストを作る
count_ans = [0 for _ in range(n)]
for i in range(q):
    count_ans[A[i]-1] += 1

for j in range(n):
    if q - k < count_ans[j]:
        print('Yes')
    else:
        print('No')
# Judge status: Accepted
N = int(input())
XL = [tuple(map(int,input().split())) for i in range(N)]
XL.sort(key=lambda x: x[0]+x[1])
right = -float('inf')
ans = 0
for x,l in XL:
    s,t = x-l, x+l-1
    if s > right:
        right = t
        ans += 1
print(ans)
# Judge status: Accepted
n = int(input())
A = [int(input()) for _ in range(n)]
B = []
cnt = 0
i = 0
while i != 1:
    i = A[i]-1
    B.append(i)
    cnt += 1
    if cnt > 10**5 + 1:
        print(-1)
        exit()
print(cnt)
# Judge status: Wrong Answer
k, n = map(int, input().split())
a = list(map(int, input().split()))
max = 0
len = [0] * n
for i in range(n):
    if i == 0:
        len[i] = a[i]
    else:
        len[i] = a[i] - a[i - 1]
        if len[i] > len[max]:
            max = i
if len[max] > int(k / n) and len[max] > (k - a[n - 1]) and (a[n - 1] - a[0]) > len[max]:
    ans = (k - a[max]) + a[max - 1]
else:
    ans = a[n - 1] - a[0]
print(ans)
# Judge status: Wrong Answer
N = int(input())
List = []
for i in range(N):
  List.append(list(map(str, input().split())))
Names = []
Points = []
for i in range(N):
  Names.append(List[i][0])
  Points.append(List[i][1])
slName = set(Names)
NewName = list(slName)
NewName.sort()
Points.sort(reverse = True)
for i in range(len(NewName)):
  for j in range(len(Points)):
    for k in range(N):
      if List[k][0] == NewName[i] and List[k][1] == Points[j]:
        print(k+1)
      else:
        pass
# Judge status: Accepted
import math

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

if math.ceil(a / d) < math.ceil(c / b):
    print('No')
else:
    print('Yes')
# Judge status: Wrong Answer
Sa = list(input())
Sb = list(input())
Sc = list(input())
def turn(S):
  if len(S) == 0:
    if S == Sa:
      print('A')
    elif S == Sb:
      print('b')
    elif S == Sc:
      print('C')
  else:
    next_turn = S.pop(0)
    if next_turn == 'a':
      turn(Sa)
    elif next_turn == 'b':
      turn(Sb)
    elif next_turn == 'c':
      turn(Sc)
turn(Sa)
# Judge status: Accepted
number = int(input())
word    = input()
answer  =""

if number < len(word):
    answer = word[:number] + "..."
    print(answer)
else:
    print(word)
# Judge status: Accepted
c=0
for _ in range(int(input())):
    a,b=map(int,input().split())
    if a==b:
        c+=1
        if c==3:
            print("Yes")
            break
    else:
        c=0
else:
    print("No")
# Judge status: Accepted
a = int(input())

print(a**3 + a**2 + a)
# Judge status: Accepted
S = [s for s in input()]
K = int(input())
N = len(S)

# print(S, K)

ord_a = ord('a')

T = [0]*N
for i in range(N):
    s = S[i]
    a = ord(s)
    r = (ord_a + 26 - a) % 26
    if r <= K:
        K -= r
        s = 'a'
    T[i] = s
if K > 0:
    t = T[N - 1]
    a = ord(t)
    a = ord_a + (a - ord_a + K) % 26
    T[N - 1] = chr(a)
print(''.join(T))
# Judge status: Accepted
import collections
n=int(input())
a=list(map(int,input().split()))
b = collections.Counter(a)
total = 0

for i in b.values():
  total += i*(i-1)//2
  
for i in a:
  c = b[i]
  print(total-(c*(c-1)//2)+((c-1)*(c-2)//2))
# Judge status: Wrong Answer
nums = list(map(int,input().split()))
k = int(input())
print(sum(nums) - max(nums) + max(nums)*2*k)
# Judge status: Wrong Answer
n, l = map(int, input().split())
S = [list(input()) for _ in range(n)]

S.sort(key=lambda x: x[0])

for s in S:
    for i in s:
        print(i, end="")
# Judge status: Accepted
def mapt(fn, *args):
    return tuple(map(fn, *args))

def Input():
    return mapt(int, input().split(" "))

def main():
    n = int(input())
    a = Input()
    b = Input()
    c = Input()
    ans = 0
    for i in range(n-1):
        if a[i+1] - a[i] == 1:
            ans += c[a[i]-1]
    ans += sum(b)
    print(ans)
main()
# Judge status: Wrong Answer
A, B, C, D = map(int, input().split())
while A > 0 and C > 0:
  C -= B
  if C <= 0:
    print("Yes")
  A -= D
  if A <= 0:
    print("No")