peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
N=int(input())

#S = [[0 for j in range(3)] for i in range(2)]　2行3列の場合
S = [[0 for j in range(2)] for i in range(N)]

for i in range(N):
    X,L=map(int,input().split())
    S[i][0]=X-L
    S[i][1]=X+L


T=sorted(S,key=lambda x:x[1])
#U=sorted(T,key=lambda x:x[1])
if N==1:
    print(1)
    exit()


count=1
last=T[0][1]
for i in range(1,N):
    if T[i][0]>=last:
        count+=1
        last=T[i][1]
print(count)
# Judge status: Wrong Answer
x,y = map(int, input().split())
if x==2 or y==2:
  print("No")
  exit()

if x==4 or x==6 or x==9 or x==11:
  if y==4 or y==6 or y==9 or y==11:
    print("Yes")
  else:
    print("No")
else:
    print("No")
# Judge status: Wrong Answer
n,k = map(int,input().split())
li = []
lia = [0]*(n-2)
for i in range(n):
    li.append(int(input()))
li.sort()
for i in range(n-2):
    lia[i] += li[i+2] - li[i]
print(min(lia))
# Judge status: Accepted
a,b,c,d = map(int,input().split())
A = c - a 
B = d - b 

ans = ''

ans +='R'*A + 'U'*B
ans +='L'*A + 'D'*B
ans +='L'+'U'*B+'U'+'R'*A +'R'+'D'
ans +='R'+'D'*B+'D'+'L'*A +'L'+'U'
print(ans)
# print('UURDDLLUUURRDRDDDLLU')
# Judge status: Wrong Answer
X = int(input())

for i in range(2,10**5):
    if i ** 5 - (i-1)**5 == X:
        print(i,i-1);exit()


for x in range(0,150):
    for y in range(-150,0):
        if x** 5 - y ** 5 == X:
            print(x,y);exit()
# Judge status: Accepted
# -*- coding: utf-8 -*-
import sys


s = input().strip()
#----------
words = s.split("/")
print( "/".join( ["2018"] + words[1:] ) )
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
answer = 1

for i in range(N):
    answer = answer * A[i]
    if answer > 10**18:
        print(-1)
print(answer)
# Judge status: Accepted


import numpy as np

a=np.array([[int(x) for x in input().split()]for y in range(3)],dtype=np.int64)
#print(a)
for i in range(3):
    for j in range(0,3):
        a[i][j]-=a[i][2]

#print(a)
for j in range(3):
    for i in range(1,3):
        if(a[i][j]!=a[0][j]):
            print("No")
            exit(0)
print("Yes")
# Judge status: Wrong Answer
N=int(input())
K=int(input())
X=int(input())
Y=int(input())

a=K*X
b = (N - K) * Y

print(a+b)
# Judge status: Accepted
S=input()
n=len(S)
A=[0]*(n+1)
for i in range(n):
    if(S[i]=='<'):
        A[i+1]=A[i]+1
for i in reversed(range(n)):
    if(S[i]=='>'):
        A[i]=max(A[i],A[i+1]+1)
print(sum(A))
# Judge status: Wrong Answer
x = int(input())

if x <= 30 :
   print('No')
else :
   print('Yes')
# Judge status: Accepted
s=input()
ans=len(s)-1
if s[ans]=="s":
    s+="es"
else:
    s+="s"
print(s)
# Judge status: Accepted
n = int(input())
s = sorted([sorted(list(input())) for _ in range(n)])

res = 0
cnt = 1
for i in range(n-1):
    if s[i] == s[i+1]:
        res += cnt
        cnt += 1
    else:
        cnt = 1

print(res)
# Judge status: Wrong Answer
num = input().split()
str = [input()]
strc = ''
print(str)
flg = 0
res = ''
for i in range(int(num[0])-1):
#	print(1)
	strc = input()
	for j in range(len(str)):
		if str[j] < strc:
			print(2)
			flg = 0
		else:
			print(3)
			flg = j
			break
		j += 1
	flg = -1
	if flg == 0:
		str.append(strc)
	else:
		str.insert(j,strc)
	print(str)
for x in str:
	res += x
