peterverebics/CodeNet_Python_118 huggingface dataset:
N, M = map(int, input().split())
A = list(map(int, input().split()))

A.sort()
all_A = sum(A)
border = all_A // (4*M)

select = 0

for a in A:
    if a > border:
        select += 1

if select >= M:
    print('Yes')
else:
    print('No')
nm = input('')
n = int(nm.split(' ')[0])
m = int(nm.split(' ')[1])
alist = input('').split(' ')

t = 0
for i in range(n):
  t += int(alist[i])
lm = t/(m*4)
print(lm)
s = 0
for i in range(n):
  a = int(alist[i])
  if a > lm:
    s+=1

if s > m:
  print('Yes')
else:
  print('No')
n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reverse=True)
bordar = sum(a) // (4 * m)
if bordar == 0:
    print('No')
    exit()
for i in range(m):
    if a[i] <= max(1,bordar):
        print('No')
        exit()
print('Yes')
N,M = map(int,input().split())

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

Alist = sorted(Alist,reverse=True)
#print (sum(Alist))
Ans = "No"
for i in range(M):
  #print (Alist[i])
  #print((sum(Alist)/4*M))
  if Alist[i]>(sum(Alist)/(4*M)):
    Ans ="Yes"
  else:
    Ans = "No"
    
print (Ans)
N_s,M_s=input().split()
M=int(M_s)
N=int(N_s)
A=list(map(int,input().split()))


th=int(sum(A)/(4*M))
#print("th="+ str(th))

A_th=[A_t for A_t in A if A_t>th]
if len(A_th)>=M:
    print("Yes")
else:
    print("No")
#coding: utf-8
A = list(map(int, input().split()))
B =	list(map(int, input().split()))
num = A[0]
jud = A[1]
all = sum(B)
n = 0
C = 0
AN = 0

while n < num-1 :
	AN = B[n]
	n += 1
    
	if AN < all / (jud*4):
		continue
	
	else:
		C += 1
    
if C >= jud:
	print("Yes")
else:
	print("No")
N,M = map(int,input().split())
l = x = [int(i) for i in input().split()]
l_sum = sum(l)
cnt = 0

for i in range(N):
    if l[i] > (1/(4*M))*l_sum:
        cnt += 1

if cnt >= M:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
a = list(map(int, input().split()))
c = sum(a) / (4 * n)
d = 0
for e in a:
    if e >= c:
        d += 1
        if d == m:
            print('Yes')
            exit(0)
print('No')
n,m = map(int, input().split())

i = list(map(int, input().split()))
a=[]
for x in range(n):
    a.append(i[x])
a.sort(reverse = True)
if a[m-1] >= (1/4)*m:
    print("Yes")
else:
    print("No")
n, m = [int(w) for w in input().strip().split()]
arr = [int(w) for w in input().strip().split()]

ss = sum(arr)
frac = ss//(4*m)
flag = False
arr.sort()
for i in range(m):
  if arr[i] > frac:
    flag = True
  else:
    flag = False
    break
if flag:
  print("Yes")
else:
  print("No")
a = input().split()

n = int(a[0])
m = int(a[1])

b = input().split()

x = [int(i) for i in b]

s = sum(x)
lim = s * (1/(m*4)) 

c = 0
print(lim)
for i in range(0,n):
    if(x[i] > lim):
      c = c + 1
    else:
      continue

if(c >= m):
  print("Yes")
else:
  print("No")
nm=list(map(int,input().split(' ')))
a=list(map(int,input().split(' ')))
c=0
for i in a:
    if i>=1/(4*nm[1]):
        c+=1
