We have held a popularity poll for N items on sale. Item i received A_i votes.
From these N items, we will select M as popular items. However, we cannot select an item with less than \dfrac{1}{4M} of the total number of votes.
If M popular items can be selected, print Yes; otherwise, print No.

-----Constraints-----
 - 1 \leq M \leq N \leq 100
 - 1 \leq A_i \leq 1000
 - A_i are distinct.
 - All values in input are integers.

-----Input-----
Input is given from Standard Input in the following format:
N M
A_1 ... A_N

-----Output-----
If M popular items can be selected, print Yes; otherwise, print No.

-----Sample Input-----
4 1
5 4 2 1

-----Sample Output-----
Yes

There were 12 votes in total. The most popular item received 5 votes, and we can select it.

Difficulty: introductory

Starter code:

Solutions:
n, m = map(int, input().split())
a = list(map(int, input().split()))
get = 0
count = 0

for i in a:
    get += i

for i in a:
    if i*4*m >= get:
        count += 1

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

import bisect
N,M=list(map(int,input().split()))
A=sorted(list(map(int,input().split())))
#print(A,sum(A)/4/M,A[N-M])
if sum(A)/4/M<=A[N-M]:
  print('Yes')
else:print('No')



def main() -> None:
    n, m = list(map(int, input().split()))
    products = sorted(list(map(int, input().split())))

    is_able = sum(products)/(4*m) <= products[-m]
    print(('Yes' if is_able else 'No'))
    return


def __starting_point():
    main()

__starting_point()

def resolve():
    n,m = map(int,input().split())
    a = sorted(list(map(int,input().split())),reverse=True)
    print('Yes' if a[m-1] >= sum(a)/4/m else 'No')
resolve()

n,m = map(int,input().split())
li = list(map(int,input().split()))
li.sort(reverse=True)

sum = 0
cnt = 0
for i in li:
    sum += i


if li[m-1]*4*m >= sum:
    print('Yes')
else:
    print('No')

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

n,m=map(int,input().split())
lst=list(map(int,input().split()))
sm=sum(lst)
if m<=sum([x>=sm/(4*m) for x in lst]):
    print("Yes")
else : print("No")

n,m=map(int,input().split())
l=list(map(int,input().split()))
l.sort()
flag=0
for i in range(n):
    if l[i]>=sum(l)/(4*m):
        if n-i>=m:
            print("Yes")
        else:
            print("No")
        flag=1
        break
if flag==0:
    print("No")

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

for i in A:
    if i >= sum(A)/(4*M):
        res.append(i)
if len(res) >= M:
    print("Yes")
else:
    print("No")

from typing import List


def answer(n: int, m: int, a: List[int]) -> str:
    ref_value = sum(a) / (4 * m)
    result = len(list(i for i in a if ref_value <= i))
    return 'Yes' if m <= result else 'No'


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


def __starting_point():
    main()
__starting_point()

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())
lis = sorted(list(map(int, input().split())), reverse=True)
con = 0

for i in range(n):
  if lis[i] >= sum(lis) * (1/(4*m)):
    con += 1
    if con == m:
      print("Yes")
      return

print("No")

n,m = map(int,input().split())
li = list(map(int,input().split()))
border = 4*m
popular=0
for i in range(len(li)):
    if(li[i] < sum(li)*(1/border)):
        continue
    popular+=1
if(popular >= m):
    print("Yes")
else:
    print("No")

n,m = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
a = a[::-1]
s = sum(a)
if a[m-1]<s/(4*m):
  print("No")
else:
  print("Yes")

n,m=map(int,input().split())
a=[*map(int,input().split())];t=sum(a)/(4*m)
print('YNeos'[sum([i>=t for i in a])<m::2])

n,m = list(map(int,input().split()))
a = list(map(int,input().split()))
sum = 0
cnt = 0
for i in a:
    sum += i
for i in a:
    if(sum <= 4*m*i):
        cnt += 1
