peterverebics/CodeNet_Python_118 huggingface dataset:
N, M = map(int, input().split())
arrayA = input().split()
convertedArray = [int(ele) for ele in arrayA]
count = 0
total = sum(convertedArray)
con = int((1 / (4 * M)) * total)
print(con)
for A in convertedArray:
    if A > con:
        count += 1
if count >= M:
    print('Yes')
else:
    print('No')
N,M = (int(x) for x in input().split())
A_list = [int(x) for x in input().split()]
A_sum = sum(A_list)
Bool_list = []
for A in A_list:
    if A >= int(A_sum/(N*M)):
        Bool_list.append("True")
        
if (len(Bool_list)) >= M:
  print("Yes")
else:
  print("No")
n,m=map(int,input().split())
a=list(map(int,input().split()))
t=sum(a)
a=list(filter(lambda x: t/(4*m) < x, a))
print('Yes' if m <= len(a) else 'No')
n , m = map(int, input().split())

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

select = 0
all = sum(a)

for i in a:
    if i >= (all/4*m):
        select += 1


if  select >= m:
    print('Yes')
else:
    print('No')
N , M = (map(int , input().split()))
A = list(map(int , input().split()))
s = sum(A)
tou = (1/(4*M))*s
count = 0
for i in A:
    if i > tou:
        count += 1
if count >= 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))
count = 0
for i in arr:
	if i < check:
		continue
	else:
		count+=1
if count >= m:
	print("Yes")
else:
	print("No")
def main():
    N,M = map(int,input().split())
    A = list(map(int,input().split()))
    m_count = sum(x > sum(A)/(4*M) for x in A)
    if M <= m_count:
        print("Yes")
    else:
        print("No")
if __name__ == '__main__':
    main()
a = input()
numbers = a.split()
b = input()
votes = b.split()
total = 0
try:
    for j in range(len(numbers)):
        numbers[j] = int(numbers[j])
    for l in range(len(votes)):
        votes[l] = int(votes[l])
    for k in votes:
        total = total + int(k)
    check = total/(4*int(numbers[1]))
    items = 0
    for i in votes:
        if int(i)>check:
            items = items+1
    if items >= int(numbers[1]):
        print("Yes")
    else:
        print("No")
except ValueError:
    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])

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

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

list.sort(a,reverse=True)
judge = 1

for i in range(m):
    if a[i]<= a_sum*1/(m*4):
        judge = 0
        break

if judge == 0:
    print('No')
else:
    print('Yes')
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n, m = map(int, input().split())
    a = list(map(int, input().split()))
    limit = sum(a) / (4 * m)
    count = 0
    for i in range(n):
        if a[i] > limit:
            count += 1
    if count >= m:
        print('Yes')
    else:
        print('No')


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

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

print('Yes' if M <= ans else 'No')
a,b = [int(x) for x in input().split()]
l = list(map(int,input().split()))
total = sum(l)
l= sorted(l)[::-1];
if(l[b-1]*4*b>total):
  print("Yes")
else:
  print("No")
def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split(' ')))
    A.sort()
    A.reverse()
    total = sum(A)
    for i in range(M):
        if total // (4 * M) < A[i]:
            continue
        print('No')
        return
    print('Yes')
main()
from bisect import bisect

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

#print(M)
A.sort()
#print(A)

limit = sum(A)/(4*M)
#print(limit)

n = bisect(A, limit)
if N-n > M:
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
a = list(map(int,input().split()))

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

if cnt>=m:
  print('Yes')
else:
  print('No')
species, num = [int(i) for i in input().split()]
votes = [int(i) for i in input().split()]

sum_vote = sum(votes)
min_rate = sum_vote / 4 / species
votes.sort(reverse=True)

ans = 'Yes' if votes[num - 1] >= min_rate else 'No'

print(ans)
num = []
vote = []
num = list(map(int,input().split()))
vote = list(map(int,input().split()))
N = num[0]
M = num[1]
j = int(sum(vote)/(4*M))
#print(j)

cnt = 0
for i in range(0,len(vote)):
    if  vote[i]>=j:
        cnt += 1
    else:
        pass
#print(cnt)
if M<=cnt:
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
item_vote = list(map(int, input().split()))
total_vote = sum(item_vote)
item_vote = sorted(item_vote, reverse=True)
boder = int(total_vote/(4*M))
if item_vote[M-1] >= boder:
    print('Yes')
else:
    print('No')
n,m = tuple(map(int,input().split()))
arr = [int(x) for x in input().split()]
total = sum(arr)
mm = total //(4*m)
mask  = [ x >= mm for x in arr]
if sum(mask) >= m:
  print("Yes")
