Problem:
 Score : 200 points    Problem Statement 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 1 4 1
5 4 2 1      Sample Output 1 Yes  There were 12 votes in total. The most popular item received 5 votes, and we can select it.       Sample Input 2 3 2
380 19 1      Sample Output 2 No  There were 400 votes in total. The second and third most popular items received less than \dfrac{1}{4\times 2} of the total number of votes, so we cannot select them. Thus, we cannot select two popular items.       Sample Input 3 12 3
4 56 78 901 2 345 67 890 123 45 6 789      Sample Output 3 Yes

Solution (Python):



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

Solution (Python):
n,m=(map(int,input().split()))
l=list(map(int,input().split()))

l=sorted(l,reverse=True)

l_sum=sum(l)
ans="Yes"

if l[m-1]<(l_sum/4/m):
  ans="No"
    
print(ans)

Solution (Python):
N, M = map(int, input().split())
li = list(map(int, input().split()))
sum_li = sum(li)
x = 0

for i in li:
  if i >= sum_li/(4*M):
    x += 1
    
if x >= M:
  print("Yes")
else:
  print("No")

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

flg = False
A.sort(reverse=True)
for i in range(M):
    if sum(A) / 4 / M <= A[i]:
        flg = True
    else:
        flg = False

if flg:
    print('Yes')
else:
    print('No')

Solution (Python):
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")

Solution (Python):

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


p = sum(A)
border = p / (4 * M)
if len([a for a in A if a >= border]) >= M:
    print("Yes")
else:
    print("No")

Solution (Python):
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")

Solution (Python):
n, m = map(int, input().split())

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

s = sum(a)

ans = 0

for i in list(a):
    if i / s >= 1 / (4 * m):
        ans += 1

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

Solution (Python):
n, m = map(int, input().split())
a_list = sorted(list(map(int, input().split())), reverse=True)

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

Solution (Python):
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')

Solution (Python):
n, m = map(int, input().split())
A = list(map(int, input().split()))
sum_v = sum(A)
cnt = 0
for i in range(n):
    if A[i] < sum_v / (4*m):
        continue
    else:
        cnt += 1

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

Solution (Python):
import numpy as np
n, m = map(int, input().split())
A = np.array([int(i) for i in input().split()], dtype=int)
low = sum(A)/(4*m)
print('Yes' if np.sum(A >= low) >= m else 'No')

Solution (Python):
n,m = map(int, input().split())
s = input()
t = s.rstrip().split(' ')
c = 0
for a in t:
  c += int(a)
d = 0
for a in t:
  if int(a) >= c/4/m :
    d += 1
if d < m:
  print('No')
else:
  print('Yes')

Solution (Python):
N, M = map(int, input().split())
vote = list(map(int,input().split()))

votes = sum(vote)
ans = [i for i in vote if i * 4 * M >= votes]

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

Solution (Python):
n, m = input().split()
a = list(map(int, input().split()))
list.sort(a, reverse=True)

n = 0
ninki = sum(a)/4/int(m)

for w in a:
    

    if w < ninki:
        n = 1

    if a.index(w) + 1 == int(m):
        break


if n == 0:
    print("Yes")
if n == 1:
    print("No")

Solution (Python):
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')

Solution (Python):
[N,M]=list(map(int,input().split()))
A=list(map(int,input().split()))
print(["No","Yes"][int(len(list(filter(lambda Ai:Ai>=sum(A)/4/M,A)))>M-1)])

Solution (Python):
[N,M]=list(map(int,input().split()))
A=list(map(int,input().split()))
print(["No","Yes"]
[int(len(list(filter(lambda Ai:Ai>=sum(A)/4/M,A)))>M-1)])

Solution (Python):
import math

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

total = sum(a)
under = math.ceil(total/(4*m))

cnt = 0

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

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

Solution (Python):
N,M=map(int,input().split())
A=list(map(int,input().split()))
G=sum(A)/(4*M)
A.sort()
A.reverse()
m=0
i=0
while A[i]>=G:
  m+=1
  if m==M:
    print("Yes")
    exit()
  i+=1
print("No")

Solution (Python):

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

print('Yes' if len([v for v in A if v >= sum(A) / (4 * M)]) >= M else 'No')

Solution (Python):
n, m = map(int, input().split())
L = list(map(int, input().split()))
lim = sum(L)/(4*m)
c = 0
for i in range(n):
    if L[i] >= lim:
        c = c + 1