if(cnt >= m):
    print("Yes")
else:
    print("No")


n,m = list(map(int, input().split()))
a = list(map(int, input().split()))
total = sum(a)
print('Yes' if sum([4*m*A >= total for A in a]) >= m else 'No')

N,M=list(map(int,input().split()))
A=list(map(int,input().split()))
A.sort(reverse=True)
x=sum(A)
for i in range(M):
    if 4*M*A[i]<x:
        print("No")
        break
else:
    print("Yes")


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


def readinput():
    n,m=list(map(int,input().split()))
    a=list(map(int,input().split()))
    return n,m,a

def main(n,m,a):
    a.sort(reverse=True)
    total=sum(a)
    if a[m-1]*(4*m)<total:
        return 'No'
    else:
        return 'Yes'

def __starting_point():
    n,m,a=readinput()
    ans=main(n,m,a)
    print(ans)

__starting_point()

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


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

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

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

import math
n, m = map(int,input().split())
a = list(map(int,input().split()))
count = 0

for i in range(n):
    if a[i] >= math.ceil(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()))
aa=sum(a)
count=0
for i in range(len(a)):
    if a[i]>=aa*(1/(4*m)):
        count+=1
    else:
        pass
if count>=m:
    print("Yes")
else:
    print("No")

N,M=map(int,input().split());*A,=sorted(map(int,input().split()));print("YNeos"[A[-M]*4*M<sum(A)::2])

def main():
    n, m = list(map(int, input().split()))
    a = [int(v) for v in input().split()]
    total = sum(a)
    variant = total * (1 / (4 * m))
    cnt = 0
    for i in a:
        if i >= variant:
            cnt += 1
    return "Yes" if cnt >= m else "No"


def __starting_point():
    print((main()))

__starting_point()

n, m = list(map(int, input().split()))
A = list(map(int, input().split()))
sorted_A = list(reversed(sorted(A)))
print(("No" if sorted_A[m-1] < sum(A)/(4*m) else "Yes"))


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

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

print("Yes" if count >= M else "No")

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

st = sum(a) / (4*m)
a.sort(reverse = True)
el = a[:m]

for i in range(m):
    if el[i] < st:
        print('No')
        return

print('Yes')


N,M=map(int,input().split())
A=input()
def ans161(N:int, M:int, A:str):
    A=sorted(list(map(int,A.split())))
    if A[-M]< sum(A)/(4*M):
        return "No"
    else:
        return "Yes"
print(ans161(N,M,A))

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

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

def N():
    return int(input())
def L():
    return list(map(int,input().split()))
def NL(n):
    return [list(map(int,input().split())) for i in range(n)]
mod = pow(10,9)+7

#import numpy as np
import sys
import math
import collections

n,m = L()
a = L()
h = sum(a)/(4*m)

a.sort(reverse=True)
for i in range(m):
    if a[i] < h:
        print("No")
        return

print("Yes")


n, m = list(map(int, input().split()))
a = sorted([int(x) for x in input().split()])
a.reverse()
s = 0
for x in a:
    s += x