if c>=nm[1]:
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())))
ans = sum(x > (sum(A) // (4 * M)) for x in A)
if ans == 0:
    print('No')
else:
    print('Yes' if ans >= M else 'No')
'''select the popular items'''
N, M = [int(i) for i in input().split()]
A = map(int, input().strip().split())
votes = N + M
Total_votes = 0
for j in A:
    Total_votes += j
if votes < (1/4*M)*Total_votes:
    print('No')
else:
    print('Yes')
n,m = map(int, input().split())
a = sorted(list(map(int, input().split())), reverse=True)

t = int(sum(a)/(4*m))
for i in range(m):
  if a[i] < t:
    print("No")
    exit()
print("Yes")
import math
n, m = map(int,input().split())
a = list(map(int,input().split()))
sum = sum(a)
print(sum)
x = 0
for i in a:
    if i * 4 * m >= sum:
        x += 1

print(x)
if x >= m:
    print('Yes')
else:
    print('No')
N,M = map(int,input().split())
A = list(map(int,input().split()))
count = 0
for a in A:
    if sum(A)/4*M > a:
        count += 1
if count >= M:
    print('Yes')
else:
    print('No')
N,M=map(int,input().split())
A=list(map(int,input().split()))

if sorted(A,reverse=True)[M-1]>sum(A)/4/M:
    print("Yes")
else:
    print("No")
import math
n, m = map(int, input().split())
a = sorted(list(map(int,input().split())))
suma = math.floor(sum(a) / (4 * m))
count = True
#print(a[n - 1])
for i in range(m):
    if a[n - 1 - i] <= suma:
        count = False
print("Yes" if count == True else "No")
n,m=map(int,input().split())
v=list(map(int,input().split()))
v.sort(reverse=True)
s=sum(v)//(4*m)
c=0
for x in v:
    if x>s:

        c+=1
if c>=m:
    print('Yes')
else:
    print('No')
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
s = sum(a)
if a[m-1] < s/(4*m):
  print("Yes")
else:
  print("No")
NM=input().split()
M=int(NM[1])
a=input().split()
a_list=[]
for i in a :
  a_list.append(int(i))
a_list.sort(reverse=True)
sum1=sum(a_list)
 
flag=True
for i,youso in enumerate(a_list) :
  if(youso*4*M<sum1 and i+1<=M) :
    print(youso)
    flag=False
    break
    
if flag==True :
  print('Yes')
else :
  print('No')
n, m = map(int, input().split())
votes = list(map(int, input().split()))
vote_total = sum(votes)
base_4m = vote_total / 4 * m
over4m_count = 0

for i in votes:
    if i > base_4m:
        over4m_count += 1

if over4m_count > m:
    print('Yes')
else:
    print('No')
n,m=map(int, input().split())
a=sorted(list(map(int, input().split())), reverse=True)

if a[m-1]<1/(4*m):
    print('No')
else:
    print('Yes')
N, M = map(int, input().split())
A = list(map(int, input().split()))

A.sort()
all_A = sum(A)
border = all_A / (M*4)

select = 0

for i in range(N):
    if A[i] > border:
        select += 1

if select >= M:
    print('Yes')
else:
    print('No')
N,M=map(int,input().split())
A=list(map(int,input().split()))

A_sum=0

for a in A:
    A_sum+=a

bording=A_sum/(4*M)

score=0
for a in A:
    if a >= bording:
        score += 1
if M<score:
    print('Yes')
else:
    print('No')
N,M = map(int,input().split())
A = list(map(int,input().split()))
if sum(A) > 1/4*M:
    print('Yes')
else:
    print('No')
n,m=map(int,input().split())
v=list(map(int,input().split()))
v2=sorted(v, reverse=True)
vsum=sum(v)
cri=vsum/(4*m)

if v2[m-1]>cri:
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
ai = list(map(int,input().split()))
s = sum(ai)
check = s/4//m+1
count = 0
for i in ai:
  if i > check:
    count += 1
if count >= m:
  print('Yes')
else:
  print('No')
x,y = map(int,input().split())
li = list(map(int,input().split()))	
cnt = 0
for i in range(len(li)):
    if li[i] > sum(li) * (1/float(4*y)):
        cnt += 1
else:
    pass

if cnt >= y:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
a_list = input().split()
a_sum = 0
for i in range(len(a_list)):
    a_list[i] = int(a_list[i])
    a_sum += a_list[i]
a_list.reverse()

ok_num = 0
kijyun = int(a_sum*m/4)
for i in a_list:
    if i > kijyun:
        ok_num += 1
    if ok_num == m:
        print('Yes')
        quit()
print('No')
N, M = map(int, input().split())

A = list(map(int,input().split()))
A.sort(reverse=True)
total = sum(A)
ta = int(total / (4*M))

count = 0

for i in range(M):
    if A[i] >= ta:
        count += 1

if count == M:
    print('Yes')
else:
    print('No')
n,m= map(int,input().split(' '))
arr= list(map(int,input().split(' ')))

votes= sum(arr)
lim=(votes+1)//(4*m)
m_arr= [i for i in arr if i>= lim]
if len(m_arr)>=m:
    print('Yes')
else:
    print('No')
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())))
border = sum(A) * (1 // (4 * M))
count = 0
for i in A:
    if i > border:
        count += 1
if count >= M:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
chk = True
s = sum(A)
for i in range(m):
    if A[i] >= s/4*m:
        pass
    else:
        chk = False
if chk == True:
    print('Yes')
else:
    print('No')
n, m = map(int, input().split())
a_list = input().split()
a_sum = 0
for i in range(len(a_list)):
    a_list[i] = int(a_list[i])
    a_sum += a_list[i]
a_list.reverse()

ok_num = 0
kijyun = int(a_sum/(4*m))
for i in a_list:
    if i > kijyun:
        ok_num += 1
    else:
        break
    if ok_num >= m:
        print('Yes')
        quit()
print('No')
N,M=map(int,input().split())
A = list(map(int, input().split()))
select=0
for i in range(N-1):
    if A[i]>sum(A)*(1/(4*M)):
        select+=1
    
def ans(M,select):   
    if M==select:
         return 'Yes'
    
    else:
         return 'No'

print(ans(M,select))
n, m = input().split()
b = input().split()
sum = 0
for x in b:
    sum += int(x)
yy=0
for y in b:
    if int(y) < sum/(4*int(n)):
        yy+=1
if yy <= int(m):
    print("No")
else:
    print("Yes")
i = input().split()
i_int = [int(n) for n in i]
a = input().split()
A = [int(m) for m in a]
N = i_int[0]
M = i_int[1]

th = sum(A)/(4 * M)

##print(threshhold)

c = 0
for val in A:
    if val >= th:
    ##print(val)
        c += 1

if M >= c:
    print('No')
else:
    print('Yes')
m = input()
a = list(input())
x = int(0)

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

list.sort(a)

for i in range(len(a)- 1, n, -1):
    print(i)
    x += int(a[i])

for i in range(len(a)- 1, len(a) - m -1, -1):
    print(i)
    if int(a[i]) // 4 * int(m) < 0:
        print('No')
        exit()

print('Yes')
n , m = map(int,input().split())
a = list(map(int,input().split()))
can_choice_item_list =[]
for item in a:
  if item < 1 / (4 * m):
    pass
  else:
    can_choice_item_list.append(item)
if m < len(can_choice_item_list):
  print('YES')
else:
  print('NO')
N, M = map(int, input().split())
A = list(map(int, input().split()))

sumA = sum(A)

filteredA = list(filter(lambda x: x < (sumA / (4*M)), A))

if M >= len(filteredA):
    print('Yes')
else:
    print("No")
N,M = map(int,input().split())
A = list(map(int,input().split()))

s = sum(A)
A.sort()
for i in range(N):
    if i == M:
        if (s/(4*M))>A[i]:
            print('Yes')
        else:
            print('No')
n, m = map(int,input().split())
a = list(map(int,input().split()))
a.sort(reverse = True)
s = sum(a)
for i, l in enumerate(a):
    if l < s//(4*m):
        i -= 1
        break
if i >= m-1:
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
arr = list(map(int,input().split()))
arr.sort()
M = sum(arr)//(2*m)
cnt = 0
for i in range(n):
  if cnt == m:
    break
  if arr[i] > M:
    cnt+=1
if cnt == m or cnt > m:
  print('Yes')
else:
  print('No')
N,M= map(int, input().split())
A = list(map(int, input().split())) 

all = sum(list(A))
p = int(1/(4*M)*all)
cnt = 0

for i in A:
  if i >= p:
    cnt += 1

if cnt >= M :
  print('Yes')
else:
  print('No')
n, m = map(int, input().split())
a =  list(map(int, input().split()))
t = sum(a)// (4 * m)
c = [i for i in a if i >= t]

if len(c) > m:
        print('Yes')
else:
        print('No')
n,m = map(int, input().split())
a = list(map(int, input().split()))
s = 0
total = sum(a)
for i in a:
    if total/4*m <= i:
        s += 1

if s >= m:
    print('Yes')
else:
    print('No')
#AtCoder
N, M = map(int, input().split())
A = list(map(int, input().split()))

sm = sum(A)
ms = sm // (4*M)
pop = []
for i in range(N):
    if ms < A[i]:
        pop.append(A[i])
    else:
        pass

if len(pop) >= M:
    print('Yes')
else:
    print('No')
n, m = map(int, input().split())
a = list(map(int, input().split()))
suma = sum(a)

filtera = [i for i in a if i >= 1/(4*m)]

if len(filtera) >= m:
  print("Yes")
else:
  print("No")
n,m = map(int,input().split())
a = list(map(int,input().split()))
count = 0
for i in range(n):
    if sum(a)/(4*m) <a[i]:
        count+=1
if count >= m:
    print('Yes')
else:
    print('No')
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)

