peterverebics/CodeNet_Python_118 huggingface dataset:
first_input = list(map(lambda x:int(x), input().split(" ")))
second_input = list(map(lambda x:int(x), input().split(" ")))

second_input.sort(reverse=True)
criteria = sum(second_input)/float(4*first_input[1])

count = 0
for i in range(len(second_input)):
    if second_input[i]>=criteria:
        count = count+1
    else:
        break

if count >= first_input[1]:
    print("Yes")
else:
    print("No")
def main():
    n, m = map(int, input().split())
    num_list = list(map(int, input().split()))

    vote_num = sum(num_list)

    count = 0

    for i in range(n):
        if vote_num * 1/(4*m) <= num_list[i]:
            count += 1

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

if __name__ == '__main__':
    main()
n,m=map(int,input().split())
a=list(map(int,input().split()))
mm=sum(a)/4/m
s=0
for i in a:
    if i >=mm:
        s+=1
if s>=m:
    print('Yes')
else:
    print('No')
N, M = map(int, input().split())
A = list(map(int, input().split()))
S = sum(A)
count = 0
for a in A:
    if a >= S/(4*M):
        count += 1
if count >= M:
    print("Yes")
else:
    print("No")
def popularity(votes, N, M):
    
    total_votes = sum(votes)
    limit = total_votes / (4.0 * M)
    
    cnt = 0
    for vote in votes:
        if vote >= limit:
            cnt += 1
    
    if cnt >= M:
        return "Yes"
    
    return "No"
  
N, M = [int (x) for x in input().split()]
votes = [int (x) for x in input().split()]
print(popularity(votes, N, M))
import sys


def main(argv):
    n, m = [int(i) for i in sys.stdin.readline().rstrip("\n").split(" ")]
    a = [int(i) for i in sys.stdin.readline().rstrip("\n").split(" ")]
    s = sum(a)
    items = list(filter(lambda i: True if i >= s / (4 * m) else False, a))
    print("Yes" if len(items) >= m else "No")
    return 0
    
    
if __name__ == "__main__":
    sys.exit(main(sys.argv))
import numpy as np
N, M = map(int, input().split())
AA = np.array(list(map(int, input().split())))


S = sum(AA >= (sum(AA)/(4*M)))
if S >= M:
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
ITEMS = list(map(int, input().split())) 
MAX = sum(ITEMS)
def solve():
    count = 0
    for item in reversed(list(sorted(ITEMS))):
        if item >= MAX * (1 / (4 * M)):
            count += 1
        if count >= M:
            print("Yes")
            return 
    
    print("No")
    
solve()
n, m = map(int, input().split())
a = list(map(int, input().split()))

sum_v = sum(a)
border = sum_v / (4*m)
count = 0
for i in a:
    if i >= border:
        count += 1
if count >= m:
    print('Yes')
else:
    print('No')
n, m = [int(x) for x in input().split()]

xs = []
for i in input().split():
    xs.append(int(i))

bound = 1/4/m * sum(xs)

count = 0
for x in xs:
    if x >= bound:
        count += 1

print('Yes') if count >= m else print('No')
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
ans="Yes"
s=sum(a)
if a[m-1]>=s/(4*m):
  print("Yes")
else:
  print("No")
N,M = map(int,input().split())
A = list(map(int,input().split()))

S = sum(A)
t = 0
for i in A:
    if i >= S/(4*M):
        t += 1
        
if t >= M:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
a = list(map(int, input().split()))
u = sum(a) / (4*m)
l = 0
for i in a:
    if i >= u:
        l += 1
print("Yes") if l >= m else print("No")
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
total = sum(A)

for i in range(M):
    if A[i] < total / (4*M):
        print('No')
        break
else:
    print('Yes')
from heapq import nlargest

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

print('Yes' if nlargest(M, A)[-1] >= sum(A) / 4 / M else 'No')
N, M = map(int, input().split())
A = list(map(int, input().split()))
all_vote = sum(A)
count = 0


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

if count < M:
    print("No")
else:
    print("Yes")
n, m = map(int, input().split())
A = list(map(int, input().split()))
count = 0
total = 0
for j in range(n):
    total += A[j]
for i in range(n):
    if A[i] >= total *(1/(4*m)):
        count += 1
if count >= m:
    print("Yes")
