peterverebics/CodeNet_Python_118 huggingface dataset:
from sys import stdin
import math
import fractions

n, m = [int(x) for x in stdin.readline().rstrip().split()]
a = [int(x) for x in stdin.readline().rstrip().split()]

cnt = 0
suma = sum(a)

for aa in a:
    if aa  >= suma / 4 / m:
        cnt += 1

if cnt >= m:
    print('Yes')
else:
    print('No')
#!/usr/bin/python3
n,m = map(int,input().split())
List_a = list(map(int,input().split()))
List_a.sort(reverse=True)
Condition = sum(List_a) / (4*m)
for i in range(m):
    if List_a[i] < Condition:
        print("No")
        exit()
print("Yes")
import numpy as np

N,M = map(int, input().split())
An = np.array(input().split(), dtype=int)

vote_sum = np.sum(An)
judge = np.where(An >= vote_sum /(4 * M), 1, 0)
judge_sum = np.sum(judge)

if(judge_sum >= M):
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
s = 0
for i in range(n):
  s += a[i]

if a[m-1] < s/(4*m) :
  print("No")
else:
  print("Yes")
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())
lst = [int(i) for i in input().split()]
count = 0
for i in range(n):
  if lst[i] >= (1/(4*m))*sum(lst):
    count += 1

if count < m:
  print("No")
else:
  print("Yes")
n, m = map(int, input().split())
As = list(map(int, input().split()))

sou = sum(As)
th = sou/4/m
count = 0
for e in As:
  if e >= th:
    count += 1
    if count == m:
      print('Yes')
      break
if count < m:
  print('No')
import numpy as np
 
N, M = map(int, input().split())
A = list(map(int, input().split()))
 
A = np.array(A)
 
num = len(A[A>=A.sum()/(4*M)])
 
if num >= M:
  print('Yes')
else:
  print('No')
n, m = (int(i) for i in input().split())
pop = [int(i) for i in input().split()]

minval = sum(pop) / (4 * m)

nqual = sum(1 for p in pop if p >= minval)

if nqual >= m:
  print('Yes')
else:
  print('No')
N, M = map(int, input().split())
listA = list(map(int, input().split()))
i = len(listA)
tokuhyousuu = sum(listA)
a = -(-tokuhyousuu // (4 * M))
ninnkiList = [i for i in listA if not i < a]
ninnkisyouhinn = len(ninnkiList)
if ninnkisyouhinn < M:
    print('No')
else:
    print('Yes')
N, M = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]

lower_lim = sum(A) * (1 / (4 * M))

if any(s < lower_lim for s in sorted(A, reverse=True)[:M]):
    print("No")
else:
    print("Yes")
if __name__ == '__main__':
	N, M = map(int, input().split())
	A = [int(a) for a in input().split()]

	th = sum(A)/4/M

	A.sort(reverse=True)



	if A[M-1] >= th:
		print('Yes')
	else:
		print('No')
m,n=map(int,input().split())
products=list(map(int,input().split()))
products.sort()
products.reverse()
s=0
y=0
maru=0
batu=0
for x in products:
    y=y+x
for i in range(n):
    if y<=products[i]*4*n:
        maru=maru+1
    else:
        batu=batu+1
if batu==0:
    print('Yes')
else:
    print('No')
n, m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
ans = 0
for i in range(n):
  if(a[i] >= s/(4*m)):
    ans += 1
    
if(ans >= m):
  print("Yes")
else:
  print("No")
N,M=map(int,input().split())
A=list(map(int,input().split()))
all=0
for i in range(N):
  all+=A[i]
  i+=1
count=0
for i in range(N):
  if A[i]>=all*1/(4*M):
    count+=1
if count>=M:
  print('Yes')
else:
  print('No')
n, m = map(int, input().split())
a = [int(s) for s in input().split()]
limit = sum(a) / (m * 4)
a.sort(reverse=True)
for i in a[: m]:
    if i < limit:
        ans = 'No'
        break
    else:
        ans = 'Yes'
print(ans)
n, m = map(int, input().split())
a = list(map(int, input().split()))
t = sum(a) / (4 * m)
l = sum(x >= t for x in a)
if l >= m:
    print("Yes")
else:
    print("No")
n,m = map(int,input().split());
a = list(map(int,input().split()));

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

count = 0

for tg in l:
	if tg >= 1 / (4 * m)* sum(l):
		count += 1


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

vote_sum = sum(A)
min_needed = (vote_sum + 4 * M - 1) // (4 * M)

A.sort(reverse=True)