a_sum = sum(a)
t = a_sum / (4*m)

cnt = 0
for i in range(n):
    if a[i] > t:
        cnt += 1
    else :
        break
        
if cnt >= m:
    print("Yes")
else:
    print("No")
# n, m = map(int, '12 3'.split())
# a = list(map(int, '4 56 78 901 2 345 67 890 123 45 6 789'.split()))
n, m = map(int, (input()).split())
a = list(map(int, input().split()))

a = sorted(a, reverse=True)
thresh = sum(a)/(4*m)

count = 0
for i in a:
  if i > thresh:
    count+=1
  else: 
    break
if count > m:
  print('Yes')  
else:
  print('No')
N,M=map(int,input().split())
list_A=input().split()
for i in range(len(list_A)):
    list_A[i]=int(list_A[i])
A =int(sum(list_A)/(4*M))
if M<=len([i for i in list_A if i>= A]):
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
A = input().split()
list_a = [int(n) for n in A]
count = 0

waru = 4 * M
SUM = sum(list_a)
vote = SUM / waru

for i in range(0, N):
    if list_a[i] > vote:
        count += 1
    else:
        pass

print(count)

if count >= M:
    print("Yes")
else:
    print("No")
import numpy as np

def main():
    args1, args2 = input().rstrip().split(' '), input().rstrip().split(' ')
    N, M = int(args1[0]), int(args1[1])
    items = np.array([int(val) for val in args2])
    items = np.sort(items)[::-1]
    items_sum = np.sum(items)
    bottom = items_sum / 4. / M
    
    if(items[M-1] > bottom):
        print('Yes')
    else:
        print('No')
    