print(("Yes" if a[m-1] >=  (s + 4 * m - 1) // (4 * m) else "No"))


def main():
    N, M = tuple([int(_x) for _x in input().split()])
    A = [int(_x) for _x in input().split()]
    total = sum(A)
    if total % (4*M) == 0:
        min_vote = total // (4 * M)
    else:
        min_vote = 1 + total // (4 * M)

    cnt = 0
    for vot in A:
        if vot >= min_vote:
            cnt += 1
    if (cnt >= M):
        print("Yes")
    else:
        print("No")


main()


N, M = list(map(int, input().split()))
A_list = list(map(int, input().split()))
A_list.sort(reverse=True)

check_num = A_list[M - 1]
if check_num / sum(A_list)  >= 1 / (4 * M):
  print('Yes')
else:
  print('No')


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

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

cnt = 0
for i in range(n):
    if a[i] >= std:
        cnt += 1

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


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

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

sums = sum(A)

A.sort(reverse=True)


if 4*M*A[M-1] >= sums:
    print('Yes')
else:
    print('No')

def i_input(): return int(input())
def i_map(): return list(map(int, input().split()))
def i_list(): return list(map(int, input().split()))
def i_row(N): return [int(input()) for _ in range(N)]
def i_row_list(N): return [list(map(int, input().split())) for _ in range(N)]

na,m=i_map()
aa=i_list()
cnt=0
aa.sort(reverse=True)
for i in range(m):
    if aa[i]*4*m>=sum(aa):
        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)
total = sum(a)
if a[m-1] *4*m < total:
  print('No')
else:
  print('Yes')

n, m = map(int, input().split())
aa = list(map(int, input().split()))
total_aa = sum(aa)
cnt = 0
for a in aa:
  if a >= sum(aa)/(4*m):
    cnt += 1
if cnt >= m:
  print('Yes')
else:
  print('No')

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

votes = sum(A)
tot = 0

for i in range(n) :
    std = votes * (1 / (4*m))
    if(A[i] < std) :
        continue
    tot += 1
if(tot >= m) :
    print("Yes")
else :
    print("No")

def __starting_point():

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

    A = list(map(int,input().split()))
    get_A = sum(A) / (4 * m)

    ans = 0
    for i in A:
        if get_A > i:
            continue
        ans += 1
    if ans >= m:
        print("Yes")
    else:
        print("No")


__starting_point()

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

nums.sort(reverse=True)
ss = sum(nums)
if nums[m-1] * (4 * m) < ss:
    print('No')
else:
    print('Yes')


n,m = list(map(int,input().split()))
a = list(map(int,input().split()))
k = sum(a)*(1/(4*m))
b = [i for i in a if i >= k]

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


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

N,M=[int(s) for s in input().split()]
ls=[int(s) for s in input().split()]
ls=sorted(ls,reverse=True)
border=sum(ls)/(4*M)
if ls[M-1]>=border:
  print('Yes')
else:
  print('No')

from numpy import cumsum
n,m=map(int,input().split())
a=list(map(int,input().split()))
result=cumsum(a)[-1]
mi=result/(4*m)
ans=0
for i in range(n):
    if a[i]>=mi:
        ans+=1
if ans>=m:
    print('Yes')
else:
    print('No')

# 161 B
N,M = list(map(int, input().split()))
A = list(map(int, input().split()))
list.sort(A, reverse=True)
print('Yes') if A[M-1] >= (sum(A)/(4*M)) else print('No')

from sys import stdin,stdout
for _ in range(1):#int(stdin.readline())):
    # n=int(stdin.readline())
    n,m=list(map(int,stdin.readline().split()))
    a=list(map(int,stdin.readline().split()))
    a.sort(reverse=True)
    sm=sum(a);c=0
    lim=4*m
    lim=(1/lim)*sm
    for i in range(n):
        if a[i]<lim:break
        c+=1
    print('Yes' if c>=m else 'No')

N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
A.sort(reverse=True)
sum_A = sum(A)

for i in range(M):
    if A[i] < sum_A / (4.0 * M):
        print('No')
        return

print('Yes')


n,m=map(int, input().split())
a=list(map(int, input().split()))
ans=[i for i in a if i>=sum(a)/4/m]
if len(ans)>=m:
    print("Yes")
else:
    print("No")

import decimal

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

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

if(A[M-1] < (sum(A) * 1 / (4 * M))):
    print('No')
else:
    print('Yes')



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

cnt = 0

s = sum(a)

for x in a:
    if x >= s / (4 * m):
        cnt += 1

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



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

s = sum(a)
a.sort(reverse=True)
el = a[:m]


for i in el:
    if i < s*(1/(4*m)):
        print('No')
        return
print('Yes')


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

X=sum(num_list)

s=0
while s<N:
    if num_list[s]<(X/(4*M)):
        del num_list[s]
        N=N-1
    else:
        s=s+1

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


N, M = map(int,input().split())
A = list(map(int,input().split()))
B = sorted(A,reverse=True)
judge = sum(A) / (4*M)
if B[M-1] < judge:
    print('No')
else:
    print('Yes')

import sys

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

all_vote = sum(A)

for i in range(M):
    if A[i] < all_vote / (4*M):
        print("No")
        return

print("Yes")

N, M = list(map(int, input().split()))
A = sorted([int(x) for x in input().split()], reverse=True)
sumA = sum(A)

if A[M - 1] >= sumA / (4 * M):
    print("Yes")
else:
    print('No')


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

A.sort(reverse=True)
num = sum(A)

if A[M-1] >= num / (4 * M):
    print("Yes")
else:
    print("No")


n, m = map(int,input().split( ))
a = list(map(int, input().split( )))
k = sum(a)
l = list()
for i in range(n):
    if a[i] >= k/(4*m):
        l.append(a[i])
if len(l)>= m:
    print("Yes")
else:
    print("No")

n, m = map(int, input().split())
a = list(map(int,input().split()))
x = 0
ans = 0

for i in range(n):
  x += a[i]
  
for i in a:
    if i >= x*1/(4*m):
        ans += 1
if ans >= m:
    print('Yes')
else:
    print('No')

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

A.sort()
A.reverse()
s = 0
cnt = 0

for i in range(n):
    s += A[i]
    
for i in range(m):
    if A[i] >= s/(4*m):
        cnt += 1

if cnt == m:
    print('Yes')
else :
    print('No')


# coding=utf-8

def __starting_point():
    N, M = list(map(int, input().split()))
    li = list(map(int, input().split()))
    lisum = sum(li)

    cnt = 0
    for i in range(N):
        if lisum / (M * 4) <= li[i]:
            cnt += 1

    if M <= cnt:
        print('Yes')

    else:
        print('No')

__starting_point()

n,m =  map(int,input().split())
a = list(map(int,input().split()))
cnt = 0
for i in a:
    if i >= sum(a)/(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
s=sum(a)
for i in range(n):
  if a[i]>=s/(4*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)
AM=A[0:M]
asum=sum(A)
rate=asum/4/M

for idx in AM:
    if idx<rate:
        print('No')
        break
else:
    print('Yes')

n,m = map(int,input().split())
a = list(map(int,input().split()))
a.sort(reverse=True)
ans = 0
for i in a:
  if i >= sum(a)/(4*m):
    ans += 1
    if ans == m:
      print("Yes")
      return
  else:
    print("No")
    return

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

sum = 0
for score in A:
    sum += score

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

print('Yes' if number >= M else 'No' )

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

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

A = sorted(A, reverse=True)
S = sum(A)
ans = "No"
for i in range(M):
    if A[i] >= S / (4 * M):
        ans = "Yes"
    else:
        ans = "No"
        break
print(ans)

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

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

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

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

n,m = map(int,input().split())
A = list(map(int,input().split()))
s = sum(A)
d = s * (1/(4*m))
t = sum(a >= d for a in A)
print('Yes' if t >= m else 'No')

#ABC161
N,M=map(int,input().split())
A = []
A=[int(x) for x in input().split()]
mini = sum(A)/(4*M)
if M <= len([x for x in A if x >= mini]):
    print('Yes')
else:
    print('No')

n,m = map(int,input().split())
l= list(map(int,input().split()))
l_sorted = sorted(l,reverse=True)
border = sum(l)/(4*m)
temp = []
for i in range(m):
  if(border <= l_sorted[i]):
    temp.append(1)
 
print('Yes' if sum(temp)==m else 'No')

n, m = map(int, input().split())
a = list(map(int, input().split()))
j = sum(a)/4/m
p = 0
for i in a:
    if i >= j:
        p += 1
if p >= m:
    print("Yes")
else:
    print("No")

n,m = map(int,input().split())
li = list(map(int,input().split()))
li.sort(reverse=True)

sum = 0
cnt = 0
for i in li:
    sum += i
    
for i in range(m):
    if li[m-1]*4*m >= sum:
        cnt += 1

if cnt == m:
    print('Yes')
else:
    print('No')

n, m = map(int, input().split())
in_list = input().split()
vote_list = [int(i) for i in in_list]

ans = 0
for ai in vote_list:
    if ai >= 1/(4*m)*sum(vote_list):
        ans += 1

if ans < m :
    print('No')
else:
    print('Yes')

N, M = map(int, input().split())
A_l = sorted(map(int, input().split()))
S = sum(A_l)
ans = 0
for i in range(N):
    if A_l[i]*4*M >= S:
        ans += 1
    else:
        continue
if ans >= M:
    print('Yes')
else:
    print('No')

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

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

# coding: utf-8
# Your code here!

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

a.sort(reverse=True)
total = sum(a)
if all([x >= total / (4 * m) for x in a[:m]]):
    print('Yes')
else:
    print('No')


n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
criteria = sum(a) / (m * 4)

ans = 0
for i in a:
    if i >= criteria:
        ans += 1

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


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

total = sum(a)
cnt = 0

for _a in a:
    if _a * 4 * m >= total:
        cnt += 1

if cnt >= m:
    print("Yes")
else:
    print("No")


def iparse():
  return list(map(int,input().split()))
n,m=iparse()
a = iparse()
s = sum(a)
k = (s+4*m-1)//(4*m)
cnt = 0
for e in a:
  if e >= k:
    cnt += 1
print("Yes" if cnt >= m else "No")

N,M = map(int, input().split())
vote = list(map(int, input().split()))
sum = 0
for i in range(N):
  sum += vote[i]
check = sum / (4*M)
cnt = 0
for j in range(N):
  if vote[j] >= check:
    cnt += 1
if cnt >= M:
  print('Yes')
else:
  print('No')

n,m = map(int,input().split())
l = list(map(int,input().split()))
l.sort(reverse=True)
for i in range(m) :
    if l[i] < sum(l)/(4*m) :
        print('No')
        return
    else :
        continue
print('Yes')

n,m = list(map(int,input().split()))
arr = list(map(int,input().split()))
#arr.sort(reverse=True)

th = sum(arr) * (1/(4*m))
ans = 'No'
cnt = 0
for x in arr:
  if th <= x:
    cnt += 1
    if cnt == m:
      ans = 'Yes'
      break
    
print(ans)

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]*4*m >= s:
        cnt += 1
if cnt >= m:
    print("Yes")
else:
    print(("No"))

N = list(map(int,input().split()))
A = list(map(int,input().split()))
sorted_A = sorted(A,reverse=True)
sum_A =sum(A)
flag = 0
for i in range(N[1]):
  if(sorted_A[i]>=sum_A/(4*N[1])):flag = 1
  else:flag = 0
if(flag == 1):print("Yes")
else:print("No")

import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp

INF = inf
MOD = 1000000007

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

tmp = 0
res = "No"

A = sorted(A, reverse=True)
if A[m - 1] * m * 4 >= sum(A):
    res = "Yes"

print(res)


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 = list(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")


n,m=list(map(int,input().split()))
li=list(map(int,input().split()))
ans=0
q=sorted(li,reverse=True)
for i in range(m):
    if q[i]*4*m>=sum(li):
        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)
A.reverse()
if A[M-1] < sum(A)/4/M:
        print("No")
else:
        print("Yes")

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

l_n.sort(reverse=True)

total_vote = 0
pop_pd = []
ans = 'Yes'

for i in l_n:
    total_vote += i

for index, j in enumerate(l_n, 1):
    if index > n:
        break
    if total_vote / (4 * n) > j:
        ans = 'No'
        break

print(ans)