print("Yes" if A[M - 1] >= min_needed else "No")
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
ans = 0
total = sum(A)
thre = total / (4 * M)

for a in A:
    if a < thre:
        break
    ans += 1

if ans >= M:
    print("Yes")
else:
    print("No")
if __name__ == '__main__':
    n, m = tuple([int(i) for i in input().split()])
    a = [int(i) for i in input().split()]
    total = float(sum(a))

    selected = [float(i) >= (total / (4.0 * m)) for i in a]
    result = len([r for r in selected if r])

    print("Yes" if result >= m else "No")
n, m = map(int, input().split())
a = list(map(int, input().split()))

ans = "Yes"
vote = sum(a)

a_sort = sorted(a, reverse=True)

# print(vote, a_sort)

if a_sort[m-1] < vote * 1/(4*m):
  ans = "No"

print(ans)
n,m = map(int, input().split())
A = list(map(int,input().split()))

min_limit = sum(A)*(1 / (4*m))
select_ok = 0

for i in A:
  if i >= min_limit:
    select_ok += 1

if select_ok >= m:
  print("Yes")
else:
  print("No")
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N, M = [int(x) for x in input().split()]
    A = [int(x) for x in input().split()]

    total = sum(A)
    ans = 0
    for a in A:
        if a >= (total / (4 * M)):
            ans += 1

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


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

sum_A = sum(A_list)

border = sum_A/(4*M)
cnt = 0

for i in range(N):
    if A_list[i] >= border:
        cnt += 1
    else:
        break
    
if cnt >= M:
    print('Yes')
else:
    print('No')
num = input().split()
type = int(num[0])
target = int(num[1])
list = input().split()
listnum = []
for i in list:
  listnum.append(int(i))

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

for i in listnum:
  if i >= sum/(4*target):
    count += 1

if count >= target:
  print("Yes")
else:
  print("No")
N, M = map(int,input().split())
A = list(map(int, input().split()))
eligible = sum(A)/4/M


if len(list(filter(lambda x: x >=eligible, A)))>=M :
    print("Yes")
else:
    print("No")
N,M = map(int,input().split())
count= 0
a = [int(i) for i in input().split()]
a_new = sorted(a,reverse=True)
for i in range(M):
    if a_new[i] >= (sum(a)*(1/(4*M))):
        count += 1
        
print('Yes' if count==M else 'No')
import numpy as np
import math
import collections
import fractions
import itertools

def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))
def iput(): return int(input())

def solve():
    n, m = mput()
    a = lput()
    line = sum(a) / (4 * m)
    bit = 0
    for i in a:
        if i >= line:
            bit += 1
    if bit >= m:
        print("Yes")
    else:
        print("No")
    return 0

if __name__ == "__main__":
    solve()
def main():
    n,m = map(int, input().split())
    a = sorted(list(map(int, input().split())),reverse = True)
    all = sum(a)
    cnt = 0
    for i in(a):
        if(i * 4 * m >= all and cnt < m):
            cnt += 1
    if cnt >= m:
        print('Yes')
    else:
        print('No')
main()
in1 = input().split()
in1num = [int(x) for x in in1]
a = input().split()
anum = [int(x) for x in a]
sum_a = sum(anum)
anum.sort(reverse=True)

N = in1num[0]
M = in1num[1]

#print(sum_a)
#print((sum_a)/(4*M))
#print(anum[M-1])

if anum[M-1] >= (sum_a)/(4*M):
  print("Yes")
else:
  print("No")
n, m = map(int, input().split())
a = list(map(int, input().split()))
l = sorted(a, reverse=True)
sum = sum(l) / 4 / m
count = 0

for i in range(len(l)):
    if l[i] >= sum:
        count += 1
    else:
        break


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

x = (1 / (4 * M)) * sum(A)
A = [a for a in A if a >= x]

print('Yes' if len(A) >= M else 'No')
import numpy as np

n, m = map(int, input().split())
v_list = list(map(int, input().strip().split()))
v_ar = np.array(v_list)
total = v_ar.sum()
th = total/(4 * m)
print('Yes' if m <= np.count_nonzero(v_ar >= th) else 'No')
n,m = map(int,input().split())
a= list(map(int,input().split()))
s = sum(a)
t = s/(4*m)
mu = sorted(a)[-m]
if mu<t:
  print('No')
else:
  print('Yes')
N, M = map(int, input().split())
A = list(map(int, input().split()))
ans = 0
for i in A:
  if i >= sum(A)/(4*M):
    ans += 1