if __name__ == "__main__":
    main()
import numpy as np


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

min_ = sum(A) / (4*M)
item = sum(x>min_ for x in A)
print("Yes" if item>= M else "No")
N, M = map(int, input().split())
l = input().split()
l = [int(i) for i in l]  
l.sort(reverse=True)
val = sum(l)
deadline = val//(4*M)
if l[M-1] >= deadline:
  print("Yes")
else:
  print("No")
N,M=map(int,input().split())
a=list(map(int,input().split()))
total = sum(a)
cnt = 0
for i in range(N):
    if a[i] >= total//(4*M):
        cnt += 1
if cnt >= M:
    print('Yes')
else:
    print('No')
n,m = map(int, input().split())
a = list(map(int, input().split()))

sm=sum(a)

cnt=0
for i in range(n):
    if a[i]*4*m > sm:
        cnt+=1
if cnt >=m:
    print("Yes")
else:
    print("No")
# -*- coding: utf-8 -*-

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

total = sum(A)
count = 0

for a in A:
  if a >= total / (4*M):
    count += 1
if a >= M:
  print('Yes')
else:
  print('No')
n, m = map(int, input().split())
a = map(int, input().split())
s=0
can=0
for b in a:
    s+=b 
for b in a:
    if b >= s / (4*m):
        can+=1