else:
    print("No")
val1 = input().split()
val2 = input().split()
total = 0
for votes in val2:
  total += int(votes)
thres = total * 1/4 / int(val1[1]) 
i = 0
for votes in val2:
  if int(votes) >= thres:
    i += 1
if i >= int(val1[1]):
  print("Yes")
else:
  print("No")
n, m = map(int, input().split())
a = list(map(int, input().split()))
total = sum(a)
p = [el for el in a if el >= (total/(4*m))]
if len(p) >= m:
    print('Yes')
else:
    print('No')
# -*- coding: utf-8 -*-
from sys import stdin
from operator import itemgetter
import math
# stdin = open("sample.txt")

N,M = [int(x) for x in stdin.readline().rstrip().split()]

hyo = list(map(int,[int(x) for x in stdin.readline().rstrip().split()]))
sort_hyo = sorted(hyo, reverse=True)
point = sum(hyo)
target = math.ceil(point / (4*M))
for i in range(len(hyo)):
    if sort_hyo[i] >= target:
        sort_hyo[i] = "Yes"
    else:
        sort_hyo[i] = "No"
        
print(sort_hyo[M-1])
n, m = map(int, input().split())
a = [ i  for i in map(int, input().split())]

# print(n, m)
# print(a)

a.sort(reverse=True)
# print(a)

last = a[m-1]
# print(last)
total = sum(a)

if (last >= (total / (4 * m))):
  print('Yes')
else:
  print('No')
def resolve():

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

    val=sum(A)/(4*M)
    cnt=0
    for i in A:
        if i >=val:
            cnt+=1

    if cnt>=M:
        print('Yes')
    else:
        print('No')




resolve()
n, m = map(int, input().split())
alist = list(map(int, input().split()))
alist.sort(reverse=True)
tot = sum(alist)
if alist[m-1] < tot/(4*m):
  print('No')
else:
  print('Yes')
def readInts():
  return list(map(int, input().split()))

n, m = readInts()
a = readInts()
s = sum(a)
cnt = 0
for i in range(n):
  if a[i]*4*m >=s:
    cnt +=1
    
if cnt >= m:
  print("Yes")
else:
  print("No")
n, m = map(int, input().split())
a = list(map(int, input().split()))
ans = "Yes"
 
a.sort(reverse=True)
 
for i in range(m):
    if a[i] < sum(a)*(1/(4*m)):
        ans = "No"
        break
 
print(ans)
n,m = map(int, input().split())
A = sorted(map(int, input().split()), reverse = True)
suma = sum(A)
if A[m-1]>= suma/(4*m):
    print('Yes')
else:
    print('No')
def calc():
    summ  = sum(A)
    low = summ / (4*M)
    newlist = [i for i in A if i >= low]
    num = len(newlist)
    
    if M <= num:
        print ("Yes")
    else:
        print ("No")

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

#N, M = 5, 2
#A = [110, 2, 20, 10, 0]
calc()
import math

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

cond = sum(AS) / (4 * M)
AS = sorted(AS, reverse=True)

origin = AS[0:M]
result = list(filter(lambda a: a >= cond, origin))

if origin == result:
    print("Yes")
else:
    print("No")
#!/usr/bin/env python3
# -*- coding: utf-8 -*-*-

from sys import stdin


def main():
    N, M = map(int, stdin.readline().split())
    A = list(map(int, stdin.readline().split()))
    j = sum(A) / (4 * M)
    cnt = 0
    for a in A:
        if a >= j:
            cnt += 1
            if cnt == M:
                print('Yes')
                return
    print('No')


if __name__ == "__main__":
    main()
n, m = map(int, input().split())
x = [int(i) for i in input().split(maxsplit=(n-1))]

sum = 0
count = 0
for i in x:
    sum += i

con = (1/(4*m))*sum

for i in x:
    if i >= con:
        count += 1
    if count == m:
        print('Yes')
        exit()
print('No')
N,M=map(int,input().split())
A=list(map(int,input().split()))
k=0
l=0
for i in range(N):
    k+=A[i]
for i in range(N):
    if ((A[i]/k)>=(1/(4*M))):
        l+=1
if l>=M:
    print('Yes')
else:
    print('No')
#スペース区切りの整数の入力
N,M = map(int, input().split())