print("Yes" if ans >= M else "No")
import math

N, M = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]

sumA = 0
for i in range(N):
  sumA += A[i]

can_be_chosen = 0
for i in range(N):
  if A[i] >= sumA/4.0/M:
    can_be_chosen += 1

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

i=0
s=0

while(i<N):
  s+=list[i]
  i+=1

m=s/(4*M)

list.sort(reverse=True)

r="Yes"
j=0

while(j<M):
  if(list[j]<m):
    r="No"
  j+=1
print(r)
a=input().split(" ")
n=int(a[0])
m=int(a[1])
b=input().split(" ")
num=[]
total=0
for i in range(n):
    num.append(int(b[i]))
    total+=int(b[i])
num=sorted(num,reverse=True)

if num[m-1]>=total/(m*4):
    print("Yes")
else:
    print("No")
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))

a_sum = sum(a)
cnt = 0

def check(ai, m, a_sum):
    return ai*4*m >= a_sum

for ai in a:
    if check(ai, m, a_sum):
        cnt += 1

if cnt >= m:
    print("Yes")
else:
    print("No")
N,M = map(int,(input().split()))
A=list(map(int,(input().split())))
new_A=[i for i in A if i>=sum(A)/(4*M)]
if(len(new_A)>=M):
  print("Yes")
else:
  print("No")
# -*- coding: utf-8 -*-

def solve():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    B = sum(A)
    if sum(a>=B/4/M for a in A) >= M:
        return 'Yes'
    else:
        return 'No'
        
if __name__ == '__main__':
    print(solve())
N,M = map(int,input().split())
A = list(map(int,input().split()))
B = sum(A)*(1/(4*M))
ans = 0
for i in range(N):
    if A[i]>=B:
        ans += 1
if ans >= M:
    print("Yes")
else:
    print("No")
N,M=(int(x) for x in input().split())
A=[int(x) for x in input().split()]
tot=0
S=sum(A)
for i in range(N):
    if A[i]>=S*0.25/M:
        tot+=1
if tot>=M:
    print("Yes")
else:
    print("No")
N,M=map(int,input().split())
A=list(map(int,input().split()))
ALL=sum(A)
ave=ALL/(4*M)
count=0
for i in range(N):
    if(A[i]>=ave):
        count+=1
    else:
        pass
if(count>=M):
    print("Yes")
else:
    print("No")
n,m=map(float,input().split())
a=list(map(float,input().split()))
s=sum(a)
cnt=0
for item in a:
    if(item>=s/4/m):
        cnt+=1
print("Yes" if cnt>=m else "No")
import sys
N,M=map(int, sys.stdin.readline().split())
A=map(int, sys.stdin.readline().split())
b=float(sum(A))/M/4
cnt=0

for a in A:
    if b<=a:
        cnt+=1

if M<=cnt:
    print "Yes"
else:
    print "No"
n,m=map(int,input().split())
vote=list(map(int,input().split()))
count=0
stan=sum(vote)/(4*m)
for i in range(len(vote)):
  if vote[i]>=stan:
    count+=1
if count>=m:
  print("Yes")
else:
  print("No")
N, M = input().split()
N = int(N)
M = int(M)
votes_str = list(input().split())
votes = [int(i) for i in votes_str]
votes_sum = sum(votes)
votes.sort(reverse=True)
thresh = votes[M-1]
if thresh < votes_sum/(4*M):
  print("No")
else:
  print("Yes")
# -*- coding: utf-8 -*-

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

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

sorted_A = sorted(A, key=lambda x: -x)
if sorted_A[M - 1] < th:
    print("No")
else:
    print("Yes")
def check(sum1,k,arr,m):
    count=0
    for i in arr:
        if(i >= k):
            count+=1
    if(count >= m):
        return True
    return False
inp=list(map(int,input().strip().split()))[:2]
n,m=inp[0],inp[1]
arr=list(map(int,input().strip().split()))[:n]
sum1=sum(arr)
k=sum1/(4*m)
a=check(sum1,k,arr,m)
if(a):
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
a = list(map(int,input().split()))
a.sort(reverse = True)

ans = sum(a)/(4*m)
if a[m-1] >= ans:
	print("Yes")
else:
	print("No")
N,M =map(int,input().split())
vote_list = list(map(int,input().split()))
                 
total=sum(vote_list)
popular_list = list(filter(lambda x: x>=total/(4*M),vote_list ))

if(len(popular_list)<M):
    print("No")
else:
    print("Yes")
