CodeEff/ECCO huggingface dataset:
# Original solution
K = int(eval(input()))
D = int(eval(input()))
MOD = 10**9 + 7

dp = [[[0]*D for _ in range(2)] for _ in range(int(len(str(K)))+1)]
dp[0][0][0] = 1

for digit in range(int(len(str(K)))):
    for smaller_flg in [0,1]:
        for mod_d in range(D):
            lim = 9 if smaller_flg else int(str(K)[digit])
            for digit_num in range(lim+1):
                dp[digit+1][smaller_flg or digit_num < lim][(mod_d + digit_num)%D] += dp[digit][smaller_flg][mod_d]
                dp[digit+1][smaller_flg or digit_num < lim][(mod_d + digit_num)%D] %= MOD

print(((dp[int(len(str(K)))][1][0] + dp[int(len(str(K)))][0][0] - 1) % MOD))

# Optimized solution
K = int(eval(input()))
D = int(eval(input()))
MOD = 10**9 + 7

dp = [[[0]*D for _ in range(2)] for _ in range(int(len(str(K)))+1)]
dp[0][0][0] = 1

for digit in range(int(len(str(K)))):
    for smaller_flg in [0,1]:
        lim = 9 if smaller_flg else int(str(K)[digit])
        for digit_num in range(lim+1):
            new_smaller_flg = smaller_flg or digit_num < lim
            for mod_d in range(D):
                new_mod_d = (mod_d + digit_num)%D
                dp[digit+1][new_smaller_flg][new_mod_d] += dp[digit][smaller_flg][mod_d]
                dp[digit+1][new_smaller_flg][new_mod_d] %= MOD

print(((dp[int(len(str(K)))][1][0] + dp[int(len(str(K)))][0][0] - 1) % MOD))
# Original solution
K = int(eval(input()))
D = int(eval(input()))
MOD = 10**9 + 7

dp = [[[0]*(int(len(str(K)))+1) for _ in range(D)] for _ in range(2)]
dp[0][0][0] = 1

for digit in range(int(len(str(K)))):
    for smaller_flg in [0,1]:
        lim = 9 if smaller_flg else int(str(K)[digit])
        for digit_num in range(lim+1):
            new_smaller_flg = smaller_flg or digit_num < lim
            for mod_d in range(D):
                new_mod_d = (mod_d + digit_num)%D
                dp[new_smaller_flg][new_mod_d][digit+1] += dp[smaller_flg][mod_d][digit]
                dp[new_smaller_flg][new_mod_d][digit+1] %= MOD

print(((dp[1][0][int(len(str(K)))] + dp[0][0][int(len(str(K)))] - 1) % MOD))

# Optimized solution
K = int(eval(input()))
D = int(eval(input()))
MOD = 10**9 + 7

dp = [[[0]*D for _ in range(2)] for _ in range(int(len(str(K)))+1)]
dp[0][0][0] = 1

# 外側の要素から外側のループに置くと参照が速くなる
for digit in range(int(len(str(K)))):
    for smaller_flg in [0,1]:
        lim = 9 if smaller_flg else int(str(K)[digit])
        for digit_num in range(lim+1):
            new_smaller_flg = smaller_flg or digit_num < lim
            for mod_d in range(D):
                new_mod_d = (mod_d + digit_num)%D
                dp[digit+1][new_smaller_flg][new_mod_d] += dp[digit][smaller_flg][mod_d]
                dp[digit+1][new_smaller_flg][new_mod_d] %= MOD

print(((dp[int(len(str(K)))][1][0] + dp[int(len(str(K)))][0][0] - 1) % MOD))
# Original solution
K, = list(map(int, input().split()))
D, = list(map(int, input().split()))
N = len(str(K))
M = 10**9+7
dp = [[0]*D for _ in range(N+1)]
dp2 = [[0]*D for _ in range(N+1)]
dp[0][0] = 1
dp2[0][0] = 1
for i in range(1, N+1):
    Ki = K%10
    K //= 10
    for j in range(D):
        for k in range(10):
            dp[i][(j+k)%D] += dp[i-1][j]
            dp[i][(j+k)%D] %= M
        for k in range(Ki):
            dp2[i][(j+k)%D] += dp[i-1][j]
            dp2[i][(j+k)%D] %= M
        dp2[i][(j+Ki)%D] += dp2[i-1][j]
        dp2[i][(j+Ki)%D] %= M