else:
  print("No")
def ans():
    n ,m = map(int, raw_input().split())
    A = list(map(int, raw_input().split()))

    divider = sum(A) / (4 * m + 1e-16)

    stack = 0
    for a in A:
        if stack == m:
            return "Yes"
        
        if a >= divider:
            stack += 1

    return "No"        


print ans()
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
sumA = sum(a)

sumBy4 = sumA/(4*m)

count = 0

for i in range(n):
    if(a[i] > sumBy4):
        count += 1

if(count >= m):
    print("YES")

else:
    print("NO")
import sys
N,M = map(int, input().split())
A = list(map(int, input().split()))
sorted_A = sorted(A, reverse=True) 
all_A = sum(A)

rule = (1/(4*M))

ans = 0

for i in A:
    if (i / all_A) > rule:
        ans = ans + 1
    else:
        pass

if ans >= M:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
arr = list(map(int, input().split()))
sums = 0
for i in arr:
    sums = sums + i
check = (1 / (4*m))*sums
for i in arr:
    if i < check:
        print("No")
        break
    else:
        continue
n, m = tuple(map(lambda x: int(x), input().split(" ")))
a = tuple(map(lambda x: int(x), input().split(" ")))
d = sum(a) / (4 * m)
c = 0
for v in a:
    if v > d:
        c += 1
print("No" if c < m else "Yes")
N,M = map(int,input().split())
A = list(set((map(int,input().split()))))
print(A)
vote=[]
for B in A:
    if B>(1/(4*M)*sum(A)):
        vote.append(B)
if len(vote) >= M:
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
num_list = list(map(int, input().split()))
sorted_list = sorted(num_list, reverse=True)

hoge = 4*M
thr = sum(num_list) // hoge

ans = 'Yes'
if sorted_list[M-1] < thr:
    ans = 'No'


print(ans)
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
A_sorted = sorted(A, reverse=True)
max_numbers = A_sorted[:M]
A_sum = sum(A)
print("sum:", sum(A))
for i in max_numbers:
    if i < A_sum / (4 * M):
        print("No")
        break
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):
		count += 1


if count > m:
	print("Yes")
else:
	print("No")
n,m = map(int,input().split())
ai = list(map(int,input().split()))
s = sum(ai)
count = 0
for i in ai:
  if i > s/4/m:
    count += 1
if count >= m:
  print('Yes')
else:
  print('No')
items,select = input().split()
x = [int(items) for x in input().split()]
for u in x:
    if u > (1 / (4 * int(select))):
        print("No")
        break
    else:
        print("Yes")
        break
i1 = input()
i2 = input()

# i1 = "4 1"
# i2 = "5 4 2 1"
list1 = [int(s) for s in i1.split()]
list2 = [int(s) for s in i2.split()]

n = list1[0]
m = list1[1]


total = sum(list2)

# 選べる
count = 0

for a in range(m):
    if (list2[a]/total > 1/(4*m)):
        count += 1 

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

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

th = sum(A) / 4 * M
flag = True
for i in range(M):
    if A[i] < th:
        flag = False
        break

if flag:
    print("Yes")
else:
    print("No")
N,M= map(int,input().split())
A = list(map(int, input().split()))
count=[i for i in A if i>=(sum(A)/4*M)]
if len(count)>=M:
    print("Yes")
else:
    print("No")
N, M= map(int, input().split())

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

A = list(C)

B = []
for i in range(len(A)):
    if A[i] > sum(A)/4/M:
        B.append(1)
    else:
        B.append(0)

if sum(B) > N - M  +1:
    print('Yes')
else:
    print('No')
import math
n, m = map(int, input().split())
a = sorted(list(map(int,input().split())))
suma = int(sum(a) / (4 * m))
a = [i for i in a if i >= suma]
ans = (len(a) >= m)
print("Yes" if ans else "No")
N,M = map(int,input().split())
A = list(map(int,input().split()))

cut = int(sum(A)/(4*int(M)))

count = 0

for i in A:
    if i >= cut:
        count += 1

if count >= M:
    print("Yes")
else:
    print("No")
N,M = map(int,input().split())
A=list(map(int,input().split()))
A.sort
B=len(A)
c=0
for i in range(B):
 c+=A[i]
if A[B-M]>=c/4:
 print("Yes")
else:
 print("No")
N,M = map(int, input().split())
A = [int(N) for N in input().split()]
list.sort(A, reverse=True)

sum = 0
i = 0
while i != N:
     sum += A[i]
     i += 1