if c >= m:
    print('Yes')
else:
    print('No')

Solution (Python):
import numpy as np


def solve():
    tv = np.sum(a)
    min_votes = np.ceil(tv * 1/4 / m)
    cnt = np.sum(a >= min_votes)
    if cnt>=m:
        print("Yes")
    else:
        print("No")
    return




n, m = [int(i) for i in input().split(" ")]
a = [int(i) for i in input().split(" ")]
solve()

Solution (Python):

import math


def solve():
    tv = sum(a)
    min_votes = math.ceil(tv * 1/4 / m)
    cnt = 0
    for ai in a:
        if ai>=min_votes:
            cnt+=1
    if cnt>=m:
        print("Yes")
    else:
        print("No")
    return




n, m = [int(i) for i in input().split(" ")]
a = [int(i) for i in input().split(" ")]
solve()

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

Solution (Python):
n,m = map(int,input().split())
A = list(map(int,input().split()))
pop = sum(A) / (m*4)
i = 0
p = A[i]
k = 0
for a in A :
    if a >= pop :
        k += 1
if k >= m :
    print('Yes')
else :
    print('No')

Solution (Python):
n,m = map(int, input().split())
l = list(map(int, input().split()))
count = 0
sum = sum(l)
for i in range(n):
    if l[i] * 4 * m >= sum :
        count += 1
    
    

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

else :
    print('No')

Solution (Python):
N,M = list(map(int,input().split()))
L = list(map(int,input().split()))

S = sum(L)
p = S/(4*M)

cnt = 0
for i in range(N):
    if L[i] >= p:
        cnt += 1
if cnt >= M:
    print('Yes')
else:
    print('No')

Solution (Python):
a,b=map(int,input().split())
A=list(map(int,input().split()))
 
S=sum(A)
ans=0
for i in range(a):
    if A[i]>=S/(4*b):
        ans+=1
if ans>=b:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    n, m = map(int, rl().split())
    a = list(map(int, rl().split()))
    
    a.sort(reverse=True)
    sm = sum(a)
    d = sm / (4 * m)
    for i in range(m):
        if a[i] < d:
            print('No')
            exit()
    print('Yes')


if __name__ == '__main__':
    solve()

Solution (Python):
N,M = map(int, input().split(sep=" "))
A = list(map(int,input().split(sep=" ")))
Sum = sum(A)
A.sort(reverse=True)
for i in range(0,M,1):
    if A[i] < Sum/(4*M):
        print("No")
        exit()
print("Yes")

Solution (Python):


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

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

result = [i for i in A if i >= total]

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

Solution (Python):


nim, mike = map(int, input().split())

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

sums = sum(array)

array.sort(reverse = True)

kite = sums/(4*mike)

if array[mike-1] < kite:
  print("No")
else:
  print("Yes")

Solution (Python):
N,M=map(int,input().split())
A = list(map(int, input().split()))
m=M*4
a=sum(A)
ans=0
for i in range(N):
  if A[i]>=a/m:
    ans+=1

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

Solution (Python):
num = list(map(int, input().split()))

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

sum = 0

item = 0

for i in range(len(vote)):
  sum += vote[i]

for i in range(len(vote)):
  if vote[i] >= sum * (1/(4*num[1])):
    item += 1

if item >= num[1]:
  print("Yes")
else:
  print("No")

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

Solution (Python):
N , M = (int(x) for x in input().split())
A = list(map(int,input().split()))
total = sum(A)

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

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

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

Solution (Python):
N,M = map(int,input().split())
lst = list(map(int,input().split()))
newlist = list()
s = sum(lst) / (4*M)
for i in range(len(lst)):
    if lst[i] >= s:
        newlist.append(lst[i])
print("Yes" if len(newlist) >= M else "No")

Solution (Python):
N,M = list(map(int, input().split()))
A = list(map(int, input().split()))
T = sum(A) / (4*M)

cnt = 0;
for i in A:
    if i >= T:
        cnt += 1

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

Solution (Python):
import numpy as np


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

min_ = sum(A) / (4*M)
item = sum(x>=min_ for x in A)
print("Yes" if item>= M else "No")