#スペース区切りの整数の入力リスト
A_list = list(map(int, input().split()))
A_list_sum = sum(A_list)


count = 0
aa = A_list_sum/(4*M)
#print(aa)
for  i in range(len(A_list)):
  #print(i)
  if(A_list[i]>=aa):
    count = count + 1
    #print(count)
    
if(count >= M):
  print("Yes")
else:
  print("No")
#print(A_list_sum)
V=0;
o=input().rstrip().split(' ')
p=input().rstrip().split(' ')
S=0;
for i in range(0,len(p)):
    S+=int(p[i])
D=(1/(4*int(o[1])))*100;
p.sort(key=int,reverse=True)
for i in range(0,int(o[1])):
    G = (int(p[i])/S)*100;
    if G >= D:
        continue;
    else:
        V=1;
        break;
#print(D,G)
if V==0:
    print("Yes")
else:
    print("No")
n , m = map(int,input().split())
a = list(map(int,input().split()))
ans = 0
p = sum(a)
for i in range(n):
    if a[i] >= p/(4*m):
        ans += 1

if ans >= m:
    print("Yes")
elif ans < m:
    print("No")
N,M=map(int,input().split())
ls = list(map(int,input().split()))
ls1 = [0]*N
s = sum(ls)
for i in range(N):
  if ls[i]>=s/(4*M):
    ls1[i]=1
ss = sum(ls1)
if ss>=M:
  print("Yes")
else:
  print("No")
def solve():
    n,m = map(int,input().split())
    a = tuple(map(int,input().split()))
    s = sum(a)
    level = (s+4*m-1)//(4*m)
    cnt = 0
    for i in a:
        if i>=level:
            cnt+=1
    if cnt>=m:
        print('Yes')
    else:
        print('No')
if __name__=='__main__':
    solve()
#B
import numpy as np
n,m=map(int,input().split())
a=list(np.fromstring(input(),int,sep=' '))
a.sort(reverse=True)
if a[m-1]<sum(a)/(4*m):
    print("No")
else:
    print("Yes")
import math
N, M = map(int, input().split())
A = list(map(int, input().split()))
c = 0
t = math.ceil(sum(A)/(4*M))

for i in A:
    if i >= t:
        c += 1
if c >= M:
    print("Yes")
else:
    print("No")
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
cnt = 0

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

if cnt >= 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 (a < (sum(A) / (4 * M))):
    continue
  count += 1

result  = 'Yes' if (count >= M) else 'No'
print(result)
n, m = map(int, input().split())
a = input().split()
a = [int(_) for _ in a]

total_amount = sum(a)
threshold = 1/(4*m) * total_amount
clear_a = [_ for _ in a if _ >= threshold]
if len(clear_a) >= m:
  print('Yes')
else:
  print('No')
N, M = map(int, input().split())
aaa = list(map(int, input().split()))
acc = sum(aaa)
print('Yes' if sum(4 * M * a >= acc for a in aaa) >= M else 'No')
import os
import math

def main():
	n,m = map(int, input().split())
	a_list = list(map(int, input().split()))
	total_check = math.ceil(sum(a_list)/(4*m))
	
	a_list.sort(reverse=True)
	flag = True
	for i in range(m):
		if a_list[i] < total_check:
			flag = False
			break
	if flag:
		print("Yes")
	else:
		print("No")


if __name__ == "__main__":
	main()
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) / (4*y):
        cnt += 1
else:
    pass

if cnt >= y:
    print("Yes")
else:
    print("No")
n=[int(i) for i in input().split()]
m=[int(j) for j in input().split()]
a=sum(m)*1/(4*n[1])
l=[]
for k in m:
    if k>=a:
        l.append(k)

if len(l)>=n[1]:
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
a = list(map(int,input().split()))

check = sum(a) /4/m
count = 0
for i in range(n):
  if a[i] >= check:
    count += 1

if count >= 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 A[i]>=(sum(A)*1/4/M):
        count+=1

if count>=M:
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
li = list(map(int,input().split()))
soutouhyou = sum(li)
tokuhyou = soutouhyou/(4*m)
num = sum(x >= tokuhyou for x in li)
if num >= m:
    print("Yes")
else:
    print("No")