print(((dp2[N][0]-1)%M))


# Optimized solution
K, = list(map(int, input().split()))
D, = list(map(int, input().split()))
N = len(str(K))
M = 10**9+7
dp = [[0]*D for _ in range(N+1)]
dp2 = [[0]*D for _ in range(N+1)]
dp[0][0] = 1
dp2[0][0] = 1
for i in range(1, N+1):
    Ki = K%10
    K //= 10
    for j in range(D):
        for k in range(10):
            dp[i][(j+k)%D] = (dp[i][(j+k)%D] + dp[i-1][j])%M
        for k in range(Ki):
            dp2[i][(j+k)%D] = (dp2[i][(j+k)%D] + dp[i-1][j])%M
        dp2[i][(j+Ki)%D] = (dp2[i][(j+Ki)%D] + dp2[i-1][j])%M
print(((dp2[N][0]-1)%M))
# Original solution
# -*- coding: utf-8 -*-
#O[|w|]:|w|???????´¢???????????????????????????
#??\????????¨??\?°????????????´??????????????¨????????????????????????????????????nx[i]????????????????¨????
#???????????????????´¢??§?????????????????±???,????´¢??????????????¨??????????????¨??????,?????????????´¢??????
def kmpTable(w):
    lw = len(w)
    nx = [-1] * (lw + 1)   #nx[i]:=w[0:i](i?????????????????????)?????§?????\????????¨??\?°????????????´??????????????¨?????????????????????????????????
    j = -1
    for i in range(lw):
        while j >= 0 and w[i] != w[j]:
            j = nx[j]
        j += 1
        nx[i + 1] = j
    return nx

#O[|s|]:|s|???????´¢????????????????????????????????????
#s????????§,w??¨?????´????????????????????????????????????index???list?????????(0-index)
#???????????°??????list([])????????????
def kmpSearch(s, w):  #????´¢???????????????????????????s,????´¢??????????????????w
    ls = len(s)
    start = 0     #?????????s????????????,w??¨??????????????§??????????§????????????¨???(0-index)
    w_idx = 0     #?????????w????????????,??????s??¨??§??????????????¨????????????????????????????????¨???(0-index)(?°????????¨??????°,?????????????????????????????????????????¨????????°)
    ret = []
    nx = kmpTable(w)
    while start + w_idx < ls:              #ls??\????????¨w???????????????????????????????????£??????????????§??¢?????????????§?
        if s[start + w_idx] == w[w_idx]:
            w_idx += 1
            if w_idx == len(w):    #w??¨?????´????????¨???
                ret.append(start)
                start = start + w_idx - nx[w_idx]  #??????start??????????????´???????????£??????????????§?????????,??\????????¨??\?°????????????§?????´????????????????????????
                w_idx = nx[w_idx]
        else:
            if w_idx == 0:         #??????????????????????????´???????????¨???,start??????1?????????
                 start += 1
            else:                  #????????§?????´???????????£?????¨???
                start = start + w_idx - nx[w_idx]
                w_idx = nx[w_idx]
    return ret

T = input()
P = input()
ans = kmpSearch(T, P)
for i in ans:
    print(i)

# Optimized solution
def kmpTable(w):
    lw = len(w)
    nx = [-1] * (lw + 1)
    j = -1
    for i in range(lw):
        while j >= 0 and w[i] != w[j]:
            j = nx[j]
        j += 1
        nx[i + 1] = j
    return nx