Solution (Python):
from math import ceil
n,m = map(int,input().split())
a = list(map(int,input().split()))
a.sort(reverse=True)
if a[m-1]>=ceil(sum(a)/(4*m)): print("Yes")
else: print("No")

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

Solution (Python):
N, M = map(int, input().split())
*A, = map(int, input().split())

ans = 'No'
count = 0
s = sum(A)
for a in A:
    if 4 * a * M >= s:
        count += 1
        if count >= M:
            ans = 'Yes'
            break

print(ans)

Solution (Python):

import sys
from collections import Counter
from itertools import permutations, combinations

from math import ceil, floor
import bisect
sys.setrecursionlimit(10 ** 6)
inf = float("inf")

def input():
    return sys.stdin.readline()[:-1]

def main():
    n, m = map(int, input().split())
    A = tuple(map(int, input().split()))
    ans = 0
    total = sum(A)
    for a in A:
        if a >= total/(4*m):
            ans += 1
    print("Yes") if ans >= m else print("No")

if __name__ == '__main__':
    main()

Solution (Python):
N,M=list(map(int,input().split()))
A=list(map(int,input().split()))
sum=sum(A)

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

Solution (Python):

x = input().split(" ")
a = input().split(" ")
n = int(x[0])
m = int(x[1])
sum = 0
counter = 0
for i in a:
  sum += int(i)

bunsu = sum / 4 / m
 
for i in a:
    if float(i) >= bunsu:
      if counter <= m:
        counter += 1
if counter >= m:
  print("Yes")
else:
  print("No")

Solution (Python):

import sys
input = sys.stdin.readline

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

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

flag = 'Yes'
for i in range(M):
    if A[i] < thd:
        flag = 'No'
        break

print(flag)

Solution (Python):
N, M = map(int, input().split())
A = list(map(int, input().split()))
S = sum(A)
cnt = 0

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

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

Solution (Python):
n,m = map(int,input().split())
aList = [int(x) for x in input().split()]

aList.sort(reverse=True)
total = sum(aList)
if aList[m-1]*4*m >= total:
    print('Yes')
else:
    print('No')

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

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

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

comp = 1 / (4 * m)
total = 0
suma = sum(a)
for i in range(n):
    if a[i] / suma >= comp:
        total += 1
if total >= m:
    print('Yes')
else:
    print('No')

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

all_vote = sum(A)

cnt = 0

for a in A:
    
    if a * 4 * m >= all_vote:   
        cnt += 1
if cnt >= m:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
input = sys.stdin.readline

n, m = map(int,input().split())
A = list(map(int, input().split()))
num = sum(A)
bound = num * 1 / 4 / m
ans = 0
for a in A:
    if a >= bound:
        ans += 1
if ans >= m:
    print("Yes")
else:
    print("No")

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

Solution (Python):
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")

Solution (Python):
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')

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

Solution (Python):
n, m = [int(n) for n in input().split(' ')]
A = [int(n) for n in input().split(' ')]

x = sum(A) /  (4 * m)

cnt = 0
for a in A:
  if x <= a:
    cnt += 1

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

Solution (Python):
N, M = map(int, input().split())
A = list(map(int, input().split()))
F = 0
trigger = 1 / (4 * M)
 
for i in range(len(A)):
    if A[i]/sum(A) < trigger:
        F = F + 1
        
if N - F >= M:
    print('Yes')
else:
    print('No')

Solution (Python):
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')

Solution (Python):
N, M = map(int, input().split())
li = list(map(int, input().split()))

x = sum(li) / (4*M)
count = 0

for i in li:
  if i >= x:
    count += 1

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

Solution (Python):
n,m = map(int,input().split())
A = [int(x) for x in input().split()]
B = sum(A)
a = 0
for i in range(n):
    if A[i] >= B/(4*m):
        a += 1
if a >= m:
    print("Yes")
else:
    print("No")

Solution (Python):
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")

Solution (Python):
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")

Solution (Python):
N,M=(int(x) for x in input().split())
a=list(map(int, input().split()))
b=0
c=0
for i in range(N):
    b+=a[i]
    
for i in range(N):
    if(a[i]>=b/(4*M)):c+=1
    
if(c>=M):print('Yes')
else:print('No')

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

Solution (Python):
N,M = map(int,input().split())
a = input().split()
ans =0
for i in a:
  if int(i) >= sum(map(int,a))* 1/(4*M):
    ans+=1

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