print(res)
# Judge status: Accepted
x, a, b = map(int, input().split())

if abs(x-a) > abs(x-b):
    print('B')
else:
    print('A')
# Judge status: Wrong Answer
import sys
import itertools
import numpy as np

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

N = readline().decode().strip()
K = int(readline())
cnt = 0
ans = 0
for i in N:
    if i=='1':
        continue
    else:
        ans=i
        break

print(ans)
# Judge status: Wrong Answer
# 3:06
s = input()
if len(s) == 1:
    print(s)
elif s[0] == "1":
    print(len(s) * 9 - 9)
elif s[0] == "9":
    print(len(s) * 9)
else:
    print(len(s) * 9 - 9 + int(s[0]) - 1)
# Judge status: Accepted
# coding: utf-8
# Your code here!

N = int(input())

odd = 0
for i in range(1, N+1) : 
    if i%2 == 1 : 
        odd += 1

print(odd/N)
# Judge status: Wrong Answer
x = int(input())
a = 1
b = 1
while True:
    if type((a**5 - x) ** 0.2) == complex:
        if ((x - a**5) ** 0.2).is_integer():
            b = -int((x - a**5) ** 0.2)
            break
        a += 1
        continue
    elif ((a**5 - x) ** 0.2).is_integer():
        b = int((a**5 - x) ** 0.2)
        break
    a += 1
print('{} {}'.format(a, b))
# Judge status: Accepted
n = int(input())
zyusyo = list(map(int, input().split(" ")))

min_zyusho = min(zyusyo)
max_zyusyo = max(zyusyo)

ans = 10**9
for p in range(min_zyusho, max_zyusyo+1):
    sum = 0
    for z in zyusyo:
        sum += (z-p)**2
    if sum < ans:
        ans = sum

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

bi = [1, 2, 4, 8, 16, 32, 64]

a = [s]

