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

A=list(map(int, input().split()))
nons=[]
twos=[]
fours=[]
for a in A:
    if a%4==0:
        fours.append(a)
    elif a%2==0:
        twos.append(a)
    else:
        nons.append(a)

#print(fours, twos, nons)
if len(twos)==0 and len(fours)+1==len(nons):
    print("Yes")
elif len(fours)>=len(nons):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
a=int(input())
print(["NO","YES"][a==3 or a==5 or a==7])
# Judge status: Accepted
N,M = map(int,input().split())

if M <= N * 2:
    print(M // 2)
    exit()

ans = N
M -= N*2

ans += M//4

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

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print('Possible')
else:
    print('Impossible')
# Judge status: Accepted
n,w=map(int,input().split())
from copy import copy
a=[0]*(w+1)
for i in range(n):
    b=copy(a)
    x,y=map(int,input().split())
    for j in range(min(x,w),w+1):
        b[j]=max(a[j-x]+y,a[j])
    a=copy(b)
print(max(a))
# Judge status: Accepted
N, M = map(int, input().split())

print(N * (N - 1) // 2 + M * (M - 1) // 2)
# Judge status: Accepted
n = int(input())
for i in range(50001):
  if int(i * 1.08) == n:
    print(i)
    exit()
print(":(")
# Judge status: Accepted
n = int(input())
nums = list(map(int, input().split()))
x = nums[0]
y = sum(nums[1:])
ans = abs(x - y)
for i in range(1, n - 1):
    x += nums[i]
    y -= nums[i]
    ans = min(ans, abs(x - y))
print(ans)
# Judge status: Accepted
#!/usr/bin/env python3

a = int(input())
b = int(input())
h = int(input())
print((a+b)*h//2)
# Judge status: Accepted
N = int(input())
D = sorted(map(int, input().split()))
print(0 if D[N//2]==D[N//2-1] else D[N//2]-D[N//2-1])
# Judge status: Wrong Answer
import numpy as np

n, k= map(int, input().split())
a = input().split()
npa=np.array(a, dtype=int)
npb=np.zeros(n, dtype=int)

for j in range(0,n):
    js=j-((k-1)+npa[j])
    je=j+((k-1)+npa[j])
    if (js <=0): js=0
    if (je >=n-1): je=n-1
    print (js,je)
    npb[js:je+1]+=1

print (*npb)
# Judge status: Accepted
def main():
    x = int(input())

    q, r = divmod(x, 11)
    ans = q * 2
    if r == 0:
        pass  # 忘れていた
    elif r <= 6:
        ans += 1
    else:
        ans += 2
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
N = int(input())
A = [int(s) for s in input().split(' ')]
B = [int(s2) for s2 in input().split(' ')]
C = [int(s3) for s3 in input().split(' ')]

satis = 0

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

satis += sum(B)

print(satis)
# Judge status: Accepted
Q, H, S, D = map(int, input().split())
N = int(input())

cQ = Q*8
cH = H*4
cS = S*2
cD = D 

m = min(cQ, cH, cS, cD)

if m == cQ:
    print(Q * N * 4)
elif m == cH:
    print(H * N * 2)
elif m == cS:
    print(S * N)
else:
    if N % 2 == 0:
        print(D * N // 2)
    elif N == 1:
        print(min(Q * 4, H * 2, S))
    else:
        c = (N-1) // 2 * D
        print(c + min(Q * 4, H * 2, S))
# Judge status: Accepted
S = input()

ans = S[0:3]
print(ans)
# Judge status: Accepted
N = int(input())

lst = []
for i in range(N):
  N, K = map(int, input().split())
  lst.append((K-N, N, K))

lst.sort(key=lambda tup: tup[2])
count = 0
for ind, x in enumerate(lst):
  if count > x[0]:
    print("No")
    exit()
  count += x[1]

print("Yes")
# Judge status: Accepted
a, b, x = list(map(int, input().split()))

if a % x == 0:
    print(b // x - a // x + 1)
else:
	print(b // x - a // x)
# Judge status: Accepted
w, h, n = map(int,input().split())

y_min = 0
y_max = h

x_min = 0
x_max = w

for i in range(n):
  x, y, a = map(int,input().split())

  if a == 1:
    x_min = max(x_min, x)

  if a == 2:
    x_max = min(x_max, x)

  if a == 3:
    y_min = max(y_min, y)

  if a == 4:
    y_max = min(y_max, y)

white = (y_max - y_min) * (x_max - x_min)
if (y_max - y_min)>=0 and (x_max - x_min)>=0:
  print(max(white, 0))
else:
  print(0)
# Judge status: Accepted
a, b = map(int, input().split())
X = b - a
ans = 0
for i in range(X):
    ans += i
print(ans-a)
# Judge status: Accepted

a, b, c = map(int,input().split())
k = int(input())
cnt_b = 0
cnt_c = 0

while b <= a:
    b = b * 2
    cnt_b += 1
    if b > a:
        break
while c <= b:
    c = c * 2
    cnt_c += 1
    if c > b:
        break
if cnt_b + cnt_c <= k:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
def divsor(num):
  count=0
  for i in range(1,num+1):
    if num%i==0:
      count+=1
  return count

n=int(input())

if(n<=105):
  if(n==105):
    print(1)
  elif(n<105):
    print(0)
res=1
for i in range(106,n+1):
  if(divsor(i)==8 and i%2==1):
    res+=1
  print(res)
# Judge status: Accepted
N=input()
n=len(N)
x=0
flag=0
#print(N)
M=[0]*(n+1)
for i in range(n):
  M[i]=int(N[n-1-i])
#print(M)
for i in range(n+1):
  
  m=M[i]
  if m==5:
    x+=5
    flag=1
  elif m<5:
    x+=m
    flag=0
  else:
    x+=(10-m)
    flag=2
  if flag==2:
    M[i+1]+=1
  elif flag==1:
    if M[i+1]>=5:
      M[i+1]+=1
print(x)
# Judge status: Accepted
for i in range(365):
  print(26-i%26)
# Judge status: Accepted
a, b, c = map(int, input().split())
import math
if a + b >= c:
    print('No')
else:
    if a * b * 4 < (c - a - b) ** 2:
        print('Yes')
    else:
        print('No')
# Judge status: Accepted
N=int(input())
*D,=map(int,input().split())

for i in range(N):
    D[i]=(D[i],i)
D=sorted(D)
print(D[N//2][0]-D[N//2-1][0])
# Judge status: Accepted
# ABC065_B
S = str(input())
N = len(S)

for i in range(1,N+1):
    T = S[0:-i]
    M = N-i
    if M % 2 == 1:
        pass
    elif T[0:(M//2)] != T[(M//2):M]:
        pass
    else:
        print(N-i)
        break
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
print(a*b/2)
# Judge status: Accepted
a,b,c=input()

if a!=b and b!=c and c!=a:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
a,b,t=map(int,input().split())
print(((t+0.5)//a)*b)
# Judge status: Accepted
import math
def ints():
  return [int(x) for x in input().split()]
def ii():
  return int(input())

a, b, x = ints()
x /= a

if x>=a*b/2:
  space = a*b - x
  theta = math.atan(2*space/a**2)
else:
  theta = math.atan(b/(2*x/b))
  
print(theta*180/math.pi)
# Judge status: Wrong Answer
import numpy as np
n = int(input())
X = []
L = []
for _ in range(n):
    x,l = map(int,input().split())
    X.append(x)
    L.append(l)
add = np.array(X)+np.array(L)
sub = np.array(X)-np.array(L)

cnt = 0
for i in range(n-1):
    if add[i]>sub[i+1]:
        cnt+=1
        add[i+1]=add[i]
        sub[i+1]=sub[i]
print(n-cnt)
# Judge status: Accepted
n = int(input())


def div(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors


ans = 0
for i in range(1, n+1):
    k = n//i
    if 1 < k:
        ans += i*k*(k+1)//2
    else:
        ans += (n+i)*(n-i+1)//2
        break

print(ans)
# Judge status: Accepted
N,K = map(int,input().split())

if N >= K :
    t = N%K
    ans = min(t,K-t)
else:
    ans = min(N,K-N)
    
print(ans)
# Judge status: Accepted
c = str(input())

if c == 'a' or c == 'e' or c == 'i' or c == 'o' or c == 'u':
    print('vowel')
else:
    print('consonant')
# Judge status: Accepted
n = int(input())
a = 0
c = 0
while(True):
  a+=n
  c+=1
  if(a%360 == 0):
    print(c)
    break
# Judge status: Accepted
members_count = int(input())

belong_map = {}

belongings = [int(x) for x in input().split(' ')]

for b in belongings:
    if b - 1 in belong_map:
        belong_map[b - 1] += 1
    else:
        belong_map[b - 1] = 1

for i in range(members_count):
    if i in belong_map:
        print(belong_map[i])
    else:
        print(0)
# Judge status: Accepted
X = int(input())

time = 0
pos = 0
while pos < X:
    time += 1
    pos += time

print(time)
# Judge status: Wrong Answer
D,T,S=[int(x) for x in input().split()]
if D//S<=T:
  print("yes")
else:
  print("No")
# Judge status: Wrong Answer
import collections
a = int(input())
l = []
for i in range(a):
    l.append(input())
counted = collections.Counter(l)
 
# 最頻値を求める
m = max(counted.values())
 
# 頻出数の文字を集める
chars = [key for key, value in counted.items()
             if value == m]
 
for i in chars:
    print(i)
# Judge status: Wrong Answer
N=int(input())
S=input()
alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans=''
for i in range(len(S)):
    ans=ans+alphabet[(alphabet.find(S[i])+N)%26]
# Judge status: Accepted
a,b=map(int,input().split())
n=b-a
print(n*(n-1)//2-a)
# Judge status: Wrong Answer
from random import*;print(randint(0,5))
# Judge status: Accepted
a,b,c=map(int,input().split())
if b-a==c-b:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
import collections
S=sorted(str(input()))
#print(*S)
A=[]
L = collections.Counter(S)
values, counts = zip(*L.most_common())
for i in range(len(values)):
  A.append(values[i])
A.sort()

x=0
for i in range(len(A)):
  if ord(A[i])!=i+97:
    x=i+97
    break
if x!=0:
  print(chr(i+97))    
else:
  if len(A)==25:
    print("z")
  else:
    print("None")
# Judge status: Accepted
x, y = map(int, input().split())
list1 = [1,3,5,7,8,10,12,4,6,9,11,2]
list2 = [0,0,0,0,0,0,0,1,1,1,1,2]
d = dict(zip(list1, list2))
if d[x] == d[y]:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
N = int(input())
print(N*(N+1)//2)
# Judge status: Accepted
k,n = map(int,input().split())
a = list(map(int,input().split()))
M = 0
for i in range(n-1):
    M = max(M,a[i+1]-a[i])
M = max(M,a[0]+k-a[n-1])
print(k-M)
# Judge status: Wrong Answer
w,a,b=map(int,input().split())
minu=min(a,b)
maxi=max(a,b)
print(maxi-(minu+w) if maxi-(minu-w)>0 else 0)
# Judge status: Accepted
K=int(input())
a=[0]*1000001
a[1]=7%K
for i in range(2,K+1):
  a[i]=(a[i-1]*10+7)%K
for i in range(1,K+1):
  if a[i]==0:
    print(i)
    exit()
print(-1)
# Judge status: Accepted
a,b,k=map(int,input().split())
r1=[i for i in range(a,min(b+1,a+k))]
r2=[i for i in range(max(a,b-k+1),b+1)]
r1.extend(r2)
result=set(r1)
for i in sorted(result):
    print(i)
# Judge status: Accepted
import sys
input = sys.stdin.readline

def main():
    n = int(input())

    for i in range(n+1):
        if i * (i+1) / 2 >= n:
            print(i)
            return

main()
# Judge status: Accepted
a, b = map(int, input().split())
print("Yay!" if a <= 8 and b <= 8 else ":(")
# Judge status: Accepted
from math import ceil
def solve():
    N, K = map(int,input().split())
    A = list(map(int,input().split()))

    left = 0
    right = 10 ** 9
    while (right - left) > 1:
        x = (left+right) // 2
        cnt = 0
        for a in A:
            cnt += (a-1) // x
        
        if cnt <= K:
            right = x
        else:
            left = x
    
    print(right)
    
if __name__ == '__main__':
    solve()
# Judge status: Accepted
import sys

s = sorted(input())
for c in list('abcdefghijklmnopqrstuvwxyz'):
    if not c in s:
        print(c)
        sys.exit()

print('None')
# Judge status: Accepted
import bisect

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

ans = 0
C = len(c)

# Bを中心に考える
for i in b:
    ans += (bisect.bisect_right(a,i-1))*(C-bisect.bisect_left(c,i+1))

print(ans)
# Judge status: Accepted
n, k = map(int, input().split())
b = [0]*n
for _ in range(k):
  a = int(input())
  c = list(map(int, input().split()))
  for i in c:
    b[i-1] = 1  
print(b.count(0))
# Judge status: Accepted
from collections import deque
n = deque(list(input()))
digit = n.popleft()
cnt = 1
while n:
    if cnt == 3:
        break
    d = n.popleft()
    if d == digit:
        cnt += 1
    else:
        digit = d
        cnt = 1

if cnt == 3:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
c = [list(map(int, input().split())) for _ in range(3)]

diff0 = [x - y for x, y in zip(c[0], c[1])]
diff1 = [x - y for x, y in zip(c[0], c[2])]

if diff0[0] == diff0[1] and diff0[0] == diff0[2] and diff1[0] == diff1[1] and diff1[0] == diff1[2]:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
Input1 = list(map(int,input().split()))
H = Input1[0]
A = Input1[1]

import math
Ans = math.ceil(H / A)

print(Ans)
# Judge status: Accepted
a,b=map(int,input().split())
print(max(a+(a-1),a+b,b+(b-1)))
# Judge status: Accepted
n = int(input())
d = list(map(int,input().split()))
d.sort()
index =n//2-1
print(d[index+1]-d[index])
# Judge status: Accepted
import heapq as hq
N,M=list(map(int, input().split()))
A=list(map(int, input().split()))
B=[(-1)*A[i] for i in range(N)]
B.sort()
for _ in range(M):
  a=hq.heappop(B)
  a=((a*(-1))//2)*(-1)
  hq.heappush(B,a)
C=[-B[i] for i in range(N)]
print(sum(C))
# Judge status: Accepted
n, k = [int(i) for i in input().split(" ")]
d = []
ans = [i for i in range(1, n + 1)]
for i in range(k):
    d.append(int(input()))
    A = [int(i) for i in input().split(" ")]
    for delete in A:
        if delete in ans:
            ans.remove(delete)
print(len(ans))
# Judge status: Accepted
A, B = map(int, input().split())
S = input()
if S[:A].isdigit() and S[A] == '-' and S[A+1:].isdigit() and len(S) == A+B+1:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
rate = int(input())
if ( rate >= 400 ) and ( rate < 600 ):
	print ("8")
elif(rate >= 600 and rate < 800 ):
	print ("7")
elif(rate >= 800 and rate < 1000 ):
	print ("6")
elif(rate >= 1000 and rate < 1200 ):
	print ("5")
elif(rate >= 1200 and rate < 1400 ):
	print ("4")
elif(rate >= 1400 and rate < 1600 ):
	print ("3")
elif(rate >= 1600 and rate < 1800 ):
	print ("2")
elif(rate >= 1800 and rate < 2000 ):
	print ("1")
# Judge status: Accepted
A,B,C,X,Y=map(int,input().split())
ans=5000*(10**5)*2+1

for i in range(max(X,Y)+1):
  total=0
  total=2*C*i+A*max(X-i,0)+B*max(Y-i,0)
  if ans>=total:
    ans=total
print(ans)
# Judge status: Accepted
n = int(input())
arr = list(map(int, input().split()))

prefXor = [arr[0]]
for i in arr[1:]:
	prefXor += [prefXor[-1] ^ i]

out = []
for i in range(n):
	out += [prefXor[-1] ^ arr[i]]

print(*out)
# Judge status: Accepted
a,b=map(int,input().split())
cnt=1
res=0
while 1:
  if cnt >= b:
    break
  cnt += a - 1
  res+=1
print(res)
# Judge status: Wrong Answer
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

d,n = iim()
num = 0
for i in range(n):
    num += 100**d
print(num)
# Judge status: Wrong Answer
n = int(input())

a = 2
b = 1
c = 0
for i in range(2, n + 1):
    c = a + b
    a = b
    b = c
print(c)
# Judge status: Accepted
n, k = map(int, input().split())
print((n-1+k-2)//(k-1))
# Judge status: Accepted
S = input()
ans = "WA"
if S[0] == "A":
    tmp = S[2:len(S)-1]
    if tmp.count("C") == 1:
        c = tmp.index("C")
        count = 0
        for i in range(1,len(S)):
            tmp2 = S[i]
            if tmp2.islower():
                count += 1
        if count == len(S) - 2:
            ans = "AC"
print(ans)
# Judge status: Accepted
n=int(input())
s=''
while n!=0:
  s=str(n%2)+s
  n=-(n//2)
if s!='':
  print(s)
else:
  print(0)
# Judge status: Accepted
N=int(input())
S=input()

if N%2 == 1:
    print('No')
elif S[:N//2] != S[N//2:]:
    print('No')
else:
    print('Yes')
# Judge status: Accepted
def main():
    n = int(input())
    a = dict()
    for _ in range(n):
        x = int(input())
        if x in a:
            a[x] +=1
        else:
            a[x] = 1
    ans = 0
    for v in a.values():
        if v % 2 == 1:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()
# Judge status: Accepted
N, M = map(int, input().split())
a = list(map(int, input().split()))
homework = 0

for i in range(M):
    homework += a[i]

play = N - homework

if play < 0:
    print(-1)
else:
    print(play)
# Judge status: Accepted
n = input()
a = input()
x = int(n)%500
if x<=int(a):
  print("Yes")
else:
  print("No")
# Judge status: Accepted
from collections import defaultdict

cnt = defaultdict(int)

for m in range(2):
    n = int(input())
    for i in range(n):
        s = input()
        if m == 0:
            cnt[s] += 1
        else:
            cnt[s] -= 1

print(max(max(cnt.values()), 0))
# Judge status: Accepted
import sys
import numpy as np
input = sys.stdin.readline
N = int(input())
MOD = 10**9+7
def inputs():return [int(x) for x in input().split()]
A = np.array([inputs()])
ans = 0
for i in range(63):
  B = A&(1<<i)
  x = np.count_nonzero(B)
  y = N-x
  x*=y
  ans+=(2**i*x)%MOD
  ans%=MOD
print(ans)
# Judge status: Wrong Answer
n,m = [int(i) for i in input().split()]
if 2 < n and 2 < m:
    print((n-2)*(m-2))
elif 2 < n:
    print((n-2)*m)
elif 2 < m:
    print(n*(m-2))
else:
    print(0)
# Judge status: Accepted
n = int( input() )

if n == 0:
    print('0')
else:
    sum = 0
    i = 0
    S = []
    while n != 0:

        x = n % (2 ** (i+1))
        if x != 0:
            S.append('1')

            n -= (-2) ** i

        else:
            S.append('0')
        i += 1
    
    S = S[::-1]
    strS = ''.join(S)
    print(strS)
# Judge status: Accepted
print((1000-(int(input())%1000))%1000)
# Judge status: Wrong Answer
import math

n = int(input())
lst = []
for i in range(2, int(math.sqrt(n))+1):
  if n % i == 0:
    lst.append(i)
lst.append(n)
c = 0
for i in range(len(lst)):
  a = lst.pop(0)
  if n % a == 0:
    n = n / a
    c += 1
if n == 1:
  print(0)
else:
  print(c)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int,input().split()))

codd = 0
cfour = 0

for i in range(n):
	if a[i]%2 != 0:
		codd += 1
	if a[i]%4 == 0:
		cfour += 1
ceven = n - cfour - codd

if cfour >= codd:
	print('Yes')
elif ceven != 1 and cfour + 1 == codd:
	print('Yes')
else:
	print('No')
# Judge status: Accepted
import numpy as np 
A,B = map(str,input().split())
A = int(A)
B = int(B[0]+B[2]+B[3])
print(int(A*B//100))
# Judge status: Accepted
from math import ceil, log2

n, k = map(int, input().split())
ans = sum(1 / 2 ** ceil(log2(k / i)) for i in range(1, min(n, k) + 1))
print((ans + max(0, n - k)) / n)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if (a+b+c)%3==0:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
X = input()
ans = 'NO'
if X in ['3','5','7']:
  ans = 'YES'
print(ans)
# Judge status: Wrong Answer
from collections import deque
import sys

def input(): return sys.stdin.readline().rstrip()


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

ans, nd = 0, 0
lim = [1 for _ in range(N + 2)]
for i in range(N + 1) :
    lim[i+1] = (lim[i] - v[i]) * 2

for i in range(N, -1, -1):
    if (v[i] + nd > lim[i]):
        nd = (nd + 1) // 2
        if (v[i] + nd > lim[i]):
            print(-1)
            sys.exit(0)

    nd += v[i]
    ans += nd

print(ans)
# Judge status: Wrong Answer
s = input()
s = s.replace(s[0],'').replace(s[1],'').replace(s[2],'')

if s:
    print('No')
else:
    print('Yes')
# Judge status: Accepted
n=int(input())
ans=0
for i in range(int(n**0.5)+1):
    tmp=i*i
    if tmp <= n:
        ans=max(ans,tmp)
print(ans)
# Judge status: Accepted
import math
h, n = map(int, input().split())
A = input().split()
sum = 0;
for a in A:
    sum += int(a)

if h > sum:
    print('No')
else:
    print('Yes')
# Judge status: Wrong Answer
lst = list(map(int,input().split()))
lst2 = list(map(lambda x: max(lst) - x, lst))

if lst2[0] % 2 == 0 and lst2[1] % 2 == 0:
    print(sum(lst2) // 2)
elif lst2[0] % 2 != 0 and lst2[1] % 2 != 0:
    _sum = (lst2[0] - 1) + (lst2[1] - 1)
    print(_sum // 2 + 1)
else:
    print((sum(lst2) + 1) // 2 + 1)
# Judge status: Wrong Answer
n, x = map(int, input().split())
a = list(map(int, input().split()))
ans = max(0, a[0] - (a[0] - x))
for i in range(n - 1):
    if a[i] + a[i + 1] > x:
        #print("OK3")
        diff = (a[i] + a[i + 1]) - x
        ans += diff
        a[i + 1] -= diff
    #print(a)

print(ans)
# Judge status: Wrong Answer
X = int(input())

l = [0,1,2,3,4,5]
a = X // 100
b = X % 100

if b == 0:
    print('1')
elif a and ((b // a) in l) and ((b % a) in l):
    print('1')
else:
    print('0')
# Judge status: Accepted
N = int(input())
P = list(map(int, input().split()))
cnt, i = 1, 0
min = P[0]
for i in range(i + 1, N):
  if min >= P[i]:
    cnt += 1
    min = P[i]
print(cnt)
# Judge status: Accepted
N, K = map(int, input().split())
A = list(map(int, input().split()))
for i in range(N - K):
    print("Yes") if A[i] < A[K + i] else print("No")
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))
A.sort()
for i in range(N-1):
    A[i+1] = (A[i] + A[i+1])/2
print(A[-1])
# Judge status: Accepted
import sys

N, Q = map(int,input().split())
S = input()

cnt = [0]*(N+1)
wasA = False

for i in range(0,N):
  if wasA and S[i] == "C":
    cnt[i+1] = cnt[i] + 1
    wasA = False
  elif S[i] == "A":
    cnt[i+1] = cnt[i]
    wasA = True
  else:
    cnt[i+1] = cnt[i]
    wasA = False

#print(cnt)    

for i in range(0,Q):
  l, r = map(int,input().split())
  print(cnt[r]-cnt[l])
# Judge status: Accepted
n = int(input())
li = list(map(int, input().split()))
for _ in range(n-1):
  li.sort(reverse=True)
  a = li.pop()
  b = li.pop()
  li.append((a+b)/2)
print(*li)
# Judge status: Accepted
n = list(input())

if n[0] == n[1] and n[1] == n[2]:
    print('Yes')
elif n[1] == n[2] and n[2] == n[3]:
    print('Yes')
elif n[0] == n[1] == n[2] == n[3]:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
x,a,b=map(int,input().split())

if b-a<=0:
  print('delicious')
  
elif 0<b-a<=x:
  print('safe')
  
else:
  print('dangerous')
# Judge status: Accepted
l,r = map(int, input().split())

t = []

if r-l >= 2019:
    print(0)
else:
    for i in range(l,r):
        for j in range(l+1,r+1):
            t.append((i*j)%2019)
    print(min(t))
# Judge status: Accepted
n = int(input())

n %= 1000
n = 1000 -n

if n % 1000 == 0:
    n = 0

print(n)
# Judge status: Wrong Answer
x = str(input())
if x[2]==x[3] or x[4]==x[5]:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n, c, k = map(int, input().split())
T = []
for i in range(n):
    t = int(input())
    T.append(t)
T.sort()
x = 0
ans = 1
w = T[0] + k
for i in range(n):
    if T[i] <= w and x < c:
        x += 1
    else:
        ans += 1
        x = 1
        w = T[i]+k
print(ans)
# Judge status: Accepted
N = int(input())
c = [[0]*10 for _ in range(10)]
for k in range(1,N+1):
    tmp = str(k)
    i = int(tmp[0])
    j = int(tmp[-1])
    c[i][j] += 1
ans = 0
for i in range(10):
    for j in range(10):
        ans += c[i][j] * c[j][i]
print(ans)
# Judge status: Accepted
from collections import Counter
n, *d = map(int, open(0).read().split())
MOD = 998244353
c = Counter(d)
if d[0] != 0 or c[0] != 1:
    ans = 0
else:
    ans = 1
    for i in range(1, max(d)+1):
        ans *= pow(c[i-1], c[i]) % MOD
print(ans % MOD)
# Judge status: Accepted
s = input()
n = len(s)
for i in range(1,n):
    p = 0
    for j in range((n-2*i)//2):
        if s[j] != s[(n-2*i)//2 + j]:
            p = 1
            break
    if p == 0:
        print(n-2*i)
        exit()
# Judge status: Accepted
a, b, c, d = map(int, input().split())

if abs(a-b) <= d and abs(b-c) <= d or abs(a-c) <= d:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
s=int(input())

v=10**9

x=(v-s%v)%v

y=(s+x)//v

print('0 0 1000000000 1 {} {}'.format(x,y))
# Judge status: Wrong Answer
n = int(input())
d = list(map(int,input().split()))

d.sort()
ans = []
if d[n//2 -1] == d[n//2]:
    print("0")
else:
    for i in range(d[n//2 -1] + 1,d[n//2] + 1):
        ans.append(i)

        
print(len(ans))
# Judge status: Accepted
n,a,b=map(int,input().split())
p=0
for i in range(1,n+1):
    if a <= sum(map(int,str(i))) <= b:
        p += i
print(p)
# Judge status: Accepted
A,B = map(int,input().split())
if(abs(A-B) % 2 == 1):
    print("IMPOSSIBLE")
else:
    print((abs(A-B)//2) + min(A,B))
# Judge status: Accepted
N,H = map(int,input().split())
K = [list(map(int,input().split())) for n in range(N)]
A = max(k[0] for k in K)
B = sorted(b for a,b in K if A<b)
C = 0

while 0<H and B:
  H-=B.pop()
  C+=1

print(C-(-max(0,H)//A))
# Judge status: Wrong Answer
a, b, c = map(int, input().split())

if c % 2 == 0:
    print(0)
else:
    print(((a * b) * (int(c/2)+1)) - ((a * b) * int(c/2)))