N, M = map(int, input().split(' '))
lis1 = list(map(int, input().split(' ')))
S = sum(lis1)
thresh = S / (4 * M)
lis2 = sorted(lis1)
if lis2[-M] < thresh:
  print('No')
else:
  print('Yes')
def main():
    n, m  = [int(x) for x in input().split(" ")]

    arr = [int(x) for x in input().split(" ")]

    sum = 0

    for i in arr:
        sum += i

    arr.sort()

    if (arr[n-m] < sum/(4*m)):
        print("No")
    else:
        print("Yes")

main()
n,m = map(int,input().split())
a = list(map(int,input().split()))
total = sum(a)
thred = total/(4*m)
if len([i for i in a if i>=thred]) >= m:
    print('Yes')
else:
    print('No')
N,M = map(int,input().split())
Alist = list(map(int,input().split()))

cond = sum(Alist) * (1 / (4 * M))
count = 0

for A in Alist:
    if A >= cond:
        count += 1

if count >= M:
    print('Yes')
else:
    print('No')
# import math
n,m=map(int, raw_input().split())
arr=map(int, raw_input().split())
s=sum(arr)
arr.sort()
k=m
for i in xrange(n-1,-1,-1):
    if arr[i]>=s/(4.0*m) and k>0:
        k-=1
 
if k>0:
    print 'No'
else:
    print 'Yes'
n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse = True)
temp = 1/(4*m)*(sum(a))
res = list(filter(lambda x:x<temp, a[:m]))
if len(res) == 0:
    print('Yes')
else:
    print('No')
n,m=map(int,input().split())
A=list(map(int,input().split()))
all=int(0)
for i in range(n):
    all+=A[i]
cnt=int(0)
for i in range(n):
    if A[i]>=all/4/m:
        cnt+=1
if cnt>=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 a[i] >= sum(a) / (4*m):
        count += 1
if count >= m:
    print('Yes')
else:
    print('No')
n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort()
a.reverse()

s = sum(a)
for i in range(m):
    if a[i] < s / (4 * m):
        print('No')
        exit(0)

print('Yes')
N,M = map(int,input().split())
A = list(map(int,input().split()))
s = sum(A)
t = 0
for x in A:
    if 4*M*x >= s:
        t += 1
print("Yes" if t >= M else "No")
n, m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
cnt = 0
for i in range(n):
    if a[i] >= s / (4 * m):
        cnt += 1

if cnt >= m:
    print('Yes')
else:
    print('No')
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
suma=sum(a)
cnt=0
for i in a:
    #print(i)
    if i*4*m>=suma:
        cnt+=1
if cnt>=m:print('Yes')
else:print('No')
N, M = map(int,input().split())
A = list(map(int,input().split()))
counter = 0
border = sum(A)/(M*4)

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

if counter >= M:
  print('Yes')
else:
  print('No')
n,m=map(int, input().split())
a_list=[int(i) for i in input().split()]

a_list.sort(reverse=True)
#print(a_list)

standard=sum(a_list)/(4*m)

#print(a_list[m-1])
#print(standard)
if a_list[m-1]<standard:
    print("No")
    
else:
    print("Yes")
n, m = map(int, input().split())
votes = [int(i) for i in input().split()]
z = sum(votes)
if sum(map(lambda x: x >= z / (4*m), votes)) >= m:
    print('Yes')
else:
    print('No')
from sys import stdin
n,m = map(int,input().split())
sen = list(map(int,input().split()))
count = 0
al = 0
for i in sen:
    al += i
for i in sen:
    if i >= al/(4*m):
        count += 1
if count >= m:
    print("Yes")
else:
    print("No")
N,M=map(int,input().split())
A=list(map(int,input().split()))
a=sum(A)
c=0
for i in range(N):
	if A[i]*4*M>=a:
		c+=1
if c>=M:
	print('Yes')
else:
	print('No')
from decimal import *

n , m = map(int, input().split())
arr = list(map(int, input().split()))
check = Decimal(1/(4*m)) * sum(arr)
count = 0
for i in arr:
	if i < check:
		continue
	else:
		count+=1
if count >= m:
	print("Yes")
else:
	print("No")
n, m = list(map(int, input().split()))
l = list(map(int, input().split()))

l.sort(reverse = True)

def check(l):
    l1 = [l[i] for i in range(0, m) if l[i] >= sum(l)/(m*4)]
    return len(l1) == m