def kmpSearch(s, w):
    ls = len(s)
    start = 0
    w_idx = 0
    ret = []
    nx = kmpTable(w)
    while start + w_idx < ls:
        if s[start + w_idx] == w[w_idx]:
            w_idx += 1
            if w_idx == len(w):
                ret.append(start)
                start = start + w_idx - nx[w_idx]
                w_idx = nx[w_idx]
        else:
            if w_idx == 0:
                 start += 1
            else:
                start = start + w_idx - nx[w_idx]
                w_idx = nx[w_idx]
    return ret
    
T = input()
P = input()
ans = kmpSearch(T, P)
for i in ans:
    print(i)
# Original solution
bus = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
for i in range(eval(input())):
    s, t = list(map(int, input().split()))
    if s>5:
        print(" ".join(map(str, bus[s:bus.index(t, s)+1])))
    else:
        if s<t:
            print(" ".join(map(str, range(s, t+1))))
        else:
            print(" ".join(map(str, range(s, t-1, -1))))
            

# Optimized solution
bus = "0123456789543210123456789"
rbus = "543210"
for i in range(eval(input())):
    s, t = input().split()
    if t<s<'6':
        left = rbus.find(s, 0)
        right = rbus.find(t, left)
        print(" ".join(rbus[left:right+1]))
    else:
        left = bus.find(s, 0)
        right = bus.find(t, left)
        print(" ".join(bus[left:right+1]))
# Original solution
N=int(eval(input()))
A=[int(i) for i in input().split()]
def Check(K):
  stack=[]
  n=A[0]
  for i in range(1,N):
    if A[i-1]<A[i]:
      n=A[i]
    else:
      if K==1:
        return False
      while n>A[i]:
        if stack:
          if stack[-1][0]==n:
            stack.pop()
        n-=1
      k=n
      while k>=1:
        if not stack:
          stack.append([k,1])
          break
        if stack[-1][0]==k:
          if stack[-1][1]==K-1:
            if k!=1:
              stack.pop()
              k-=1
            else:
              return False
          else:
            stack[-1][1]+=1
            break
        else:
          stack.append([k,1])
          break
  return True
l,r=1,N
while l<r:
  m=(l+r)//2
  if Check(m):
    r=m
  else:
    l=m+1
print(l)
          
          
          
      

# Optimized solution
N=int(eval(input()))
A=[int(i) for i in input().split()]
def Check(K):
  stack=[]
  n=A[0]
  for i in range(1,N):
    if A[i-1]<A[i]:
      n=A[i]
    else:
      if K==1:
        return False
      n=A[i]
      while True:
        l=0
        if stack:
          l=stack[-1][0]
        if l>n:
          stack.pop()
        else:
          break       
      k=n
      while k>=1:
        if not stack:
          stack.append([k,1])
          break
        if stack[-1][0]==k:
          if stack[-1][1]==K-1:
            if k!=1:
              stack.pop()
              k-=1
            else:
              return False
          else:
            stack[-1][1]+=1
            break
        else:
          stack.append([k,1])
          break
  return True
l,r=1,N
while l<r:
  m=(l+r)//2
  if Check(m):
    r=m
  else:
    l=m+1
print(l)
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))
if A == sorted(A) and len(A) == len(set(A)):
  print((1))
  exit(0)

def check(X):
  idx = [0]
  ltr = [0]
  for a in A:
    if idx[-1] < a:
      idx.append(a)
      ltr.append(0)
    else:
      while True:
        while idx[-1] > a:
          idx.pop()
          ltr.pop()
        if idx[-1] != a:
          idx.append(a)
          ltr.append(0)
        if idx[-1] == 0:
          return False
        ltr[-1] += 1
        if ltr[-1] < X:
          break
        a = idx[-1] - 1
        idx.pop()
        ltr.pop()
  return ltr[0] == 0

t = [0, N]
while t[1] - t[0] > 1:
  mid = (t[0] + t[1]) // 2
  t[check(mid)] = mid
print((t[1]))


# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split()))
if A == sorted(A) and len(A) == len(set(A)):
  print((1))
  exit(0)