n,m=map(int,input().split())
a=list(map(int,input().split()))
x=sum(a)/(4*m)
b=[]
for i in range(n):
  if a[i]>= x:
    b.append(a[i])
if len(b)>=m:
  print('Yes')
else:print('No')
N, M = [int(n) for n in input().split()]
A = sorted([int(n) for n in input().split()], reverse=True)
print('Yes' if len([m for m in A if m >= sum(A)/(4*M)]) >= M else 'No')
n,m = map(int,input().split())
a = list(map(int,input().split()))


total = 0
for num in a:
    total += num

pjn =  1/(4*m)
x = total * pjn
count = 0
for each_n in a:
    if each_n < x:
        continue;
    else:
        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)
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())
List=list(map(int,input().split()))
s=sum(List)
count=0
for i in range(n):
    if List[i]>=s/(4*m):
        count+=1

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


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

sum_A = sum(A) / 4 / m
cnt = 0

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

if cnt >= 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')
N,M=map(int, input().split())
An=list(map(int,input().split()))
An.sort(reverse=True)
total = 0
for a in An:
  total += a
if An[M-1] >= total / (4 * M):
  print('Yes')
else:
  print('No')
n,m = map(int, input().split())
a = list(map(int, input().split()))

votes = sum(a)
a.sort(reverse=True)

print("Yes") if all(e >= votes/(4*m) for e in a[:m]) else print("No")
N,M=map(int,input().split())
alist=list(map(int,input().split()))

border=sum(alist)/(4*M)
cnt=0
for a in alist:
  if a>=border:
    cnt+=1
    
#print(border)
#print(cnt)
if cnt>=M:
  print("Yes")
else:
  print("No")
N, M = map(int, input().split())
A = list(map(int, input().split()))
S = sum(A)

X = len([a for a in A if (a / S >= 1 / (4 * M))])
if X >= M:
    print('Yes')
else:
    print('No')
N, M = map(int, input().split())
A = list(map(int, input().split()))

vote = sum(A)
for i in range(N):
  if(A[i] >= vote/(4*M)):
    A[i] = 1
  else:
    A[i] = 0

if(M <= sum(A)):
  print("Yes")
else:
  print("No")
N, M = map(int, input().split())
A = list(map(int, input().split()))
sumA = sum(A[i] for i in range(N))

s = sum(A[i] / sumA >= 1 / (4 * M) for i in range(N))

if s >= M:
  print('Yes')
else:
  print('No')
N,M = (int(i) for i in input().split())

A = [int(i) for i in input().split()]

A.sort(reverse=True)

ans = "Yes"
for i in range(M):
  if A[i] < sum(A)/(4 * M):
    ans = "No"
    break

print(ans)
N , M =map(int,input().split())
A_n =list(map(int,input().split()))

B_n=sorted(A_n,reverse=True)

if B_n[M-1] >= sum(B_n)/(4*M) :
    print('Yes')
else:
    print('No')
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()))

s_A = sorted(A, reverse=True)
sum_A = sum(A)
cnt = 0
for i in range(N):
    if(s_A[i] >= (1/(4*M))*sum_A):
        cnt += 1
print("Yes" if cnt >= M else "No")
N,M=map(int,input().split())
A=list(map(int,input().split()))
B=sorted(A)
C=sum(B)
if C<=B[-M]*4*M:
    print("Yes")
else:
    print("No")
#!/usr/bin/env python3

N, M = list(map(int, input().split()))
a_list = list(map(int, input().split()))
total = sum(a_list)
b_list = [a for a in a_list if a >= total * (1 / (4 * M))]
ans = "Yes" if len(b_list) >= M else "No"

print(ans)
N, M = map(int, input().split())
A = [j for j in map(int, input().split())]
s = sum(A)
count = 0
m = s/4/M
for i in A:
    if i >= m:
        count += 1
print("Yes" if count >= M else "No")
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse = True)

def f():
    for i in range(M):
        if sum(A) / (4 * M) > A[i]: return False
    return True

if f():
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
votes = sorted(list(map(int,input().split())), reverse=True)

for i in range(M):
  if votes[i] < sum(votes) / (4 * M):
    print("No")
    exit()

print("Yes")
n, m = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]

total_vote = sum(a)

popular = [p for p in a if p >= total_vote/4/m]

if len(popular) >= m:
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
A = list(map(int,input().split()))
count = 0
total = 0
for i in range(N):
  total += A[i]
for j in range(N):
  if A[j] >= total / ( 4 * M ):
    count += 1
  else:
    pass