Solution (Python):
n, m = list(map(int, input().split()))
aa = list(map(int, input().split()))
 

mn = (1/(4*m)) * sum(aa)
count = 0
 
for a in aa: 
  if (a >= mn): 
    count += 1
    
print("Yes" if count >= m else "No")

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

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

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

count = 0
judge = sum(A_list) / (4*M)

for i in range(0,len(A_list)):
    if A_list[i] >= judge:
         count += 1

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

Solution (Python):
n, m = map(int, input().split())
l = list(map(int,input().split()))
l = sorted(l)[::-1]
check = l[m - 1] >= sum(l) / (4 * m)
print("Yes" if check else "No")

Solution (Python):
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")

Solution (Python):
from collections import defaultdict
def main():
    n,m=map(int,input().split())
    aa=list(map(int,input().split()))
    s=sum(aa)
    aa=list(reversed(sorted(aa)))
    if aa[m-1] >= s / (4*m):
        print('Yes')
    else:
        print('No')
main()

Solution (Python):
N, M = map(int, input().split())
list = list(map(int, input().split()))

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

Solution (Python):
n, m = map(int, input().split())
a = list(map(int, input().split()))
sm = sum(a)
a.sort(reverse=True)
for i in range(m):
    if a[i] < sm/(4*m):
        print('No')
        exit(0)
print('Yes')

Solution (Python):
N,M = map(int,input().split())
listA = list(map(int,input().split()))
A = sorted(listA,reverse=True)
T = sum(A)
b = True
for i in range(M):
    if A[i] < T/(4*M):
        b = False
print('Yes' if b else 'No')

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
from bisect import bisect_left 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n,m = inpl()
a = inpl()
a.sort(reverse = True)
su = sum(a)
res = 0
for i in range(m):
    if a[i]*4*m < su:
        print('No')
        break
else:
    print('Yes')

Solution (Python):
n,m = map(int, input().split())
a = sorted(map(int, input().split()))
print("YNeos"[a[n-m]<sum(a)/(4*m)::2])

Solution (Python):
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=cnt+1

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

Solution (Python):
il1 = input().split()
il2 = input().split()
il1 = [int(s) for s in il1]
il2 = [int(s) for s in il2]
ans = 0

sum_vote = sum(il2)

for i in il2:
    if(i < sum_vote/(4*il1[1])):
        pass
    else:
        ans = ans + 1
    
if ( ans >= il1[1]):
    print("Yes")
else:
    print("No")

Solution (Python):
n = list(map(int,input().split()))
s = list(map(int,input().split()))

a = [a for a in s if a>=sum(s)/(4*n[1])]
if len(a)>=n[1]:
    print("Yes")
    
else:print("No")

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

X = sum(A)/(4*M)
ans = 0

for i in A:
    if not (i < X):
        ans += 1

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

Solution (Python):
import numpy as np
 
[N, M] = list(map(int, input().split()))
A = list(map(int, input().split()))
threshold = np.sum(A) / (4 * M)

Th = [a for a in A if threshold <= a]

if len(Th) < M:
  ans = 'No'
else:
  ans = 'Yes'
print(ans)

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

Solution (Python):
import numpy as np
n, m = map(int,input().split())
a = np.array(input().split(),dtype=int)
sum = 0
num = 0

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

if num < m:
    print("No")
else:
    print("Yes")

Solution (Python):
n,m = [int(s) for s in input().split()]
arr = [int(s) for s in input().split()]
sum=0
for i in arr:
    sum+=i

arr.sort(reverse = True)
x = arr[m-1]
if  x < sum/(4*m):
    print("No")
else:
    print("Yes")

Solution (Python):
N,M = map(int,input().split())

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

sort_position = sorted(position,reverse = True)


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

for i in range(M):
    if sort_position[i] < judge:
        ans = "No"
        break
    else:
        ans ="Yes"

print(ans)

Solution (Python):
n,m = map(int,input().split())
a = list(map(int,input().split()))
a = sorted(a,reverse=True)
ans = ''
for i in range(m):
    if a[i] < sum(a)/(4*m):
        ans = 'No'
        break
    else:
        ans = 'Yes'
print(ans)

Solution (Python):
N,M = map(int ,input().split())

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

all_reputation = sum(A)

over_quater_item = [i for i in A if i >=  all_reputation/(4*M)]

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

