Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

N,K,L = map(int, input().split())


class UFT:
    def __init__(self, N):
        self.UFdata = [-1] * (N+1)
        self.rank   = [0]  * (N+1)
        self.connected_num = [1] * (N+1)

    def find(self,x):
        UFdata = self.UFdata
        while UFdata[x] != -1:
            x = UFdata[x]
        return x

    def unite(self,x,y):
        UFdata = self.UFdata
        rank = self.rank
        connected_num = self.connected_num
        find = self.find

        x = find(x)
        y = find(y)
        if x != y:
            if rank[x] < rank[y]:
                UFdata[x] = UFdata[y]
                x,y = y,x
            if rank[x] == rank[y]:
                rank[x] += 1
            UFdata[y] = x       
            connected_num[x] += connected_num[y]
            

UF1 = UFT(N)
UF2 = UFT(N)
ans = [1] * (N+1)
MAP= [ [0] * (N+1) for _ in range(N+1)]
import sys
input = sys.stdin.readline
PQ = [ [int(j) for j in input().split()] for _ in range(K)]
RS = [ [int(j) for j in input().split()] for _ in range(L)]

for i in range(K):
    p,q = PQ[i]
    if UF1.find(p) != -1 and UF1.find(p) != UF1.find(q)  or UF1.find(p) == UF1.find(q) == -1:
        UF1.unite(p,q)

    

for i in range(L):
    p,q = RS[i]

    if UF1.find(p) != -1 and UF1.find(p) == UF1.find(q) :
        UF2.unite(p, q)

ans = [0]*(N+1)
for i in range(1,N+1):
    # ans.append (  UF2.connected_num[ UF2.find( i) ] )
    ans[i] = UF2.connected_num[UF2.find(i)]

del ans[0]
# print(" ".join( map(lambda x: str(x), connected_num[1:])))
print(" ".join( map(lambda x: str(x), ans)))


### FIXED CODE ###

N,K,L = map(int, input().split())


class UFT:
    def __init__(self, N):
        self.UFdata = [-1] * (N+1)
        self.rank   = [0]  * (N+1)

    def find(self,x):
        UFdata = self.UFdata
        while UFdata[x] != -1:
            x = UFdata[x]
        return x

    def unite(self,x,y):
        UFdata = self.UFdata
        rank = self.rank 
        find = self.find

        x = find(x)
        y = find(y)
        if x != y:
            if rank[x] < rank[y]:
                x,y = y,x
            if rank[x] == rank[y]:
                rank[x] += 1
            UFdata[y] = x       
            

UF1 = UFT(N)
UF2 = UFT(N)
ans = [1] * (N+1)
# MAP= [ [0] * (N+1) for _ in range(N+1)]
import sys
input = sys.stdin.readline
#PQ = [ [int(j) for j in input().split()] for _ in range(K)]
#RS = [ [int(j) for j in input().split()] for _ in range(L)]

for i in range(K):
    p,q = map(int,input().split())
    UF1.unite(p,q)
for i in range(L):
    p,q = map(int,input().split())#RS[i]
    UF2.unite(p, q)
counter=[]
from collections import defaultdict
cntdic =defaultdict(int)
for i in range(1,N+1):
  counter.append(UF1.find(i)+UF2.find(i)*10**6)
  cntdic[counter[-1]]+=1 

ans = [0]*(N+1)
for i in range(1,N+1):
    ans[i] = cntdic[counter[i-1]]

del ans[0]
# print(" ".join( map(lambda x: str(x), connected_num[1:])))
print(" ".join( map(lambda x: str(x), ans)))
### BUGGY CODE ###


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

total = 0

for i in range(n):
    if i == 0:
        total = a[i]
    else:
        total *= a[i]

if total > 10 ** 18:
    print("-1")
else:
    print(total)



### FIXED CODE ###

N = (int, input().split())

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

if 0 in A:
    print(0)
    exit(0)

num = 1
for i in A:
    num *= i
    if num > 10**18:
        print(-1)
        exit(0)
print(num)
### BUGGY CODE ###

import sys
sys.setrecursionlimit(10 ** 6)

N = int(input())
A = list(map(int, input().split(" ")))
dp = dict()
mod = 10 ** 9 + 7