def check(X):
  idx = [0]
  ltr = [0]
  for a in A:
    if idx[-1] < a:
      idx.append(a)
      ltr.append(0)
    else:
      while True:
        while idx[-1] > a:
          idx.pop()
          ltr.pop()
        if idx[-1] != a:
          idx.append(a)
          ltr.append(0)
        if idx[-1] == 0:
          return False
        ltr[-1] += 1
        if ltr[-1] < X:
          break
        a = idx[-1] - 1
        idx.pop()
        ltr.pop()
  return ltr[0] == 0

t = [1, N]
while t[1] - t[0] > 1:
  mid = (t[0] + t[1]) // 2
  t[check(mid)] = mid
print((t[1]))
# Original solution
N = int(eval(input()))
A = [0] + [int(_) for _ in input().split()]
B = [0]
is_monotone = True
for i in range(N):
    if is_monotone:
        is_monotone &= A[i + 1] > A[i]
    B += [min(A[i + 1], 18)]
if is_monotone:
    print((1))
    exit()


def is_possible(K):
    dp = [0] * 18
    for i in range(N):
        if B[i] >= B[i + 1]:
            dp = dp[:B[i + 1]] + [0] * (19 - B[i + 1])
            flag = True
            for j in range(B[i + 1] - 1, -1, -1):
                if dp[j] < K - 1:
                    dp[j] += 1
                    flag = False
                    break
                else:
                    dp[j] = 0
            if flag:
                return False
    return True