Solution (Python):
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
A.sort()
A = A[::-1]
if A[M-1] >= sum(A)/(4*M):
    print("Yes")
else:
    print("No")

Solution (Python):
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
sm = sum(A)
cnt = 0
for x in A:
    if x * 4 * M >= sm:
        cnt += 1

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

Solution (Python):
n, m = map(int, input().split())
a = [int(x) for x in input().split()]

a.sort(reverse=True)

for i in range(m):
    if a[i] >= sum(a) * 1/(4*m):
        continue
    else:
        print("No")
        exit()

print("Yes")

Solution (Python):
n, m = map(int, input().split())
plist = list(map(int, input().split()))
plist.sort(reverse=True)
if(plist[m-1]<sum(plist)/4/m):
    print('No')
else:
    print('Yes')

Solution (Python):
n, m = map(int, input().split())
rank = list(map(int, input().split()))
rank.sort(reverse=True)
cnt = 0

for r in rank:
  if r >= (sum(rank)/(4*m)):
    cnt += 1
    if cnt >= m:
      break

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

Solution (Python):
N, M = map(int, input().split())
vote_result_list = sorted(list(map(int,input().split())))[::-1]
border = sum(vote_result_list)/(4*M)
print("Yes" if vote_result_list[M-1] >= border else "No")

Solution (Python):
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")

Solution (Python):
n=list(map(int,input().split()))
a=list(map(int,input().split()))
s=sum(a)
c=s/(4*n[1])
x=0
for i in range(0,n[0]):
    if a[i]>=c:
        x=x+1
    else:
        continue
if x>=n[1]:
    print("Yes")
else:
    print("No")

Solution (Python):
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")

Solution (Python):
N ,M= map(int,input().split())
a  = list(map(int, input().split()))
count = 0
s = 0
for i in a:
    s +=i
lim = (1/(M*4))*s
for i in a:
    if i >=lim:
        count+=1
    else:
        pass
if count >= M:
    print("Yes")
else:
    print("No")

Solution (Python):
N,M = map(int,input().split())
listA = list(map(int,input().split()))
A = sorted(listA,reverse=True)
T = sum(A)
b = True
for i in range(M):
    if A[i] < T/(4*M):
        b = False
if b == True:
    print('Yes')
else:
    print('No')

Solution (Python):
import math

n,m = map(int,input().split())
li = list(map(int,input().split()))
wa = 0
for i in li :
    wa+=i

for i in li :
    if i < math.ceil((wa/float(4*m))) :
        n -= 1

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

Solution (Python):
import math

n,m = map(int,input().split())
li = list(map(int,input().split()))
wa = 0
for i in li :
    wa+=i

for i in li :
    if i < math.ceil((wa/float(4*m))) :
        n -= 1

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

Solution (Python):
n,m=map(int,input().split())
a=list(map(int,input().split()))
cnt=0
b=sum(a)
for i in range(n):
 if a[i]<b/(4*m):
  continue
 else:
  cnt+=1
if cnt>=m:
 print('Yes')
else:
 print('No')

Solution (Python):
x, y = input().split()
arr = list(map(int, input().split()))
t1 = sum(arr)
t2 = int(4*int(y))
ans = 0
for i in arr:
    if i >= t1/t2:
        ans += 1

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

Solution (Python):
N,M= map(int, input().split())
item_list=sorted(list(map(int,input().split())))

possible_choice = len([1 for x in item_list if x>=(sum(item_list)/(4*M))])
if possible_choice >= M:
    print('Yes')

else:
    print('No')

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

s = sum(a) / (4 * m)
print ('Yes' if len([i for i in a if i >= s]) >= m else 'No')

Solution (Python):
def main():
    N, M = map(int, input().split())
    A = [int(a) for a in input().split()]
    total = sum(A)
    cnt = 0
    for i in range(N):
        if A[i] < total*1.0/(4.0*M):
            pass
        else:
            cnt += 1
    if cnt >= M:
        print("Yes")
    else:
        print("No")
main()

Solution (Python):
category_number, popular_product_number = input().split()
product = input().split()
product_list = [int(i) for i in product]
votes_number = sorted(product_list)[-int(popular_product_number)]
border = sum(product_list)/4/int(popular_product_number)
if votes_number < border:
  print('No')
else:
  print('Yes')

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)