def f(i, ma, mi):
    if i == N:
        return 1
    if (i, ma, mi) in dp:
        return dp[(i, ma, mi)]
    if A[i] != ma and A[i] != mi and A[i] != i - ma - mi:
        dp[(i, ma, mi)] = 0
        return 0
    
    ans = 0
    # iがr, b, gを被って矛盾がないかを見ていく
    if A[i] == ma:
        ans += f(i + 1, ma + 1, mi)
    if A[i] == mi:
        if ma > mi + 1:
            ans += f(i + 1, ma, mi + 1)
        else:
            ans += f(i + 1, mi + 1, ma)
    if A[i] == i - ma - mi:
        ans += f(i + 1, ma, mi)

    dp[(i, ma, mi)] = ans % mod
    return dp[(i, ma, mi)]

print(f(0, 0, 0) % mod)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)

N = int(input())
A = list(map(int, input().strip().split(" ")))
dp = {i: dict() for i in range(N)}
mod = 10 ** 9 + 7

def f(i, ma, mi):
    if i == N:
        return 1
    if (ma, mi) in dp[i]:
        return dp[i][(ma, mi)]
    if A[i] != ma and A[i] != mi and A[i] != i - ma - mi:
        dp[i][(ma, mi)] = 0
        return 0

    ans = 0
    # iがr, b, gを被って矛盾がないかを見ていく
    if A[i] == ma:
        ans += f(i + 1, ma + 1, mi)
    if A[i] == mi:
        if ma > mi + 1:
            ans += f(i + 1, ma, mi + 1)
        else:
            ans += f(i + 1, mi + 1, ma)
    if A[i] == i - ma - mi:
        ans += f(i + 1, ma, mi)

    dp[i][(ma, mi)] = ans % mod
    return ans % mod

print(f(0, 0, 0) % mod)
### BUGGY CODE ###

N, W = map(int, input().split())
v, w = [0] * N, [0] * N
for i in range(N):
    v[i], w[i] = map(int, input().split())

def rec(i, weight):
    if i == N:
        return 0
    elif weight + w[i] <= W:
        return max(rec(i+1, weight), rec(i+1, weight + w[i]) + v[i])
    else:
        return rec(i+1, weight)
print(rec(0, 0))

### FIXED CODE ###

N, maxW = map(int, input().split())
V, W = [], []
for i in range(N):
    v, w = map(int, input().split())
    V.append(v); W.append(w)
dp = [[0]*(maxW+1) for _ in range(2)]
for i in range(N):
    for j in range(maxW+1):
        if j < W[i]:
            dp[(i+1)&1][j] = dp[i&1][j]
        else:
            dp[(i+1)&1][j] = max(dp[i&1][j], dp[i&1][j-W[i]] + V[i])
print(dp[N&1][maxW])
### BUGGY CODE ###

from math import factorial

n=int(input())
string_list=[]

for _ in range(n):
	rel = sorted(list(input()))
	string_list.append(''.join(rel))
    
#string_distinct = set(string_list)
#print(len(string_list) - len(string_distinct))
idx = 0
count_list=[]
for item in string_list:
	
	if item in count_list:
		continue
	
	s_count = string_list.count(item)
	if s_count > 1:
#		idx += (2 * s_count - 1)
		idx += factorial(s_count) // factorial(2) // factorial(s_count - 2)
		count_list.append(item)
print(idx)

### FIXED CODE ###

N = int(input())

def sort_alpabetical(s):
	
	s_list = list(s)
	s_list.sort()
	return ''.join(s_list)

list_s = []
for n in range(N):
	list_s.append(input())

list_s = [sort_alpabetical(s) for s in list_s]

dict_s = {s : 0 for s in set(list_s)}

n_of_pairs = 0


for s in list_s:
	
	n_of_pairs += dict_s[s]
	dict_s[s] +=1
	
print(n_of_pairs)
### BUGGY CODE ###

import sys
sys.setrecursionlimit(300000)
from collections import Counter

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


S = input()

m = [0]
pow = 1
for i in range(len(S)):
    m.append((m[-1] + int(S[- i - 1]) * pow) % 2019)
    pow *= 10


ans = 0
for cnt in Counter(m).values():
    ans += cnt * (cnt - 1) // 2
print(ans)


### FIXED CODE ###

import sys
sys.setrecursionlimit(300000)
from collections import Counter

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


S = input()

m = [0]
pow = 1
for i in range(len(S)):
    m.append((m[-1] + int(S[- i - 1]) * pow) % 2019)
    pow = (pow * 10) % 2019