def bis(x, y):
    if y == x + 1:
        return y
    elif is_possible((x + y) // 2):
        return bis(x, (x + y) // 2)
    else:
        return bis((x + y) // 2, y)


print((bis(0, N)))


# Optimized solution
eval(input())
A = [int(_) for _ in input().split()]
A = [A[0]] + [j for i, j in zip(A, A[1:]) if i >= j]
N = len(A)


def cut(array, index):
    if index < 1:
        return []
    for _ in range(len(array)):
        if index <= array[_][0]:
            return array[:_] + [(index, array[_][1])]


def is_possible(K):
    dp = [(A[0], 0)]
    for a in A[1:]:
        if a <= dp[-1][0]:
            dp = cut(dp, a)
        else:
            dp += [(a, 0)]
        is_added = False
        for j in range(len(dp) - 1, -1, -1):
            if dp[j][1] < K - 1:
                dp = cut(dp, dp[j][0] - 1) + [(dp[j][0], dp[j][1] + 1)]
                if dp[-1][0] < a:
                    dp += [(a, 0)]
                is_added = True
                break
        if not is_added:
            return False
    return True


def bis(x, y):
    if y == x + 1:
        return y
    elif is_possible((x + y) // 2):
        return bis(x, (x + y) // 2)
    else:
        return bis((x + y) // 2, y)


print((bis(0, N)))
# Original solution
import sys
input = sys.stdin.readline

from collections import Counter

N = int(eval(input()))
A = [int(x) for x in input().split()]

x = min(A)
y = max(A)

if x == y:
    # 全員がnon-uniqueな色 or 全員がuniqueな色
    bl = (x <= N//2) or (x == N-1)
elif y != x + 1:
    bl = False
else:
    a = A.count(x)
    b = A.count(y)
    # a人：unique color
    # b人：non-unique color
    # b人でc種類あるとする
    c = y - a
    bl = (1 <= c <= b//2)

answer = 'Yes' if bl else 'No'
print(answer)

# Optimized solution
import sys

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

N = int(readline())
A = sorted(map(int, readline().split()))

def main(A):
    N = len(A)
    if A[0] == A[-1]:
        x = A[0]
        return x == N - 1 or 2 * x <= N
    if A[0] + 1 != A[-1]:
        return False
    a, b = A[0], A[-1]
    full = b
    unique = A.count(a)
    people, color = N - unique, A[-1] - unique
    return color > 0 and 2 * color <= people

print(('Yes' if main(A) else 'No'))
# Original solution
import sys
input = sys.stdin.readline
N = int(eval(input()))
a = list(map(int, input().split()))
a.sort()
mx = max(a)
mn = min(a)
c = mx + 0
b = 0
s = 0
if mx == mn and (mx != N - 1):
  mn -= 1
if mx >= N:
  print("No")
  exit(0)
for i in range(N):
  if abs(a[i] - mx) > 1:
    print("No")
    exit(0)
  if a[i] == mn:
    c = a[i] + 1
    s += 1
  else:
    b += 1
if s >= c and (b != 0 and s != 0):
  print("No")
  exit(0)
elif s > c:
  print("No")
  exit(0)
if b == 1:
  print("No")
  exit(0)
if b // 2 < c - s:
  print("No")
else: print("Yes")

# Optimized solution
import sys
input = sys.stdin.readline
N = int(eval(input()))
a = list(map(int, input().split()))
a.sort()
if a[-1] - a[0] > 1:
  print("No")
  exit(0)

if a[0] == a[-1]:
  if a[0] == N - 1:
    print("Yes")
    exit(0)
  if N // a[0] >= 2:
    print("Yes")
  else: print("No")
  exit(0)

table = [0] * N
for i in range(N):
  if a[i] == a[0]: table[i] = i + 1
l = max(table) + 1
r = l + table.count(0) // 2

if a[-1] in range(l, r): print("Yes")
else: print("No")
# Original solution
n = int(eval(input()))
A = list(map(int,input().split()))
B = []
C = []
for num in A:
    if num in B: 
        C[B.index(num)] += 1
    else:
        B.append(num)
        C.append(1)

if len(B) > 2:
    print('No')
elif len(B) == 1:
    if n == B[0] +1:
        print('Yes')
    elif n//B[0] >= 2:
        print('Yes')
    else:
        print('No')
elif B[0]  == (B[1]+1):
    k = C[1]
    m = B[1]
    if m-k+1 <= 0:
        print('No')
    elif (n-k) % (m-k+1) == 0:
        print('Yes')
    else:
        print('No')
elif B[1] == (B[0]+1):
    k = C[0]
    m = B[0]
    if m-k+1 <= 0:
        print('No')
    elif (n-k) % (m-k+1) == 0:
        print('Yes')
    else:
        print('No')
else:
    print('No')

# Optimized solution
n = int(eval(input()))
A = list(map(int,input().split()))
B = []
C = []
for num in A:
    if len(B) >= 3:
        print("No")
        break
    elif num in B: 
        C[B.index(num)] += 1
    else:
        B.append(num)
        C.append(1)


if len(B) >= 3:
    pass
elif len(B) == 1:
    if n == B[0] +1:
        print('Yes')
    elif n//B[0] >= 2:
        print('Yes')
    else:
        print('No')
elif B[0]  == (B[1]+1):
    k = C[1]
    m = B[1]
    if m-k+1 <= 0:
        print('No')
    elif (n-k) % (m-k+1) == 0:
        print('Yes')
    else:
        print('No')
elif B[1] == (B[0]+1):
    k = C[0]
    m = B[0]
    if m-k+1 <= 0:
        print('No')
    elif (n-k) % (m-k+1) == 0:
        print('Yes')
    else:
        print('No')
else:
    print('No')
# Original solution
N = int(eval(input()))
a = list(map(int, input().split()))

L = []

def ans(tf):
  if tf:
    print("Yes")
  else:
    print("No")

for x in a:
  for i in range(len(L)):
    if L[i][0] == x:
      L[i][1] += 1
      break
  else:
    L.append([x, 1])
    if len(L) >= 3:
      ans(False)

if len(L) == 1:
  x = L[0][0]
  if x == N - 1 or x <= N // 2:
    ans(True)
  else:
    ans(False)
else:
  x, xn = L[0]
  y, yn = L[1]
  if abs(x - y) != 1:
    ans(False)
    exit()
  if x < y:
    x, y = y, x
    xn, yn = yn, xn
  if yn >= x:
    ans(False)
    exit()
  n = x - yn
  if n <= xn // 2:
    ans(True)
  else:
    ans(False)

# Optimized solution
N = int(eval(input()))
a = list(map(int, input().split()))

L = []

def ans(tf):
  if tf:
    print("Yes")
  else:
    print("No")
  exit()

for x in a:
  for i in range(len(L)):
    if L[i][0] == x:
      L[i][1] += 1
      break
  else:
    L.append([x, 1])
    if len(L) >= 3:
      ans(False)

if len(L) == 1:
  x = L[0][0]
  if x == N - 1 or x <= N // 2:
    ans(True)
  else:
    ans(False)
else:
  x, xn = L[0]
  y, yn = L[1]
  if abs(x - y) != 1:
    ans(False)
    exit()
  if x < y:
    x, y = y, x
    xn, yn = yn, xn
  if yn >= x:
    ans(False)
    exit()
  n = x - yn
  if n <= xn // 2:
    ans(True)
  else:
    ans(False)
# Original solution
N=int(eval(input()))
a=list(map(int,input().split()))

if max(a)-min(a)>=2:
    print("No")

elif max(a)-min(a)==0:
    count=0
    for i in range(N):
        if a[i]==N-1 or a[i]<=N//2:
            count+=1
    if count==N:
        print("Yes")
    else:
        print("No")
else:
    q=0
    p=0
    for i in range(N):
        if a[i]==max(a):
            q+=1
        elif a[i]==min(a):
            p+=1
    if p+q//2 >= max(a) and max(a)>=p+1:
        print("Yes")
    else:
        print("No")

# Optimized solution
N=int(eval(input()))
a=list(map(int,input().split()))
M=max(a)
m=min(a)

if M-m>=2:
    print("No")

elif M-m==0:
    count=0
    for i in range(N):
        if a[i]==N-1 or a[i]<=N//2:
            count+=1
    if count==N:
        print("Yes")
    else:
        print("No")
else:
    q=0
    p=0
    for i in range(N):
        if a[i]==M:
            q+=1
        elif a[i]==m:
            p+=1
    if p+q//2 >= max(a) and max(a)>=p+1:
        print("Yes")
    else:
        print("No")
# Original solution
import sys
stdin = sys.stdin

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
a = list(li())

exist = True

if max(a) - min(a) > 1:
    exist = False
    
elif max(a) >= n:
    exist = False
    
elif max(a) - min(a) == 1:
    if a.count(min(a)) < max(a) and 2*(max(a)-a.count(min(a))) <= a.count(max(a)):
        exist = True
    else:
        exist = False
        
elif max(a) == min(a):
    if 2*a[0] <= n or a[0]+1 == n:
        exist = True
    else:
        exist = False
        
print("Yes") if exist else print("No")


# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))

unum = min(a)
vnum = max(a)

u = a.count(unum)
v = a.count(vnum)

exist = False

if vnum-unum == 1:
  if u+1 <= vnum <= u+v//2:
    exist = True
    
elif vnum == unum:
  if vnum == n-1 or vnum <= n//2:
    exist = True
    
print(("Yes" if exist else "No"))
# Original solution
#https://img.atcoder.jp/agc016/editorial.pdf
def solve():
  n = int(eval(input()))
  a = list(int(i) for i in input().split())
  ans = 'Yes'
  alone = 0
  group = 0
  if max(a) - min(a) >= 2: ans = 'No'
  
  elif max(a) - min(a) == 1:
   for i in a:
     if i == max(a)-1 : alone += 1
     else: group += 1
   if alone < max(a) and 2*(max(a)-alone)<= group: pass
   else: ans = 'No'
  
  
  elif max(a) - min(a) == 0:
    if a[0] == n-1 or 2*a[0] <= n:
      pass
    else: ans = 'No'
  return ans

if __name__ == '__main__':
  print((solve()))

# Optimized solution
#https://img.atcoder.jp/agc016/editorial.pdf
def solve():
  n = int(eval(input()))
  a = list(int(i) for i in input().split())
  ans = 'Yes'
  alone = 0
  group = 0
  ha = max(a)
  la = min(a)
  if ha - la >= 2: ans = 'No'
  
  elif ha - la == 1:
   for i in a:
     if i == ha-1 : alone += 1
     else: group += 1
   if alone < ha and 2*(ha-alone)<= group: pass
   else: ans = 'No'
  
  
  elif ha - la == 0:
    if a[0] == n-1 or 2*a[0] <= n:
      pass
    else: ans = 'No'
  return ans

if __name__ == '__main__':
  print((solve()))
# Original solution
N,K,Q = list(map(int, input().split(" "))) #N:参加者 K:ポイント Q:正解数
A = [K]*N

for i in range(0,Q):
    A = list([x-1 for x in A])
    A[int(eval(input()))-1] += 1

for point in A:
    if point<=0:
        print("No")
    else:
        print("Yes")

# Optimized solution
N,K,Q = list(map(int, input().split(" "))) #N:参加者 K:ポイント Q:正解数
A = [K]*N

for i in range(0,Q):
    A[int(eval(input()))-1] += 1

for point in A:
    if point - Q <= 0 :
        print("No")
    else:
        print("Yes")
# Original solution
def calc_point(points, n):
    for i in range(len(points)):
        if i != n:
            points[i] -= 1


n, k, q = list(map(int, input().split(" ")))

points = []
for i in range(n):
    points.append(k)

for i in range(q):
    a = int(eval(input()))
    calc_point(points, a-1)


for i in range(len(points)):
    if points[i] <= 0:
        print("No")
    else:
        print("Yes")



# Optimized solution
n, k, q = list(map(int, input().split(" ")))

points = {}

for i in range(q):
    a = int(eval(input()))
    if a not in points:
        points[a] = 0
    points[a] += 1


for i in range(n):
    p = 0
    if (i+1) in points:
        p = points[i+1]
    if k - q+p >= 1:
        print("Yes")
    else:
        print("No")
# Original solution
n,k,q = list(map(int,input().split()))
Ans = [int(eval(input())) for i in range(q)]
if k > q:
	for i in range(n):
		print("Yes")
else:	
	C = ["No"]*n
	for j in Ans:
		if Ans.count(j) > q - k:
			C[j-1] = "Yes"
		else:
			pass
	for l in range(n):
		print((C[l]))

# Optimized solution
n,k,q = list(map(int,input().split()))
points = []
for i in range(n):
	points.append(k-q)
for i in range(q):
	points[int(eval(input()))-1]+=1
for i in range(n):
	if points[i]>0:
		print("Yes")
	else:
		print("No")
# Original solution
n,k,q=list(map(int,input().split()))
d=[k]*n
s=[]

for i in range(q):
  s.append(int(eval(input())))
for i in range(q):
  for j in range(n):
    if s[i]!=(j+1):
      d[j]-=1
for i in range(n):
  if d[i]<=0:
    print("No")
  else:
    print("Yes")



# Optimized solution
n,k,q=list(map(int,input().split()))
d=[k-q]*n
s=[]
for j in range(q):
  d[int(eval(input()))-1]+=1
for i in range(n):
  if d[i]<=0:
    print("No")
  else:
    print("Yes")
# Original solution
n,k,q=list(map(int,input().split()))
a=[k]*n 
for i in range(q):
    t=int(eval(input()))
    for i in range((n)):
        if i!=t-1:
            a[i]-=1 
for i in a:
    if i>0:
        print("Yes")
    else:
        print("No")

# Optimized solution
n,k,q=list(map(int,input().split()))
a=[0]*n 
for i in range(q):
    t=int(eval(input()))
    a[t-1]+=1
#print(a)
for i in a:
    if k-(q-i)>0:
        print("Yes")
    else:
        print("No")
# Original solution
n,k,q = list(map(int, input().split()))

point_l = [k] * n

for _ in range(q):
  point_l = list([x-1 for x in point_l])
  ans = int(eval(input()))
  point_l[ans-1] += 1

for i in range(n):
  if point_l[i] <= 0:
    print('No')
  else:
    print('Yes')

# Optimized solution
n,k,q = list(map(int, input().split()))


point_l = [k-q] * n
for _ in range(q):
 ans = int(eval(input()))
 point_l[ans-1] += 1

for i in range(n):
  print(('Yes' if point_l[i]>0 else 'No'))