if can > m:
    print("Yes")
else:
    print("No")
n,m=map(int,raw_input().split())
a=sorted(map(int,raw_input().split()),reverse=True)
if m>n:
    print 'No'
    quit()
s=sum(a)//(4*m)
print 'No' if a[m-1]<s else 'Yes'
N,M = list(map(int,input().split()))
A = list(map(int,input().split()))

total = sum(A)

selcnt = 0
for a_i in A:
    if a_i > total * (1/(4*M)):
        selcnt += 1

if selcnt >= M:
    print("Yes")
else:
    print("No")
#


def main():
    n, m = map(int, input().split(" "))
    a = [int(s) for s in input().split(" ")]
    total = sum(a)
    lim = total // (4 * m)
    a = sorted(a, reverse=True)
    count = 0
    for i in a:
        if i >= lim:
            count += 1
        else:
            break
    if count >= m:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
n,m = map(int, input().split())
i = list(map(int, input().split()))
j=sorted(i, reverse=True)

# print(n)
# print(m)
# print(i)
# print(j)

# print(j[m-1])
# print(sum(i))
# print(sum(i)/(4*m))
if j[m-1]>sum(i)/(4*m):
    print("Yes")
else:
    print("No")
n,m=map(int,input().split())
a=list(map(int,input().split()))
k=sum(a)
r=1/4*m
c=0
count=0
for i in range(n):
    
    if a[i]/k>r:
        count+=1
    if count>=2:
        c=1
        print("Yes")
        break
if c==0:
  print("No")
n, m = map(int, input().split())
lst = list(map(int, input().split()))
lst.sort(reverse = True)
sol = lst[:m]
if sol[-1] < sum(lst)/(4*m):
    print("NO") 
else:
    print("YES")
import numpy as np
import math
 
n, m = map(int, input().split())
vote_lists = list(map(int, input().split()))
 
vote_arr = np.array(vote_lists)
total_vote = vote_arr.sum()
popular = math.ceil(total_vote / (4 * m))
 
if len(vote_arr[vote_arr > popular]) >= m:
    print('Yes')
else:
    print('No')
# -*- coding: utf-8 -*-
#標準入力の取得
N,M = map(int,input().split())
A = list(map(int,input().split()))

cutoff = sum(A)/(4*M)
count_pop = sum(i > cutoff for i in A)


if count_pop<M :
    print("No")
else:
    print("Yes")
N , M = (map(int , input().split()))
A = list(map(int , input().split()))
s = sum(A)
tou = int(-(-1/(4*M))*s)
count = 0
for i in A:
    if i >= tou:
        count += 1
if count >= M:
    print('Yes')
else:
    print('No')
def main():
    N, M = map(int, input().split())
    A = [int(a) for a in input().split()]
    total = sum(A)
    cnt = 0
    for i in range(N):
        if A[i] < total*1.0/(4.0*M):
            pass
        else:
            cnt += 1
    if cnt >= M:
        print("Yes")
    else:
        print("NO")
main()
N, M = map(int, input().split())
A = map(int, input().split())

a = sorted(A, reverse=True)

b = sum(a)//4*M

if a[M-1]<b:
  print('No')
else:
  print('Yes')
n,m = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)

total = sum(A)
limit = total //(4*m)
cannot = 0
for i in range(m):
  if A[i]<limit:
    cannot=1
    break
    
if cannot:
  print('No')