for i in range(10000):

    n = a[i] 

    if n%2 == 0:
        a.append(n//2)
    else:
        a.append(3*n + 1)

    if a[i+1] in a[:i]:
        print(i+2)
        exit()

print(0)
# Judge status: Accepted
def main():
    a, b, x = map(int, input().split())

    result = False
    for i in range(0, b+1):
        if a + i == x:
            result = True
            break
    
    if result:
        print('YES')
    else:
        print('NO')


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
l = int(input())
x = list(map(int,input().split()))

c = max(x)
for i in range(len(x)):
    if c == x[i]:
        y = i
        
#print(y)
for i in range(1,l):
    x = list(map(int,input().split()))
    #print(y)
    x[y] = 0
    #print(x)
    z = max(x)
    c += z
    for k in range(len(x)):
        if z == x[k]:
            y = k
            break
    #print(z)

print(c)
# Judge status: Wrong Answer
"""
author : halo2halo
date : 16, Jan, 2020
"""

import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A, B, K = map(int, readline().split())
ans = 1
num = 1
for i in range(2, min(A, B) + 1):
    print(num)
    print(ans)
    if num == K:
        break
    if A % i == 0 and B % i == 0:
        print(ans)
        num += 1
        ans = i

print(ans)
# Judge status: Accepted
s=input()
x=s.count('a')
y=s.count('b')
z=s.count('c')
a=[x,y,z]
if len(s)==1:
  print('YES')
elif len(s)==2:
  if s[0]==s[1]:
    print('NO')
  else:
    print('YES')
else:
  if len(s)%3==0:
    if x==y and y==z:
      print('YES')
    else:
      print('NO')
  else:
    if max(a)-min(a)==1:
      print('YES')
    else:
      print('NO')
# Judge status: Accepted
import sys
import math
import itertools
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

n = L()
n = [int(k) for k in n]
if len(n) == 1:
    print(n[0])
else:
    print(max(sum(n),9*(len(n)-1)+n[0]-1))
# Judge status: Accepted
n = int(input())
a = [list(map(int,input().split())) for i in range(2)]
print(max([sum(a[0][:i+1])+sum(a[1][i:]) for i in range(n)]))
# Judge status: Accepted
n,m=map(int,input().split())
if n%2==1:
    #x=["{} {}".format(i+1,n-i) for i in range(m)]
    x=[f"{i+1} {n-i}" for i in range(m)]
    print(" ".join(x))
else:
    #x=["{} {}".format(i+1,n-i) if i<m/2 else "{} {}".format(i+1,n-i-1) for i in range(m)]
    x=[f"{i+1} {n-i}" if i<m/2 else f"{i+1} {n-i-1}" for i in range(m)]
    print(" ".join(x))
# Judge status: Accepted
from collections import Counter

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

Ac = sorted([i for i in c.keys() if c[i] >= 2], reverse=True)

if len(Ac) >= 2 and c[Ac[0]] >= 4:
    print(max(Ac[0] * Ac[1], Ac[0] * Ac[0]))
elif len(Ac) >= 2:
    print(Ac[0] * Ac[1])
elif len(Ac) == 1 and c[Ac[0]] >= 4:
    print(Ac[0] * Ac[0])
else:
    print(0)
# Judge status: Accepted
x=int(input())
for a in range(999):
  for b in range(-999,999):
    if a**5-b**5==x:
      print(a,b)
      exit()
# Judge status: Accepted
n = int(input())
ans = (n*(n-1))//2
print(ans)
# Judge status: Accepted
moji_arr = input()

first = moji_arr.split()[0]
second = moji_arr.split()[1]

num = input()
num_arr = list(map(int, num.split()))

u = input()

if u==first:
    num_arr[0] = num_arr[0] - 1
elif u==second:
    num_arr[1] = num_arr[1] - 1

print(num_arr[0], num_arr[1])
# Judge status: Accepted
n, x = map(int, input().split())
l = list(map(int, input().split()))

y = 0
if l[0] > x:
    w = l[0] - x
    y += w
    l[0] -= w

for i in range(n-1):
    if l[i] + l[i+1] > x:
        z = l[i+1] + l[i] - x
        y += z
        l[i+1] -= z

print(y)
# Judge status: Wrong Answer
N = input()
A = list(map(int, input().split()))

num = -(-sum(A) // len(A))
cost = [(a - num)**2 for a in A]

print(sum(cost))
# Judge status: Accepted
a,b,k=map(int,input().split())
if k>=a+b:
    print("0 0")
elif k>=a:
    print("0 {0}".format(b-(k-a)))
else:
    print("{0} {1}".format(a-k,b))
# Judge status: Wrong Answer
N = int(input())

ans = 0
for  i in range(1, N + 1):
    ans += i * ((N // i) * ((N // i) + 1))/2

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

over = 1
eq = 0

for n in map(int, N):
    o = min(eq + n + 1, over + (10 - n) - 1)
    e = min(eq + n, over + (10 - n))

    over = o
    eq = e

print(eq)
# Judge status: Accepted
N = int(input())

k = 10
ans = 0
if N % 2 != 0:
    ans = 0
else:
    while k <= N:
        ans += N // k
        k *= 5

print(ans)
# Judge status: Accepted
T = input()
s = T.replace("?","D")
print(s)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))

mod=10**9+7
import numpy as np

cum=[]

prev=0
for i in range(n):
    tmp = prev%mod +a[i]%mod
    cum.append(tmp)
    prev = cum[-1]


ans=0
for i in range(n-1):
    p=a[i]
    t = cum[-1] - cum[i]

    ans+=(p*t)%mod

print(ans%mod)
# Judge status: Wrong Answer
s = input()
flag = False
r = "keyence"
for i in range(len(s)):
  #print(s[:i+1], r[:i+1])
  #print(s[i+1:], r[i+1:])
  if s[:i+1].find(r[:i+1])!=-1 and s[i+1:].find(r[i+1:])!=-1:
    flag = True
    break
if flag:
  print("YES")
else:
  print("NO")
# Judge status: Accepted
def main():
  num = list(map(int,input().split()))
  if num[0]+num[1]+num[2]<22:
    print('win')
  else:
      print('bust')
main()
# Judge status: Wrong Answer
import re
S = input()
if re.match("^(dreamer|dream|erase|eraser)+$", S):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import math
k = int(input())
ans = 0
for i in range(1, k + 1):
    for j in range(1, k + 1):
        a = math.gcd(i, j)
        for k in range(1, k + 1):
            ans += math.gcd(a, k)
print(ans)
# Judge status: Accepted
N, K = map(int,input().split())
R, S, P = map(int,input().split())
T = input()
ans = 0
check = [0] * N
for i in range(N):
  j = T[i]
  if i >= K:
    if j == check[i-K]: continue
  if j == "r": ans += P
  elif j == "s": ans += R
  else: ans += S
  check[i] = j
 
print(ans)
# Judge status: Accepted
a,b = map(str,input().split())
import math
c = int(a+b)
k = math.sqrt(c)
if k == -(-k//1):
    print("Yes")
else:
    print('No')
# Judge status: Wrong Answer
weathers = ['Sunny', 'Cloudy', 'Rainy' ]
s = str(input())
t = weathers.index(s)
print(weathers[2-t])
# Judge status: Accepted
s=input()
t=input()
ans=""
for i in range(max(len(s),len(t))):
  if i < len(s):
    ans += s[i]
  if i < len(t):
    ans += t[i]
print(ans)
# Judge status: Wrong Answer
N,M,K=map(int,input().split())
for i in range(N+1):
    for j in range(M+1):
        if (N-j)*i+(M-i)*j==K:
            print("Yes")
            exit()
else:
    print("No")
# Judge status: Accepted
N,K = map(int,input().split(" "))
Min = N 
while(Min%K<Min):
    Min=Min%K
if abs(Min-K) > Min:
    print(Min)
else:
    print(abs(Min-K))
# Judge status: Accepted
A, V = list(map(int, input().split()))
B, W = list(map(int, input().split()))
T = int(input())

if V > W and T >= (abs(A - B) / abs(V - W)):
    print('YES')
else:
    print('NO')
# Judge status: Accepted
s=str(input())
d=True
for i in range(3):
  if s[i+1]==s[i]:
    d=False
    
if d:
  print("Good")
else:
  print("Bad")
# Judge status: Accepted
N = int(input())

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

ans = 0
for i in range(len(A)-1):
    if B[i] >= A[i]:
        ans += A[i]
        if A[i+1] > B[i]-A[i]:
            A[i+1] -= B[i]-A[i]

            ans += B[i] - A[i]
        else:
            ans += A[i+1]
            A[i+1] = 0        
    else:
        ans += B[i]
print(ans)
# Judge status: Accepted
a, b = map(str,input().split())
c = int(a + b)
t = 2
while(t**2 <= c):
    if t**2 == c:
        print("Yes")
        quit()
    t += 1
print("No")
# Judge status: Wrong Answer
from itertools import permutations

N = int(input())
P = list(map(int, input().split()))
S = list(map(int, input().split()))
J = list(permutations(sorted(S) , N))

print(J.index(tuple(P)) - J.index(tuple(S)))
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    a,b,x=map(int, input().split())
    if a!=0:
        amade=(a-1)//x
        bmade=b//x
        print(bmade-amade)
    else:
        print(b//x+1)
resolve()
# Judge status: Wrong Answer
x,y = map(int,input().split())

ans = 0
while True:
    if x < y:
        ans += 1
        x *= 2
    else:
        break
print(ans)
# Judge status: Wrong Answer
import math
a,b,x=map(int,input().split())
if a*b**2>=2*x:
    print(math.degrees(math.atan(a*b**2/(2*x))))
elif x==0:
    print(90)
else:
    print(math.degrees(math.atan((2*b/a)-(2*x/(a**3)))))
# Judge status: Wrong Answer
A,B,C,D = map (int, input ().split ())
if A < C:
  X = C
else:
  X = A
if B < D:
  Y = B
else:
  Y = D
print (Y-X)
# Judge status: Accepted
import bisect
from collections import deque

n = int(input())
A = []
dq_A = deque(A)
count = 0
for _ in range(n):
    a = int(input())
    if len(dq_A) == 0:
        dq_A.appendleft(a)
        count += 1
        continue
    i = bisect.bisect_left(dq_A, a)
    if i == 0:
        dq_A.appendleft(a)
        count += 1
    else:
        dq_A[i-1] = a

ans = count
print(ans)
# Judge status: Accepted
#!/usr/bin/env python
# coding: utf-8

# In[16]:


S = int(input())


# In[17]:


x1 = 0; y1 = 0
if S <= 10**9:
    x2 = S; y2 = 0
    x3 = 0; y3 = 1
else:
    x2 = 10**9; y2 = 1
    mod = 10**9
    x3 = (mod - S%mod)%mod
    y3 = (S+x3)//mod
print(x1,y1,x2,y2,x3,y3)


# In[ ]:
# Judge status: Wrong Answer
N, M = map(int, input().split())
a = sorted(list(map(int, input().split())), reverse=True)
b = 0

for i in range(M):
    if a[i] >= sum(a)//(M*4)+1:
        b += 1

if b == M:
    print('Yes')
elif b < M:
    print('No')
# Judge status: Accepted
n=int(input())
print(n+(n*n)+(n*n*n))
# Judge status: Accepted
a,b,c=map(int,sorted(list(map(int,input().split()))))
cnt=0
while True:
  if a==b==c:break
  elif a==b:
    cnt+=c-a
    break
  else:
    a,b,c=map(int,sorted([a+2,b,c]))
    cnt+=1
print(cnt)
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')


def resolve():
    s = int(input())
    x0, y0 = 0, 0
    if s % (10 ** 9) == 0:
        x1, y1 = 10 ** 9, 0
    else:
        x1, y1 = 10 ** 9, 1

    y2 = (s + x1 - 1) // x1
    x2 = 10 ** 9 - s % x1
    print(x0, y0, x1, y1, x2, y2)
    # print(s - abs(x1 * y2 - x2 * y1))


if __name__ == '__main__':
    resolve()
# Judge status: Accepted
#!/usr/bin/env python3

def main():
    S = input()
    S_o = [S[i] for i in range(0, len(S)) if i % 2 == 0]
    S_e = [S[i] for i in range(0, len(S)) if not i % 2 == 0]
    if S_o.count('L') > 0:
        print('No')
    elif S_e.count('R') > 0:
        print('No')
    else:
        print('Yes')


main()
# Judge status: Accepted
url = "https://atcoder.jp/contests/abc081/tasks/arc086_a"
import copy
def main():
    n, m = list(map(int, input().split()))
    li = list(map(int, input().split()))
    dic = {}

    for v in li:
        dic.setdefault(v, 0)
        dic[v] += 1

    if len(dic) <= m:
        print(0)
        exit()

    count = 0
    vals = sorted(list(dic.values()), reverse=True)
    for i in range(len(dic) - m):
        count += vals.pop(-1)



    print(count)

if __name__ == '__main__':
    main()
# Judge status: Accepted

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

num = [0] * n
flag = 1
if m == 0:
    if n == 1:
        print(0)
        exit()
num[0] = 1
for i in range(m):
    s, c = map(int, input().split())
    if num[s - 1] == 0 or (s - 1 == 0 and num[0] == 1):
        num[s - 1] = c
    else:
        if num[s - 1] != c:
            flag = 0
    
if flag == 0 or (n != 1 and num[0] == 0):
    print(-1)
else:
    for i in range(n):
        print(num[i], end="")
# Judge status: Accepted
x = int(input())

n = x // 100
if 100 * n <= x <= 105 * n:
    print('1')
else:
    print('0')
# Judge status: Accepted
N, M = map(int, input().split())
H = list(map(int, input().split()))
dai = [list(map(int, input().split())) for i in range(M)]
plus = [i for i in range(N)]


for a, b in dai:
    if H[a - 1] > H[b - 1]:
        plus[b-1] = -1
        continue
    else:
        plus[a-1] = -1
    if H[b - 1] > H[a - 1]:
        plus[a-1] = -1
        continue
    else:
        plus[b-1] = -1
print(len(set(plus))-1)
# Judge status: Accepted
S=input()
K=int(input())
ans=0
for i in range(len(S)):
  a=int(S[i])
  if a==1:
    ans+=1
  else:
    print(a)
    break
  if ans>=K:
    print(a)
    break
# Judge status: Wrong Answer
N,K=map(int,input().split())
b=0
c=0
ans=0

for i in range(0,K):
    b+=i
    c+=(N-1-i)
ans=c-b
    
for i in range(K,N+1):
    ans+=(c+i)-(b+(N-i))
    
print(ans%(10**9+7))
# Judge status: Wrong Answer
n = int(input())
s = list(map(str,input()))
count = 0
for i in range(n):
  if s[i] == "E":
    count += 1
box = [0]*n
if s[0] == "E":
  box[0] = count - 1
else:
  box[0] = count
for j in range(1,n):
  if s[j] == "E":
    count -= 1
  if s[j - 1] == "W":
    count += 1
  box[j] = count
print(min(box))
# Judge status: Accepted
n = int(input())
an = list(map(int,input().split()))
zyunban = [0]*n
t = 1

for x in an:
  zyunban[x-1] = t
  t += 1
  


zyunban = list(map(str,zyunban))

print(" ".join(zyunban))
# Judge status: Accepted
import bisect

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

T = [0]*N
for i in range(N):
    T[i] = int(input())
T.sort()


#print(T)

ans = 0
left = 0
while True:
    if left >= N:
        break
    #print("T[left]",T[left])
    ind = bisect.bisect_right(T, T[left]+K)
    #print("ind",ind)
    left = min(ind, left+C)
    ans += 1
    #print("left",left)
    #print('&&&&&&&&&&&&&&&&&&')
    
print(ans)
# Judge status: Accepted
a, b = map(str, input().split())

print(b + a)
# Judge status: Accepted
A = sorted(map(int, input().split()))

x = 0

while A[0] < A[2] - 1:
    A[0] += 2
    x += 1

while A[1] < A[2] - 1:
    A[1] += 2
    x += 1

if A[0] == A[1] == A[2]:
    x = x

elif A[0] == A[1]:
    x = x + 1

else:
    x = x + 2

print(x)
# Judge status: Wrong Answer
n = int(input())

for i in range(n//4):
  for j in range(n//7):
    if (4*(i+1))+(7*(j+1)) == n:
      print("Yes")
      exit()

print("No")
# Judge status: Wrong Answer
k=int(input())
print((k+1)//2*k//2)
# Judge status: Accepted
# 初期入力
import sys
input = sys.stdin.readline
L,R,d = (int(i) for i in input().split())
count_L =0
count_R =0
for i in range(1,101):
    if i*d <L:
        count_L +=1
    
    if i*d <=R:
        count_R +=1
ans =count_R -count_L
print(ans)
# Judge status: Accepted
#input
H, N = map(int, input().split())
A = [0]*N
B = [0]*N
for i in range(N):
    A[i], B[i] = map(int, input().split())

#output
M = max(A)
inf = 10**10
dp = [inf]*(H+(M+1))
dp[0] = 0
for i in range(N):
    for j in range(A[i], H+M):
        dp[j] = min(dp[j], dp[j-A[i]] + B[i])

answer = min(dp[H:(H+M+1)])
print(answer)
# Judge status: Wrong Answer
a=int(input())
b=list(map(int,input().split()))
c=sum(b)
d=0
e=0
f=0
for i in range(a):
  d=d+b[i]
  if d>=c/2:
    e=i
    break
for i in range(e):
  f=f+b[e]
if d-(c-d)<f-(c-f):
  print(d-(c-d))
else:
  print(f-(c-f))
# Judge status: Accepted
n, k, q = map(int, input().split())
a = [0] * n
for i in range(q):
    a[int(input()) - 1] += 1
for i in range(n):
    if a[i] > q - k:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
import re
print("YES" if re.match("^(dream|dreamer|erase|eraser)+$",input()) else "NO")
# Judge status: Wrong Answer
sx, sy, tx, ty = map(int, input().split())

len_x = tx - sx
len_y = ty - sy

ans = []
for _ in range(len_x):
    ans.append("R")
for _ in range(len_y):
    ans.append("U")
for _ in range(len_x):
    ans.append("L")
for _ in range(len_y):
    ans.append("D")
    
ans.append("D")
for _ in range(len_x + 1):
    ans.append("R")
for _ in range(len_y + 2):
    ans.append("U")
for _ in range(len_x + 2):
    ans.append("L")
for _ in range(len_y + 1):
    ans.append("D")
ans.append("R")

print("".join(ans))
# Judge status: Wrong Answer
import math
s = int(input())
if s <= 2:
    print(0)
    exit()
ans = 1


def c(_n, _r):
    return math.factorial(_n) / (math.factorial(_r) * math.factorial(_n - _r))


for i in range(2, (s//3)+1):
    n = s-i*3
    r = i
    if n < r:
        for j in range(1, n+1):
            ans += c(r, j)
    else:
        ans += c(n+1, r-1)
    ans %= 10**9+7
print(int(ans))
# Judge status: Accepted
a = int(input())
s = input()
if (a >= 3200):
    print(s)
else:
    print("red")
# Judge status: Wrong Answer
print(sum(map(int, input().split(' '))))
# Judge status: Accepted
K, S = map(int, input().split())

ans = 0
for i in range(K + 1):
  for j in range(K + 1):
    if i + j == S:
      ans += 1
    elif 0 <= S - (i + j) <= K:
      ans += 1
print(ans)
# Judge status: Wrong Answer
a, b = map(int, input().split())

if a<10 & b<10:
    print(a*b)
else:
    print("-1")
# Judge status: Wrong Answer
a, b, k = map(int, input().split())
if (a, b) == (0, 0):
    print(0, 0)
    exit(0)
if a - k < 0:
    print(0, b - (k-a))
else:
    print(a-k, b)
# Judge status: Wrong Answer
N, R = list(map(int, input().split()))

if(N>=10):
  print(R)
else:
  print(R - 100*(10-N))
# Judge status: Accepted
s = input()[::-1]
word = ["dream", "dreamer", "erase", "eraser"]
dream = "dream"[::-1]
dreamer = "dreamer"[::-1]
erase = "erase"[::-1]
eraser = "eraser"[::-1]
while True:
    if s[:5] == dream or s[:5] == erase:
        s = s[5:]
        continue
    elif s[:6] == eraser:
        s = s[6:]
        continue
    elif s[:7] == dreamer:
        s = s[7:]
        continue
    break
if len(s) == 0:
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
w = list(input())
count_w = list(set(w))

n = 0
for i in range(len(count_w)):
  n += w.count(count_w[i])

print("Yes" if n % 2 == 0 else "No")
# Judge status: Wrong Answer
x,a,b = map(int,input().split())
if abs(x-a) >= abs(x-b):
  print('A')
else:
  print('B')
# Judge status: Accepted
import numpy as np
n = int(input())
S = [input() for i in range(n)]
mat = [[0 for i in range(26)] for j in range(n)]
mat = np.array(mat)
for i in range(n):
	Sp = S[i]
	for j in range(len(Sp)):
		mat[i][ord(Sp[j])-97] += 1
result = ''
for i in range(26):
	Cnt = min(mat[:,i])
	for j in range(Cnt):
		result += chr(i+97)
print(result)
# Judge status: Accepted
#abc097 b bekijousu
import math

def large_num(n):
    xx=x/n
    p=1
    while xx-n**p>=0:
        p+=1
    if p==1:
        return 0
    else:
        return n**p

x=int(input())
b_last=int(math.sqrt(1000))
num=[i for i in range(2,b_last+1)]

ans=0


if 4>x:
    ans=1
else:
    for i in num:
        ans=max(large_num(i),ans)
print(ans)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if (a+2*b)>=c:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
n,k=map(int,input().split())
p=list(map(int,input().split()))
maxim=0

for i in range(n-k):
    if p[i]<=p[i+k]:
        maxim=i+1

ans=(sum(p[maxim:maxim+k])+k)/2
print(ans)
# Judge status: Accepted
n=int(input())

s=input()

if s[0:n//2] == s[n//2:n]:
    print("Yes")
    
else:
    print("No")
# Judge status: Wrong Answer
S = list(input())
l = len(S)
 
slist = [int(''.join(S[i:j])) for i in range(l-3) for j in range(i+4,l)]
 
cnt = sum([1 for s in slist if s%2019==0])
    
print(cnt)