if check(l):
    print('Yes')
else:
    print('No')
import sys
from collections import defaultdict
n,m=map(int,sys.stdin.readline().split())
l=list(map(int,sys.stdin.readline().split()))
l.sort()
l.reverse()
limit=(sum(l)/(4*m))
i=0
#print(l,'l')
while i<n and l[i]>=limit:
    i+=1
if i>=m:
    print('Yes')
else:
    print('No')
n, m = map(int, input().split())
a = list(map(int, input().split()))
print("Yes" if len([i for i in a if i/sum(a) >= 1/(4 * m)]) >= m else "No")
def resolve():
    a, b = map(int, input().split())
    input_data = [int(_) for _ in input().split()]
    input_data.sort(reverse=True)
    sum_data = sum(input_data)
    converge = sum_data * (1 / (4 * b))

    if(converge > input_data[b - 1]):
        print("No")
    else:
        print("Yes")
resolve()
N,M = map(int,input().split())
A = [int(i) for i in input().split()]
cnt = 0
for a in sorted(A,reverse=True):
    if (sum(A)/(4 * M)) <= a:
        cnt +=1 
    if cnt == M:
        print('Yes')
        break
    

if cnt < M:
    print('No')
# -*- coding: utf-8 -*-
import numpy as np

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

a = np.array(input().split(), dtype='int')

sum_a = np.sum(a)

b = np.sort(a)[::-1]

if b[m-1] >= sum_a / 4 / 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")
#!/usr/bin/python3
# -*- coding: utf-8 -*-
n, m = map(int, input().split())
a_list = list(map(int, input().split()))
sum_a = sum(a_list)
count = 0

for a in a_list:
    if a < sum_a / (4 * m):
        continue
    else:
        count += 1

if count >= m:
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A,reverse=True)
k = sum(A)/(4*m)
for a in A[:m]:
    if a<k:
        print('No')
        exit()
print('Yes')
n , m = map(int,input().split())
arr = list(map(int,input().split()))
add = sum(arr)
miniVotes = add/(4*m)
cnt = 0
for i in range(len(arr)):
	if arr[i]>=miniVotes:
		cnt+=1
if(cnt>=m):
	print("Yes")
else:
	print("No")
N, M = map(int, input().split())
A = list(map(int, input().split()))
t = 0
S = 0
for Ai in A:
    S=S+Ai

for Ai in A:
    if Ai >= S/(4*M):
        t = t+1

if t >= M:
    print('Yes')
else:
    print('No')
N,M = map(int, input().split())
A = [int(a) for a in input().split()]

A.sort(reverse=True)
if A[M-1] >= sum(A)/4/M:
    ans = "Yes"
else:
    ans = "No"
print(ans)
import sys

read = sys.stdin.read
readline = sys.stdin.readline

N, M, *A = map(int, read().split())
s = sum(A) / (4 * M)
a = [i for i in A if i >= s]
if len(a) >= M:
    print('Yes')
else:
    print('No')
N, M = map(int, input().split(" "))
A = list(map(int, input().split(" ")))
sum_votes = sum(A)
count = 0
for i in range(N):
    if not sum_votes > A[i] * 4 * M:
        count += 1
if count >= M:
    print('Yes')
else:
    print('No')
#python3
def main():
    n, m = map(int, input().split())
    a = [int(i) for i in input().split()]
    s = sum(a)
    x = s/(4*m)
    c = 0
    for i in range(n):
        if x > a[i]:
            c += 1
    
    k = n-c
    if k >= m:
        print('Yes')
    else:
        print('No')
main()
N, M = map(int, input().split())
A_array = list(map(int, input().split()))
item = 0
vote_sum = sum(A_array)
boarder = vote_sum / (4 * M)

for a in A_array:
    if a >= boarder:
        item += 1
if item >= M:
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
input_lines = [int(l) for l in input().split()]

all_ = sum(input_lines)

if len([i for i in input_lines if i>=(all_/(4*m))])>=m:
    print('Yes')
else:
    print('No')
n, m = map(int,input().split())
A = list(map(int,input().split()))

total = sum(A)

th = total/(4*m)
A = sorted(A,reverse=True)

ans = 'Yes'
for i in range(m):
  if A[i] >= th:
    continue
  else:
    ans = 'No'
  