else:
  print('Yes')
N,M=list(map(int, input().split()))
A=list(map(int, input().split()))
S=sum(A)
C=S/(4.0*M)
cnt=sum(map(lambda x:x>=C,A))
import sys
input = sys.stdin.readline

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

s = sum(A) // (4 * M)
c = sum([1 for a in A if a >= s])
print("Yes") if c >= M else print("No")
l = input()
m = input()
z = l.split(' ')
M = int(z[1])
N = int(z[0])
C = (N/(4*M))
F = m.split(' ')
X = []
count = 0
i = 0
while i < N:
  vote = int(F[i])
  i += 1
  if vote>=C:
    count += 1

if count >= M:
	print("Yes")
else:
  	print("No")
N,M=map(int,input().split())
A=list(map(int,input().split()))
S=sum(A)
l=S/(4*M)
h=0
for i in range(N):
  if A[i]>=l:
    h+=1
if h==M:
  print("Yes")
else:
  print("No")
N, M = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]


A = sorted(A)[::-1]
total = sum(A)
# if A[M-1] < total * (1 / (4 * M)):
if A[M-1] < total:
    print('No')
else:
    print('Yes')
s = [input() for i in range(2)]
n = int(s[0].split()[0])
m = int(s[0].split()[1])
a = list(map(int, s[1].split()))

sumVote = sum(a)
border = 1 / 4 * m
select = 0
for item in a:
    if border < item:
        select += 1
    if select == m:
        print("Yes")
        exit()
print("No")
n, m = map(int, input().split())
syohin = []
syohin = sorted(input().split(), reverse = True)
b = 0
for a in syohin:
  b += int(a)
if int(syohin[m-1]) > b *  (1 / (4 * m)):
  print("Yes")
else:
  print("No")
# coding: utf-8

kind, choose = map(int, input().split())
count = 0
total = 0

num = input().split(" ")
for i in num:
    total += int(i)

ok = total / (4 * kind)
for i in num:
    if int(i) >= ok:
        count += 1

if count >= choose:
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
a = [int(e) for e in input().split()]
cnt = 1
s = 0
for i in a:
  s+=i
for i in a:
  if i >= s/(4*m):
    cnt+=1
if cnt >= m:
  print("Yes")
else:
  print("No")
def main():
    N, M = map(int, input().split(' '))
    An = list(map(int, input().split(' ')))
    thres = int(sum(An) / (4 * M))
    
    count = 0
    for a in An:
        if a > thres:
            count += 1
            
    if count >= M:
        print('Yes')
    else:
        print('No')
    
    
    
    
main()
n,m = map(int,input().split())
line = sorted(list(map(int,input().split())),reverse = True)
sums = sum(line)
if sums % (4*m) != 0:
  least = sums//(4*m)
else:
  least = sums//(4*m) + 1
box = []
for i in line:
  if i > least:
    box.append(i)
if len(box) >= m:
  print("Yes")
else:
  print("No")
N,M=map(int,input().split())
list_a=list(map(int,input().split()))
l = sorted(list_a,reverse=True)

if l[M-1]<1/(4*M):
    print('No')
else:
    print('Yes')
n, m = map(int,input().split())
a = list(map(int,input().split()))

a.sort(reverse=True)
if a[m-1] >= 1 / (4*m):
    print('Yes')
else:
    print('No')
n,m=map(int,input().split())
l=list(map(int,input().strip().split()))[:n]
x=sum(l)
y=m+n
if(y<((1/(4*m))*x)):
    print("No")
else:
    print("Yes")
def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    assert N == len(A)
    votes = sum(A)//(4*M)
    count = 0
    for i in A:
        if i >= votes:
            count += 1
    print("Yes") if count >= M else print("No")


if __name__ == '__main__':
    main()
N, M = map(int, input().split())
A = list(map(int, input().split()))

count = 0
sum_total = sum(A)

for i in range(N):
    if (A[i] > (sum_total /(4*M))):
        count=count+1