if count >= M:
  print("Yes")
else:
  print("No")
n,m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
count = 0
for i in a:
  if 1/(4*m) <= i/s:
    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 a:
    if sum(a)/(4*m) <= i:
        count+=1
print('Yes' if count >= m else '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')
def main():
    N,M = map(int,input().split())
    A = list(map(int,input().split()))
    G = sum(A)
    list.sort(A, reverse=True)
    i = 0
    while i < M:
        if A[i] / G < 1 / (4 * M):
            return "No"
            break
        i += 1
    return "Yes"
print(main())
n, m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
ans = 0
for x in a:
    if x * m * 4 >= s:
        ans += 1
if ans >= m:
    print('Yes')
else:
    print('No')
N, M = map(int, input().split())
A = list(map(int, input().split()))

total = sum(A)
A.sort(reverse=True)
if A[M-1] >= total / 4 / M:
    print('Yes')
else:
    print('No')
N,M=map(int, input().split())
A=list(map(int, input().split()))
A.sort(reverse=True)
if A[M-1] * 4 * M < sum(A):
  print("No")
else:
  print("Yes")
N, M = list(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):
    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)/(4*M):
    count +=1
print("Yes" if count>=M else "No")
n, m = map(int, input().split())

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

total = sum(a)

ans = 0
for i in range(n):
    if a[i] >= total/(4*m):
        ans += 1

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

list.sort(A, reverse = True)
S = sum(A)

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

S = sum(A)
if A[M - 1] < S * (1 / (4 * M)):
    print("No")
else:
    print("Yes")
n,m=map(int,input().split())
vote=sorted(list(map(int,input().split())),reverse=True)
condition=sum(vote)/(4*m)
if vote[m-1] < condition:
  print('No')
else:
  print('Yes')
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
A.sort(reverse=True)

sumPolls = sum(A)
criteria = sumPolls / (4 * M)

if A[M-1] < criteria:
  print("No")
else:
  print("Yes")
N, M = map(int,input().split())
A = list(map(int,input().split()))
select = 0
vote = sum(A)
for i in A:
    if 4 * M * i >= vote: select += 1
if select >= M: print("Yes")
else: print("No")
n, m = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]

s = sum(a)
a_select = [x for x in a if x >= s / (4 * m)]

print('Yes' if len(a_select) >= m else 'No')
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
A.reverse()
if A[M - 1] * 4 * M < sum(A):
    print("No")
else:
    print("Yes")
n,m = list(map(int, input().split()))
a = list(map(int, input().split()))
s = sum(a)/(4*m)
c = 0
for i in a:
    if i >= 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)
A_list = A[:M]

vote_sum = sum(A)
ans = 0

for i in A_list:
    if i/vote_sum < 1/(4*M):
        print("No")
        break
    else:
        ans +=1
if ans == M:
    print("Yes")
N, M = map(int, input().split())
A = list(map(int, input().split()))

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

if kosuu >= M:
  print("Yes")
else:
  print("No")
N,M=list(map(int,input().split(' ')))
A=list(map(int,input().split(' ')))
k=0
for i in range(0,N):
    if A[i]/sum(A)>=1/(4*M):
        k=k+1
if k>M-1:
    print('Yes')
else:
    print('No')
# coding: utf-8
N, M = map(int, input().split())
votes = list(map(int, input().split()))
total = sum(votes)
limit = total / (4 * M)
count = 0
for i in votes:
    if i >= limit:
        count += 1

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

Alst.sort(reverse = True)
k = sum(Alst) / M
if Alst[M-1] < k/4:
    print('No')
else:
    print('Yes')
N, M = map(int, input().split())
A = list(map(int, input().split()))
s = sum(A)/(4*M)
c = 0
for a in A:
    if a >= s:
        c += 1
if c >= M:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
a = [int(x) for x in input().split()]

ng = sum(a) / (4 * m)
a.sort(reverse=True)
ans = 'Yes'
for i in a[:m]:
    if i < ng:
        ans = 'No'
print(ans)
def B():
    NM=list(map(int,input().split()))
    A=list(map(int,input().split()))
    
    sum_A=sum(A)
    ans_list=list(filter(lambda x: x>=sum_A*(1/(4*NM[1])), A))
    
    if len(ans_list)>=NM[1]: print('Yes')
    else : print('No')
        
        
if __name__=='__main__':
    B()
import math
n,m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
a.reverse()
s=sum(a)
if (a[m-1] >= math.ceil(s/(4*m))):
    print("Yes")
else:
    print("No")