ans = 0
for cnt in Counter(m).values():
    ans += cnt * (cnt - 1) // 2
print(ans)
### BUGGY CODE ###


N,M = map(int,input().split())

RD = []
end = [1] * N

for i in range(N):

    RD.append([])

for i in range(M):

    L,R,D = map(int,input().split())
    RD[L-1].append([R-1,D])
    RD[R-1].append([L-1,-1 * D])
    end[L-1] = 0
    end[R-1] = 0
    
"""
    lp = wantp(L-1)
    rp = wantp(R-1)

    if lp != rp:

        if rank[lp] 
"""
    


endnum = 0
Q = []

cor = ["x"] * N
ans = "Yes"


for endp in range(N):

    if end[endp] == 0:
        Q.append(endp)
    else:
        continue

    while len(Q) > 0:

        q = Q.pop(0)
        end[q] = 1

        if cor[q] == "x":
            cor[q] = 0

        for r,d in RD[q]:

            if cor[r] == "x":
                cor[r] = cor[q] + d
                Q.append(r)

            elif cor[r] != cor[q] + d:
                ans = "No"
                break

        if ans == "No":
            break

    if ans == "No":
        break

print (ans)


### FIXED CODE ###

from collections import deque

N,M = map(int,input().split())

RD = [deque() for i in range(N)]
end = [False] * N

for i in range(M):

    L,R,D = map(int,input().split())
    RD[L-1].append([R-1,D])
    RD[R-1].append([L-1,-1 * D])
    end[L-1] = True
    end[R-1] = True
    
"""
    lp = wantp(L-1)
    rp = wantp(R-1)

    if lp != rp:

        if rank[lp] 
"""
    


endnum = 0
Q = deque()

cor = ["x"] * N
ans = "Yes"


for endp in range(N):

    if end[endp]:
        Q.append(endp)


        while len(Q) > 0:

            q = Q.pop()
            end[q] = False

            if cor[q] == "x":
                cor[q] = 0

            for r,d in RD[q]:

                if cor[r] == "x":
                    cor[r] = cor[q] + d
                    Q.append(r)

                elif cor[r] != cor[q] + d:
                    print ("No")
                    exit()


print ("Yes")
### BUGGY CODE ###

import fractions
from functools import reduce

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

m1 = [0]
for i in a:
  m1.append(fractions.gcd(m1[-1], i))

m2 = [0]
for i in reversed(a):
  m2.append(fractions.gcd(m2[-1], i))

m = []
for i in range(len(a)):
  m.append(fractions.gcd(m1[i], m2[::-1][i + 1]))

print(max(m))

### FIXED CODE ###

import fractions
from functools import reduce

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

m1 = [0] * (n + 1)
m2 = [0] * (n + 1)
for i in range(1, n + 1):
  m1[i] = fractions.gcd(m1[i - 1], a[i - 1])
  m2[n - i] = fractions.gcd(m2[n - i + 1], a[n - i])

m = [0] * n
for i in range(n):
  m[i] = fractions.gcd(m1[i], m2[i + 1])

print(max(m))
### BUGGY CODE ###

from itertools import product

import numpy as np

N, A, B, C = (int(i) for i in input().split())
l = []

for i in range(N):
    l.append(int(input()))

l = np.array(l)

###########

'''
Aの竹の材料にする、Bの竹の材料にする、Cの竹の材料にする、使わない
'''

min_cost = 1e10

for i in product(np.arange(4), repeat=N):
    i = np.array(i)

    if(np.sum(np.unique(i)) != 6):
        continue

    for_a = l[i == 1]
    for_b = l[i == 2]
    for_c = l[i == 3]

    A_diff = np.abs(np.sum(for_a) - A) + (len(for_a) - 1) * 10
    B_diff = np.abs(np.sum(for_b) - B) + (len(for_b) - 1) * 10
    C_diff = np.abs(np.sum(for_c) - C) + (len(for_c) - 1) * 10

    cost = A_diff + B_diff + C_diff

    if(cost < min_cost):
        min_cost = cost

print(min_cost)

### FIXED CODE ###

N, A, B, C = map(int, input().split())
l = [int(input()) for i in range(N)]
INF = 10 ** 9


def dfs(cur, a, b, c):
    if cur == N:
        return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else INF
    ret0 = dfs(cur + 1, a, b, c)
    ret1 = dfs(cur + 1, a + l[cur], b, c) + 10
    ret2 = dfs(cur + 1, a, b + l[cur], c) + 10
    ret3 = dfs(cur + 1, a, b, c + l[cur]) + 10

    return min(ret0, ret1, ret2, ret3)