if count >= M:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
a = sorted(list(map(int, input().split())))
num = int(1/(4*m))
if a[m-1] < num:
  print('No')
else:
  print('Yes')
n , m = map(int, input().split())
arr = list(map(int, input().split()))
check = 1/(4*m)
count = 0
for i in arr:
	if i <= check:
		continue
	else:
		count+=1
if count >= m:
	print("Yes")
else:
	print("No")
n,m = (int(i)for i in input().split())
l = [int(i)for i in input().split()]
l.sort(reverse = True)
lim = sum(l)//(4*m)
cnt=0
for i in range(m):
	if l[i]>=lim:
		cnt+=1
if cnt>=m:print("Yes")
else:print("No")
N, M = map(int, input().split())

As = list(map(int,input().split()))
vote_sum = sum(As)
least_vote_num = vote_sum / (4 * M)

if len([A for A in As if A > least_vote_num]) >= M:
    print('Yes')
else:
    print('No')
N,K=list(map(int,input().split()))

if N==0:
    print(0)

N=min(N%K,K-N%K)
cand1=abs(N-K)
cand2=abs(cand1-K)
print(min(N,cand1,cand2))
n, m = map(int, input().split())
a = list(map(int, input().split()))

s = sum(a)
t = s // 4*m
cnt = 0

for i in a:
    if i >= t:
        cnt += 1

print("Yes" if cnt >= m else "No")
import sys
a = 0
N,M = map(int,input().split())
A = list(map(int,input().split()))
for i in range(N-1):
  if A[i]>sum(A)/(4*M):
    a+=1
if a>=M:
  print("Yes")
else:
  print("No")
N, M = map(int, input().split())
A = list(map(int, input().split()))
F = 0
trigger = 1 / (4 * M)

for i in range(len(A)):
    if A[i]/sum(A) > trigger:
        F = F + 1
        
if F >= M:
    print('Yes')
else:
    print('No')
def main():
  n, m = (int(x) for x in input().split())
  a_list = list(map(int, input().split()))
  sum_num = 0
  sum_num = sum(a_list)
  count = 0
  for i in a_list:
    if(i >= sum_num/(4 * m)):
      count += 1

  print(count)
  if(count >= m):
    print('Yes')
  else:
    print('No')

if __name__ == '__main__':
  main()
n, m = map(int, input().split())
a = list(map(int, input().split()))

def fun(n, m, a):
    total = sum(a)
    num = float(total)/(4*m)
    flag = sum([i > num for i in a])
    return flag >= m

ans = fun(n, m, a)
if ans:
    print("Yes")
else:
    print("No")
N, K = map(int, input().split())
if 0 <= N <= 10^18 and 1 <= K <= 10^18:
    if N>K:
        N = abs(N-K)
        N = abs(N-K)
        print(N)
    else:
        print(N)
else:
    print("0")
NM = list(map(int, input().split()))
score = list(map(int, input().split()))

cutter = 0
all = 0
for i in range(len(score)):
    all += score[i]

candidate = 0
criteria = 4 * NM[1]
for i in range(len(score)):
    if (all < (score[i] * criteria)):
        candidate += 1

if (candidate >= NM[1]):
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
print("YNeos"[sum(a[i]<sum(a)/(4*m)for i in range(m))<m::2])
n,k = map(int,input().split())
A = list(map(int,input().split()))

allvote=0
allvote=sum(A)
# print( allvote )

c=0
for a in A:
    if a>=allvote/(4*k) :
        c+=1

if c>=k :
    ans = "Yes"
else:
    ans = "No"
print(ans,allvote,c)
n,m = map(int,input().split())
li = list(map(int,input().split()))
sum_vote = sum(li)
kijun = sum_vote / 4 * m
sum_above = len([i for i in li if i > kijun])
if sum_above >= m:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
a = list(map(int, input().split()))

A = sum(a)
count = 0
for i in a:
    if i > A / (4*m):
        count += 1

if count >= m:
    print('Yes')
else:
    print('No')