vote = 0
i = 0
while i != M:
     vote += A[i]
     i += 1

# print('%d %d' %(vote,sum))
if vote >= sum // 4:
    print("Yes")
else:
    print("No")
from decimal import Decimal
n,m = map(int,input().split())
A = list(map(int,input().split()))
border = float(sum(A)/(4*m))
border2 = str(border)
border3 = Decimal(border2)
ans = 0
judge = 0
for i in range(n):
  if A[i] >= border3:
    ans+=1
if ans > m:
  print("Yes")
else:
  print("No")
def popularity(votes, N, M):
    
    total_votes = sum(votes)
    coef = 1.0 / (4.0 * M)
    limit = coef * total_votes
    
    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))
n, m = map(int, input().split())
a = list(map(int, input().split()))
count = 0
s = sum(a)
for i in range(n):
  if i >= s / (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 = sorted(a, reverse=True)

total = 0
for i in range(n):
    total += a[i]
min = total // (4 * m)

bool = True
for i in range(m):
    if a[i] >= min:
        continue
    else:
        bool = False

if bool == True:
    print('Yes')
else:
    print('No')
N, M = map(int, input().split())
A = list(map(int, input().split()))
c = 0

for i in A:
    if i >= sum(A)/4*M:
        c += 1
if c >= M:
    print("Yes")
else:
    print("No")
def calc(n,m,l):
    s=sum(l)
    q=0
    p=s//(4*m)
    for i in l:
        if (i>=p):
            q=q+1
    if(q>=m):
        return "Yes"
    else:
        return "No"
n,m=input().split()
n=int(n)
m=int(m)
x=input().split()
p=set(x)
l=list(map(int,p))

print(calc(n,m,l))
n, m = map(int, input().split())
points = [i for i in map(int, input().split())]

sumValue = sum(points)

candidates = [i for i in points if i > (sumValue/4*m)]

if len(candidates) >= m:
  print("Yes")
else:
  print("No")
N, M = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]
total_votes = sum(A)
minimum_votes = int(total_votes * (1 / (4 * M)))
eligible_products = 0

for vote in A:
    if vote >= minimum_votes:
        eligible_products += 1

if eligible_products >= 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())
s = list(map(int,input().split()))
s.sort(reverse = True)
s = s[:m]
if(s[-1]<sum(s)/(4*m)):
    print("No")
else:
    print("Yes")
import numpy as np
N, M = map(int, input().split())
A = list(map(int, input().split()))

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

L = np.maximum(judge, A)
L = list(L)
while judge in L:
    L.remove(judge)

if len(L) >= M:
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
a_list =  list(map(int, input().split()))
a_list.sort(reverse = True)
a_total = sum(a_list)
count = 0
for voted in a_list:
    if count >= M:
        print("Yes")
        break
    if voted < (1/(4*M))*a_total:
        pass
    else:
      count += 1
else:
    print("No")
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    N, M = map(int, input().split())
    A = list(map(int, input().split()))

    num = sum(A) // (4 * M)
    A.sort(reverse=1)
    if A[M-1] >= num:
        print('Yes')
    else:
        print('No')


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

sum = 0
for i in numList:
	sum += i

if sum > 1/(4*m):
  print("Yes")
else:
  print("No")
import math
num, m = map(int,input().split())
list = [int(x) for x in input().split()]

sorted(list, reverse = True)
least = math.floor(sum(list) * (1/(4*m)))
count = 0

print(least)

for i in range(m):
    if list[i] < least:
        print("No")
        print(list[i],"<",least)
        break
    else:
        count += 1

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

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

print("Yes" if cnt > M else "No")
n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
print("YNeos"[sum([sum(a)/(4*m)>=a[i] for i in range(m)])<m::2])
n,m = map(int,input().split())
lis = list(map(int,input().split()))
lis.sort()
t = sum(lis)
c=0
for i in range(len(lis)):
  if(lis[i]>(1/(2*m))):
    c+=1
if(c>=m):
  print("YES")
else:
  print("NO")
N, M = map(int, input().split())
A = list(map(int, input().split()))

vote = []
all = 0

for j in range(N):
    all += A[j]

for i in range(N):
    if A[i] > all // (4 * M):
        vote.append(A[i])

if len(vote) >= M:
    print("Yes")

else:
    print("No")
import math
N,M = map(int,input().split())
l = [int(i) for i in input().split()]
l.sort(reverse = True)
l_sum = sum(l)
d = (1/(4*M))*l_sum
cnt = 0
 
for i in range(N):
    if l[i] > d:
        cnt += 1
    else:
        break
 