print(dfs(0, 0, 0, 0))
### BUGGY CODE ###

import sys


def input():
    return sys.stdin.readline()[:-1]


n, m, p = map(int, input().split())
edge0 = []
d = [[] for i in range(n)]
r = [[] for i in range(n)]
for i in range(m):
    ai, bi, ci = map(int, input().split())
    edge0.append((bi-1,ai-1,-ci+p))
    d[ai-1] += [bi-1]
    r[bi-1] += [ai-1]

p0 = [False for i in range(n)]
p0[0] = True
from collections import deque
q = deque([0])
while len(q)>0:
    x = q.popleft()
    for y in d[x]:
        if not p0[y]:
            p0[y] = True
            q.append(y)
pn = [False for i in range(n)]
pn[n-1] = True
q = deque([n-1])
while len(q) > 0:
    x = q.popleft()
    for y in r[x]:
        if not pn[y] and p0[y]:
            pn[y] = True
            q.append(y)

edge = []
for e in edge0:
    if pn[e[1]] and pn[e[0]]:
        edge += [e]


dist = [float("inf") for i in range(n)]
dist[n-1] = 0
h = False
for i in range(n):
    updated = False
    for e in edge:
        if dist[e[1]] > dist[e[0]] + e[2] and p0[e[1]] and p0[e[0]]:
            dist[e[1]] = dist[e[0]] + e[2]
            updated = True
    if not updated:
        break
else:
    h = True

if h:
    print(-1)
else:
    print(max(0, -dist[0]))


### FIXED CODE ###

import sys


def input():
    return sys.stdin.readline()[:-1]


n, m, p = map(int, input().split())
edge0 = []
d = [[] for i in range(n)]
r = [[] for i in range(n)]
for i in range(m):
    ai, bi, ci = map(int, input().split())
    edge0.append((bi-1,ai-1,-ci+p))
    d[ai-1] += [bi-1]
    r[bi-1] += [ai-1]

p0 = [False for i in range(n)]
p0[0] = True
from collections import deque
q = deque([0])
while len(q)>0:
    x = q.popleft()
    for y in d[x]:
        if not p0[y]:
            p0[y] = True
            q.append(y)
pn = [False for i in range(n)]
pn[n-1] = True
q = deque([n-1])
while len(q) > 0:
    x = q.popleft()
    for y in r[x]:
        if not pn[y] and p0[y]:
            pn[y] = True
            q.append(y)

edge = []
for e in edge0:
    if pn[e[1]] and pn[e[0]]:
        edge += [e]


dist = [float("inf") for i in range(n)]
dist[n-1] = 0
h = False
for i in range(n):
    updated = False
    for e in edge:
        if dist[e[1]] > dist[e[0]] + e[2] and p0[e[1]] and p0[e[0]]:
            dist[e[1]] = dist[e[0]] + e[2]
            updated = True
    if not updated:
        break
else:
    h = True

if h:
    print(-1)
else:
    print(max(0, -dist[0]))
### BUGGY CODE ###

def main():
  n=int(input())
  l=list(map(int,input().split()))
  k=[0]*n
  for i in range(1,n+1):
    k[i-1]=str(l.index(i)+1)
  print(" ".join(k))


main()

### FIXED CODE ###

def main():
  n=int(input())
  l=list(map(int,input().split()))
  k=[0]*n
  for i in range(1,n+1):
    k[l[i-1]-1]=str(i)
  print(" ".join(k))


if __name__ == '__main__':
    main()
### BUGGY CODE ###

import sys

import re
import math
import collections
import decimal
import bisect
import itertools
import fractions
import functools
import copy
import heapq
import decimal
import statistics
import queue

sys.setrecursionlimit(10000001)
INF = 10 ** 10
MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===


def main():
    h, n = ns()
    d = [na() for _ in range(n)]

    mat = [INF for _ in range(h + 1)]

    mat[0] = 0
    for i in range(h):
        if mat[i] == INF:
            continue
        for a, b in d:
            if i + a < h + 1:
                mat[i + a] = min(mat[i + a], mat[i] + b)
            else:
                mat[h] = min(mat[h], mat[i] + b)

    print(mat[h])


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys

# import re
# import math
# import collections
# import decimal
# import bisect
# import itertools
# import fractions
# import functools
# import copy
# import heapq
# import decimal
# import statistics
# import queue

sys.setrecursionlimit(10000001)
INF = 10 ** 10
MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===


def main():
    h, n = ns()
    d = [na() for _ in range(n)]

    mat = [INF for _ in range(h + 1)]

    mat[0] = 0
    for i in range(h):
        if mat[i] == INF:
            continue
        for a, b in d:
            if i + a < h + 1:
                mat[i + a] = min(mat[i + a], mat[i] + b)
            else:
                mat[h] = min(mat[h], mat[i] + b)

    print(mat[h])


if __name__ == '__main__':
    main()
### BUGGY CODE ###

# -*- coding: utf-8 -*-
"""
Created on Sun Feb 24 16:22:35 2019
 
@author: Owner
"""
 
N, K = map(int, input().split())
 
h = list(map(int, input().split()))
 
dp = []
 
for n in range(N):
    if n == 0:
        dp.append(0)
    else:
        temp = float("inf")
        for k in range(1,K+1):
            if n-k < 0:
                break
            temp = min(temp, dp[n-k] + abs(h[n]-h[n-k]))
        dp.append(temp)
    #print(dp)
print(dp[N-1])

### FIXED CODE ###

# -*- coding: utf-8 -*-

import numpy as np

N, K = map(int, input().split())
 
h = np.array(list(map(int, input().split())))
 
dp = np.zeros(N)
 
for n in range(1, N):
    k = min(K, n)
    temp = np.min(dp[n-k:n] + np.abs(h[n]-h[n-k:n]))
    dp[n] = temp
print(int(dp[-1]))
### BUGGY CODE ###

import sys
input = lambda: sys.stdin.readline().rstrip() 

def resolve():
    N, W = map(int, input().split())
    wv = [list(map(int, input().split())) for _ in range(N)]

    # dp[i][j]: 0〜(i-1)まで使ったときの重さjのときの価値の最大値
    dp = [[0]*(W+1) for i in range(N+1)]

    for i in range(1, N+1):
        for w in range(0, W+1):
            # i番目を入れられる場合
            if w - wv[i-1][0] >= 0:
                dp[i][w] = max(dp[i-1][w], dp[i-1][w-wv[i-1][0]] + wv[i-1][1])
            else:
                dp[i][w] = dp[i-1][w]

    print(max(dp[N]))

if __name__ == '__main__':
    resolve()


### FIXED CODE ###

import sys
input = lambda: sys.stdin.readline().rstrip() 

def resolve():
    N, W = map(int, input().split())
    wv = [list(map(int, input().split())) for _ in range(N)]

    # dp[i][j]: 0〜(i-1)まで使ったときの重さjのときの価値の最大値
    dp = [[0]*(W+1) for i in range(N+1)]

    for i in range(1, N+1):
        for w in range(0, W+1):
            # i番目を入れられる場合
            if w - wv[i-1][0] >= 0:
                dp[i][w] = max(dp[i-1][w], dp[i-1][w-wv[i-1][0]] + wv[i-1][1])
            else:
                dp[i][w] = dp[i-1][w]

    print(max(dp[N]))

if __name__ == '__main__':
    resolve()
### BUGGY CODE ###

def comb(n,k,p):
    from math import factorial
    if n<0 or k<0 or n<k: return 0
    if n==0 or k==0: return 1
    a=factorial(n) %p
    b=factorial(k) %p
    c=factorial(n-k) %p
    return (a*power_func(b,p-2,p)*power_func(c,p-2,p))%p