def input(): return sys.stdin.readline().rstrip()

N, M = map(int, input().split())
A = list(map(int, input().split()))
print('Yes' if sum(1 for a in A if a * 4 * M >= sum(A)) >= M else 'No')

Solution (Python):
import numpy as np

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

A_popular = A[A>=np.sum(A)*1/(4*M)]

if np.size(A_popular)>=M:
    print('Yes')
else:
    print('No')

Solution (Python):
n, m = map(int, input().split())
list_a = list(map(int, input().split()))
votes_sum = sum(list_a)
select = votes_sum / (4*m)
popular = []

for a in list_a:
    if a >= select:
        popular.append(a)

if m <= len(popular):
    print("Yes")
else:
    print("No")

Solution (Python):
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')

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

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

ans = fun(n, m, a)

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

Solution (Python):
n, m = map(int, input().split())
a_n = list(map(int, input().split()))
cnt = 0

for i in range(n):
    if (sum(a_n) / (4 * m)) <= a_n[i]:
        cnt += 1

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

Solution (Python):
N,M=map(int,input().split())
aL=list(map(int,input().split()))
aL.sort()
newaL=aL[::-1]

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

Solution (Python):
nm = [int(x) for x in input().split(' ')]
vote = [int(v) for v in input().split(' ')]

sum_vote = sum(vote)
thresh = sum_vote / (4 * nm[1])

vote_valid = [True if v >= thresh else False 
              for v in vote]

sum_vote_valid = sum(vote_valid)
if sum_vote_valid >= nm[1]:
  print('Yes')
else:
  print('No')

Solution (Python):
N,M=map(int,input().split())
A=list(map(int,input().split()))
L=sum(A)/(4*M)
j=0
A1=sorted(A,reverse=True)
for i in range(M):
    if A1[i]>=L:
        j+=0
    else:
        j+=1
if j==0:
    print("Yes")
else:
    print("No")

Solution (Python):
N,M=map(int,input().split())
A=list(map(int,input().split()))
L=sum(A)/(4*M)
j=0
A1=sorted(A,reverse=True)
for i in range(M):
    if A1[i]>=L:
        j+=0
    else:
        j+=1
if j==0:
    print("Yes")
else:
    print("No")

Solution (Python):
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()

Solution (Python):
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
	if flag:
		print("Yes")
	else:
		print("No")


if __name__ == "__main__":
	main()

Solution (Python):
n,m = map(int,input().split())
li = list(map(int,input().split()))
p = sum(li)/(4 * m)
ans = "Yes"
c = 0

for i in li:
    if i >= p:
        c+=1

if c < m:
    ans = "No"

print(ans)

Solution (Python):
X = input().split()
N = int(X[0])
M = int(X[1])
Y = input().split()
Z = []
sum = 0
for i in range(N):
    Z.append(int(Y[i]))
    sum = sum + Z[i]
count = 0
for i in range(N):
    if Z[i] >= sum/(4*M):
        count = count + 1
if count >= M:
    print("Yes")
else:
    print("No")

Solution (Python):
N,M = map(int,input().split())
li = list(map(int,input().split()))
s = sum(li)
li.sort(reverse = True )
if li[M-1] < s/(4*M):
    print("No")
else:
    print("Yes")

Solution (Python):
N,M = map(int, input().split())
num_list = list(map(int, input().split()))
sum_num=sum(num_list)
sum=0
for i in range(N):
  item_no=num_list[i]
  if(item_no>=sum_num/(4*M)):
    sum=sum+1
if(sum>=M):
  print('Yes')
else:
  print('No')

Solution (Python):
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
"""
n = 12
m = 3
a = [4, 56, 78, 901, 2, 345, 67, 890, 123, 45, 6, 789]
"""
for i in range(m):
    if sorted(a)[(i+1)*-1] * 4 * m < sum(a):
        print('No')
        exit()

print('Yes')

Solution (Python):
n,m =[int(x) for x in input().split()]
A =[int(x) for x in input().split()]
A_check =[x for x in A if x >= sum(A)/(4*m)]
if len(A_check) >= m :
    print("Yes")
else:
    print("No")

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

totalVotes = 0
for i in range(len(A)):
	totalVotes += A[i]

selected = 0
for i in range(len(A)):
	if A[i] >= totalVotes/(4*M):
		selected +=1 

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