if cnt >= M:
    print("Yes")
else:
    print("No")
n,m = map(int, input().split())
arr = list(map(int, input().split()))

total = sum(arr)

temp = total/(4*m)

ans =0
for i in arr:
    if i>=temp:
        ans+=1

if ans>m:
    print("Yes")
else:
    print("No")
N,M=map(int,input().split())
A=list(map(int,input().split()))
ans='No'
sum=0
b=1/(4*M)
c=0
for i in range(N):
  c+=A[i]
d=c*b
for i in range(N):
  if int(d)<A[i]:
    sum=sum+1
  if sum==M:
    ans='Yes'
print(ans)
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=sum(a)
for i in range(n):
    if a[i]<b/(4*m):
        a[i]=0
c=list(set(a))
if len(c)-1>=m:
    print('Yes')
else:
    print('No')
N, M = map(int, input().split())
A = list(map(int, input().split()))
sumA = sum(A)
print('Yes' if sum([1 if a >= sumA//(4*M) else 0 for a in A]) >= M else 'No')
n,m=map(int,input().split())
a=[int(x) for x in input().split()]
b=sorted(a, reverse=True)
if b[1] >= sum(a)/(4*m):
  print('Yes')
else:
  print('No')
N, M = map(int, input().split())
A = list(map(int, input().split()))

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

over_count = sum([1 if a > thresh_score else 0 for a in A])
print('Yes' if over_count > M else '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 / kind
for i in num:
    if int(i) >= total / ok:
        count += 1

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

for i in A:
    if i > sum(A)/(4*M):
        count += 1
    else:
        continue

if count >= M:
    print('Yes')
else:
    print('No')
n,m=map(int, input().split())
a=list(map(int, input().split()))
g=0
count=0
for i in a:
    g+=i
b = float(1/(4*m))
for i in a:
    t = float(i/g)
    if t>b:
        count+=1
    if count==m:
        print("Yes")
        exit()
if count < m:
    print("No")
n,m=map(int,input().split())
l=list(map(int,input().split()))
c=len([i for i in l if i > sum(l)/(4*m)])
print("Yes" if c>=m else "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)]) >= n else "No")
N, M = map(int, input().split())
a_list =  list(map(int, input().split()))
a_list.sort(reverse = True)
a_total = sum(a_list)
count = 0
for voted in a_list:
    if count >= M:
        print("Yes")
        break
    if voted >= (1/(4*M))*a_total:
        count +=1
else:
    print("No")
import numpy as np

tmp = input().split(" ")
allItem, trendingItem = int(tmp[0]), int(tmp[1])

votes = input().split(" ")
votesInt = np.asarray([int(s) for s in votes])
votesTotal = np.sum(votesInt)

standard = votesTotal // (4 * trendingItem)

clearList = votesInt[votesInt >= standard]

result = 'Yes' if len(clearList) >= trendingItem else 'No'

print(result)
n,m = map(int, input().split())
l=list(map(int, input().split()))

count=0
tres = sum(l)/(4*m)

for x in l:
    if x>tres:
        count+=1

if count>=m:
    print("YES")
else:
    print("NO")
N, K = map(int, input().split())
Nj = N
while True:
    Ni = Nj
    Nj = abs(Ni - K)
    if Ni > N:
        print(N)
        break
    elif Nj > Ni:
        print(Ni)
        break
    elif K == 1 or Nj == K:
        print(0)
        break
    else:
        continue
n, m = map(int, input().split())
l = list(map(int, input().split()))
t = []
for i in l: t.append(i)
total = sum(l)
t.sort(reverse = True)
for i in range(m):
    if t[i] < (1 // 4 * m) * total:
        print("No")
        exit()
print("Yes")
N, M = map(int, input().split())
A = map(int, input().split())
cnt = 0
for a in A:
  if a < M:
    cnt += 1
if M <= cnt:
  print('Yes')
else:
  print('No')
def calc(n,m,l):
    s=sum(l)
    q=0
    p=s//(4*m)
    for i in l:
        if(i>=1 and i<=1000):
            if (i >= p):
                q = q + 1
    if (q >= m):
            return "Yes"
    else:
            return "No"

n,m=input().split()
n=int(n)
m=int(m)
x=input().split()
p=set(x)
l=list(map(int,p))
if(n>=1 and n<=1000 and m>=1 and m<=1000):
    print(calc(n, m, l))
n,m=map(int,input().split())
a=list(map(int,input().split()))
sort=sorted(a,reverse=True)
b=sum(a)
count=0

for i in sort:
  count+=1
  if i<b/(4*m):
    break

if count-1>=m:
  print('Yes')
else:
  print('No')
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
        continue
    else:
        if count >= first_input[1]+1:
            print("Yes")
        else:
            print("No")
        break
N, M = map(int, input().split())
A = list(map(int, input().split()))

border = sum(A)/(4*M)
count = 0

popular = [i for i in A if i > border]
count = len(popular)

if count > M:
    print("Yes")
else:
    print("No")
n,m = input().split()
b = input().split()
sum = 0
for x in b:
    sum += int(x)
print(sum/(4.*int(n)))
if int(b[int(m)-1]) < sum/(4.*int(n)):
    print("No")
else:
    print("Yes")
# Code for B - Popular Vote
# Use input() to fetch data from STDIN
from math import floor

[n, m] = map(int, input().split())
a = list(map(int, input().split()))

total = sum(a)

if len(list(filter(lambda x: x >= floor(total / (4 * m)), a))) >= m:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
array=list(map(int, input().split()))
all = sum(array)
flag = 0
border = all/(4*m)
if array[n-1] >= border:
  print("Yes")
else:
  print("No")
n, m = map(int,input().split())
A = list(map(int,input().split()))

lim = 1/(4*m)

ans = 0
for a in A:
  if a>=lim:
    ans += 1
    
if ans >= m:
  print("Yes")
else:
  print("No")
n, m = map(int, input().split())
a = sorted(map(int, input().split()), reverse=True)
print("No" if min(a[:m]) < (sum(a) // (4 * m)) else "Yes")
N, M = map(int, input().split())
A = list(map(int, input().split()))
vote = sum(A) / (4 * M)
ans = 0
for a in A:
    if a > vote:
        ans += 1
print('Yes' if ans >= M else 'No')
N,M = map(int,input().split())
items = list(map(int,input().split()))
threshold = sum(items) * (1/(4*M))

selected = [i for i in items if i >= threshold]
print("Yes" if len(selected) > M else "No")
n, m = map(int, input().split())
A = list(map(int,input().split()))

a_sum = sum(A)
ans = 0
for i in range(n):
    if float(A[i]) > a_sum/(4*m):
        ans += 1


if ans >= m:
    print("Yes")
else:
    print("No")
in_ = input()
n, m = map(int, in_.split())
in_ = input()
a = map(int, in_.split())
a = sorted(a, reverse=True)
mm = int(sum(a) / (4. * m) + 0.5)
if a[m-1] >= mm:
    print('Yes')
else:
    print('No')
def read():
	return list(map(int, input().split()))

def main():
	n, m = read()
	a = read()
	number_of_popular_items = 0
	total_vote = 0
	total_vote = sum(a)
	for i in range(n):
		if a[i] >= total_vote//(4*m):
			number_of_popular_items += 1
	if number_of_popular_items >= m:
		print("Yes")
	else:
		print("No")
main()
N, M = map(int, input().split())
A = list(map(int, input().split()))
A = sorted(A, reverse=True)
sumA = sum(A)
if A[M - 1] > sumA / (4 * M):
    print("Yes")
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(' ')
print("Yes")
n, m = map(int, input().split())
a = list(map(int, input().split()))
sum = sum(a)

a.sort()


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

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


base =float(sum(A)) / 4.0*M
cond = all([float(e) >= base for e in A[:M]])
ans = 'Yes' if cond  else 'No'
print(ans)
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
s = sum(a)

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

print("Yes")
N, M = map(int, input().split())
A = list(set((map(int, input().split()))))
vote = []
for Ai in A:
    if Ai > (1 / (4 * M) * sum(A)):
        vote.append(Ai)
if len(vote) >= M:
    print("Yes")
else:
    print("No")
from fractions import Fraction

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

sum_p = sum(A) * Fraction(1, M * 4)
count = 0
for i in A:
    if i > sum_p:
        count += count + 1
if M <= count:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
A = list(map(int, input().split()))
total = sum(A)
count = 0
for i in A:
	if i > total / (4 * m):
		count += 1
if count >= m:
	print('Yes')
else:
	print('No')
x,y= list(map(int, input().split()))
i = list(map(int, input().split()))
i.sort(reverse=True)
k=sum(i)
flag=0
for j in range(y):
    if i[j]<(k/(4*(j+1))):
        pass
    else:
        flag+=1
if flag<y:
    print("No")
else:
    print("Yes")
N,M=map(int,input().split())
A=list(map(int,input().split()))

s=sum(A)

P=0 #選べる個数
for a in A:
    if 4*M*a>=s:
        P+=1
        
if P==M:
    print("Yes")
else:
    print("No")