def power_func(a,b,p):
    if b==0: return 1
    if b%2==0:
        d=power_func(a,b//2,p)
        return d*d %p
    if b%2==1:
        return (a*power_func(a,b-1,p ))%p
def main():
    n, a, b = map(int, input().split())
    mod = 10**9+7
    print((pow(2,n,mod)-1-comb(n,a,mod)-comb(n,b,mod))%(10**9+7))

main()

### FIXED CODE ###

def main():
    n, a, b = map(int, input().split())
    mod = 10**9+7
    s = pow(2, n, mod)-1
    x = 1
    y = 1
    for i in range(1, b+1):
        x = x*(n-i+1)%mod
        y = y*i%mod
        if i==a or i==b:
            s -= x*pow(y, mod-2, mod)

    print(s%mod)

main()
### BUGGY CODE ###

s=input()
a=int(s)
b=0
if a==1:
  print(0)
else:
  for i in range(a):
    b+=i
  print(b)

### FIXED CODE ###

s=input()
a=int(s)
b=0
if a==1:
  print(0)
else:
  b=((a-1)*a)//2
  print(b)
### BUGGY CODE ###

import math
def get_prime(n):
    if n <= 1:
        return []
    prime = [2]
    if n > 2:
        limit = int(math.sqrt(n))
        odd = [i for i in range(3, n + 1, 2)]
        while limit >= odd[0]:
            prime.append(odd[0])
            odd = [j for j in odd if j % odd[0] != 0]
        prime += odd
    return prime

from collections import defaultdict
def prime_factorization(n):
    if n <= 1:
        return False
    else:
        # print(int(math.sqrt(n)))
        prime = get_prime(int(math.sqrt(n)))
        dct = defaultdict(int)
        for p in prime:
            while n % p == 0:
                dct[p] += 1
                n //= p
        if n != 1:
            dct[n] += 1
        dct = dict(dct)
        return dct


n = int(input())
select = []
for i in range(2, n):
    pf = prime_factorization(i)
    if len(pf) == 1:
        p, e = list(pf.keys())[0], list(pf.values())[0]
        z = p ** e
        if n % z == 0 and z not in select:
            select.append(z)
            n //= z
    if n == 1:
        break

print(len(select))

### FIXED CODE ###

import math
def get_prime(n):
    if n <= 1:
        return []
    prime = [2]
    if n > 2:
        limit = int(math.sqrt(n))
        odd = [i for i in range(3, n + 1, 2)]
        while limit >= odd[0]:
            prime.append(odd[0])
            odd = [j for j in odd if j % odd[0] != 0]
        prime += odd
    return prime

from collections import defaultdict
def prime_factorization(n):
    if n <= 1:
        return {}
    else:
        # print(int(math.sqrt(n)))
        prime = get_prime(int(math.sqrt(n)))
        dct = defaultdict(int)
        for p in prime:
            while n % p == 0:
                dct[p] += 1
                n //= p
        if n != 1:
            dct[n] += 1
        dct = dict(dct)
        return dct

n = int(input())
pf = prime_factorization(n)

Z = []
for k, v in pf.items():
    for i in range(1, v + 1):
        Z.append(k ** i)
Z.sort()
count = 0
for z in Z:
    if n % z == 0:
        count += 1
        n //= z
    if n == 1:
        break

print(count)
### BUGGY CODE ###

#134
N=int(input())
a=[int(input()) for i in range(N) ]
a_M=[]
for i in range(N):
    s=a[i]
    a[i]=0
    a_M.append( max(a) )
    a[i]=s
for x in a_M:
    print(x)

### FIXED CODE ###

#134
N=int(input())
a=[int(input()) for i in range(N) ]
a_M=[]
a_M1=sorted(a)[-1]
a_M2=sorted(a)[-2]
for i in range(N):
    if a[i]==a_M1:
        a_M.append(a_M2)
    else:
        a_M.append(a_M1)
for x in a_M:
    print(x)
### BUGGY CODE ###

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

flag=False
for i in range(0,N+1):
    for j in range(0,N+1):
        for k in range(0,N+1):
            if i+j+k == N and 10000*i+5000*j+1000*k==Y:
                print(i,j,k)
                flag=True
                break
        if flag==True:
            break
    if flag==True:
            break
     

else:
    print("-1 -1 -1")


### FIXED CODE ###

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

flag=False
for i in range(N+1):
    for j in range(N+1-i):    
        if 10000*i+5000*j+1000*(N-i-j)==Y:
            print(i,j,N-i-j)
            flag=True
            break

    if flag==True:
        break
     
else:
    print("-1 -1 -1")
### BUGGY CODE ###

n,k,q = (int(i) for i in input().split())
p =[k]*(n+1)
for i in range(q):
    v = int(input())
    for j in range(len(p)) :
      
      if j != v :
        p[j] -= 1 
        

for i in range(1,len(p)) :
  if 0 < p[i] :
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

n,k,q = (int(i) for i in input().split())
d = -q+k
p =[d]*(n+1)


for i in range(q):
    v = int(input())
    p[v] += 1


for i in range(1,len(p)) :
  if 0 < p[i] :
    print("Yes")
  else:
    print("No")