print(ans)
n,m=map(int,raw_input().split())
a=sorted(map(int,raw_input().split()))
print 'No' if 4*m*a[n-m]<sum(a) else 'Yes'
import sys
def input(): return sys.stdin.readline().strip()


def main():
    n, m = map(int, input().split())
    A = list(map(int, input().split()))

    num = 0
    s = sum(A)
    for a in A:
        if a >= s / (m * 4):
            num += 1
    if num >= m:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()
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')
N, M = map(int, input().split())
list_A = list(map(int, input().split()))

list_A = sorted(list_A, reverse=True)

total_vote = sum(list_A)

if M > len(list_A):
    answer = 'No'
elif (list_A[M -1] / total_vote) < 1/(4*M):
    answer = 'No'
else:
    answer = 'Yes'

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

a.sort(reverse = True)

x = sum(a) * (1 / (4 * m))

if a[m-1] >= x:
    print("Yes")
else:
    print("No")
import numpy as np

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

total_vote = np.sum(A)
threshold = total_vote/(4*M)
A.sort(reverse = True)
if A[M-1] >= threshold:
    print('Yes')
else:
    print('No')
n,m=map(int,input().split())
a=[int(ss) for ss in input().split()]
a=sorted(a,reverse=True)
r="Yes"
for ii in range(m):
  if a[ii]<sum(a)/(4*m):
    r="No"
    break
print(r)
n,m=map(int,input().split())
a=list(map(int,input().split()))
a=sorted(a,reverse=True)
total=sum(a)
c=0
for i in a:
    if i>=(total/(4*m)):
        c+=1
    if c==m:
        print('Yes')
        exit()

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()))

J = sum(A)/(4*M)
cnt = 0

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

if cnt>=M:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())

sss = list(map(int, input().split()))
sss.sort(reverse = True)

a = sum(sss)

if sss[m - 1]  < (a / (4 * m)):
  print('No')
else:
  print('Yes')
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")
import math
def I(): return(list(map(int,input().split())))
n,m=I()
a=I()
t=math.ceil((1/(4*m))*sum(a))
c=0
for i in a:
	if i>=t:c+=1
print(["No","Yes"][c>=m])
import numpy as np
N,M=map(int,input().split())
A=np.array(list(map(int,input().split())))
A=A>=np.sum(A)/(4*M)
if np.sum(A)>=M:
    print('Yes')
else:print('No')
N,M=map(int, input().split())
a = list(map(int, input().split()))
z = sum(a)
a.sort(reverse=True)

for i in a[:M]:
    if i < z/4/M:
        print('No')
        break
else:
    print('Yes')
n,m=map(int,input().split())
a=list(map(int,input().split()))

sumv=sum(a)
cnt=0
for i in a:
  if i>=sumv/(4*m):
    cnt+=1
print('Yes' if cnt>=m else 'No')
def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    threshold = sum(A) / (4 * M)
    if sorted(A, reverse=True)[M-1] >= threshold:
        print("Yes")
    else:
        print("No")


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

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

if A[M-1] < th: print('No')
else: print('Yes')
N, M = map(int,input().split())
An = list(map(int,input().split()))

S = sum(An)
A = [a for a in An if a * 4 * M >= S]

if len(A)>=M:
    print('Yes')
else:
    print('No')
# B - Popular Vote
N,M = map(int,input().split())
A = list(map(int,input().split()))
ans = ['No','Yes']
count = 0
for i in range(N):
    if A[i]>=sum(A)/(4*M):
        count += 1
print(ans[int(count>=M)])
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=1)
all=sum(a)
all=all/4/m






print('Yes' if a[m-1]>=all else 'No')
N, M = map(int, input().split())
A = list(map(int, input().split()))

check = ((1 / (4 * M)) * sum(A))
x = 0
for item in A:
    if item < check:
        x += 1

ans = N - x

if ans >= M :
    print('Yes')
else:
    print('No')
mn = input().split()
ob = input().split()

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

votes = 0

for i in range(n):
    ob[i] = int(ob[i])
    votes += ob[i]

ob.sort(reverse = True)

line = votes/4/m

ans = 0

for i in range(m):
    if ob[i] < line:
        ans += 1

if ans == 0:
    print("Yes")
else:
    print("No")