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 = list(map(int, input().split(' ')))
A = list(map(int, input().split(' ')))
total = sum(A)
print('Yes' if sum([1 for i in A if i >= total/(4*M)]) >= M else 'No')

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

Solution (Python):


n,m = map(int,input().split())
a = input().split()
alist = []
count = 0
ans = "Yes"
for i in a:
    s = int(i)
    count += s
    alist.append(s)

alist.sort(reverse=True)
thres = count / (4 * m)
for i in range(m):
    t = alist[i]
    if t < thres:
        ans = "No"
        break

print(ans)

Solution (Python):
N, M = map(int, input().split())
A = list(map(int, input().split()))
a = sorted(A, reverse=True)
s = "Yes"
for i in range(M):
    if a[i] < sum(a) * (1/(4*M)):
        s = "No"
        break
print(s)

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

Solution (Python):
n,k=map(int,input().split())
l=[int(i) for i in input().split()]
l.sort(reverse=True)
if l[k-1]<sum(l)/(4*k):
    print("No")
else:
    print("Yes")

Solution (Python):
num_array = list(map(int, input().split()))
vote_num_array = list(map(int, input().split()))
select_num = num_array[1]

val = sum(vote_num_array) * (1 / (select_num * 4))
cnt = 0

for vote_num in vote_num_array:
  if vote_num >= val:
    cnt += 1

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

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

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


for i in L:
    
    if i >= S/4/M:
        
        A += 1
        

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

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

sum = 0

for n in range(N):
    a = A[n]

    if (vote_sum*(1/(4*M)))>a:
        continue
    sum = sum + 1

print("Yes" if M<=sum else "No")

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

total_vote=sum(A)/(4*M)
sele=0

for i in A:
  if i >= total_vote:
    sele+=1
  else:
    pass

if M<=sele:
  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 i >= x :
        ans += 1
if ans >= m:
    print('Yes')
else:
    print('No')

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

Solution (Python):
from math import ceil

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

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

all_vote = sum(a) 

m4 = ceil(1/4/m * all_vote)


for i in a:
    if i >= m4:
        m -= 1

        if m == 0:
            print("Yes")
            break

if m != 0:
    print("No")

Solution (Python):
N,M = list(map(int,input().split()))
number = list(map(int,input().split()))
number.sort(reverse=True)
total = sum(number) / (4*M)
for i in range(M):
    if number[i] >= total:
        pass
    else:
        print("No")
        exit()
print("Yes")

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

A.sort(reverse=True)

sum = 0.0
for a in A:
    sum += a

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

print(ret)

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

top_m = sorted(A, reverse=True)[:M]
m = map(lambda x: x/sum(A) >= 1/(4*M), top_m)

if False in 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)
sumA = sum(A)
if A[M - 1] >= sumA / (4 * M):
    print("Yes")
else:
    print("No")

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

total = sum(aa)
r = (1/(4*m)) * total
c = 0

for i in aa:
    if i >= r:
        c += 1
if c >= m:
    print("Yes")
else:
    print("No")

Solution (Python):


import sys


















def main():
    mod = 1000000007                  
    inf = float('inf')
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    
    n, m = mi()
    a = lmi()
    total = sum(a)
    num = len(list(filter(lambda x: x >= total / (4 * m), a)))
    print('Yes') if m <= num else print('No')

if __name__ == "__main__":
    main()

Solution (Python):
n,m=map(int,input().split())
num=[int(i) for i in input().split()]
num=sorted(num,reverse=True)
sum_num=sum(num)
if num[m-1]<sum_num/(4*m):
    print("No")
else:
    print("Yes")

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

cnt = 0

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

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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(N: int, M: int, A: "List[int]"):
    n = N
    m = M
    a = A
    t = sum(a)/(4*m)
    res = sum(1 for i in a if i >= t)
    print('Yes' if m <= res else 'No')




def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    M = int(next(tokens))  
    A = [int(next(tokens)) for _ in range(N)]  
    solve(N, M, A)

if __name__ == '__main__':
    main()

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

all_points = 0
for i in A:
  all_points += i

for i in range(M):
  if A[i] >= all_points/(4 * M):
    pass
  else:
    print('No')
    break
else:
  print('Yes')

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

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

total  = sum(num_list)
rate = [x / total for x in num_list if x/total>= 1/(4*M)]
if len(rate) < M:
    print("No")
else:
    print("Yes")

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

votes = sum(An)
least = votes / (4 * M)
count = 0
for v in An:
    if v >= least:
        count += 1

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

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

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

n = list(map(int, input().split()))
sort_n = sorted(n, reverse=True)
t = sum(n)

c = 0

for i in range(0,M):
    if sort_n[c] >= t*(1/(4*M)):
        c += 1
        
    else:
        continue

if c == M:
    print("Yes")
else:
    print('No')

Solution (Python):
N, M = map(int, input().split())
A = list(map(int, input().split()))
all_A = sum(A)
flag = False
for i in range(M):
  if max(A) >= all_A / (4 * M):
    A.remove(max(A))
  else:
    flag = True
  

print("No" if flag else "Yes")

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

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

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

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

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

popular_count = sum([a >= count_flag for a in A])

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

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

s = sum(AAA)
if sum([1 if s/(4*M)<=A else 0 for A in AAA])>=M:
    print("Yes")
else:
    print("No")

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

soutouhyousuu = sum(a)
l = []
for i in range(len(a)):
    if a[i] >= soutouhyousuu / (4 * nm[1]):
        l.append(a[i])

if len(l) >= nm[1]:
    print("Yes")
else:
    print("No")

Solution (Python):
if __name__ == "__main__":
  N,M = (int(x) for x in input().split())
  vote = [int(x) for x in input().split()]
  vote.sort(reverse=True)
  point = sum(vote)/(4*M)
  flag=1
  for i in vote[:M]:
    if i < point:
      print('No')
      flag=0
      break
  if flag == 1:
    print('Yes')

Solution (Python):
N,M=map(int,input().split())
a=list(map(int,input().split()))
SUM=sum(a)
ninnki=SUM/(4*M)
count=0

for i in a:
    if i>=ninnki:
        count+=1
        
if count>=M:
    print("Yes")
else:
    print("No")

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

Solution (Python):
N, M = map(int, input().split())
A_list = list(map(int, input().split()))
total = sum(A_list)
count = 0
for a in A_list:
    if a >= total * (1 / (4*M)):
        count += 1
if count >= 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()]
num=0
for i in range(N):
    if A[i]>=sum(A)*0.25/M:
        num+=1
if num>=M:
    print("Yes")
else:
    print("No")

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

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

cnt = 0
for n in X:
    if n >= (sum(X) / (4 * M)):
        cnt = cnt + 1
        if cnt >= M:
            break

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

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

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

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

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

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

print("Yes")

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

Solution (Python):
import sys

n, m = map(int, sys.stdin.readline().split())
line = sys.stdin.readline().split()
nums = list(map(int, line))

sumi = sum(nums)
barr = (sumi / (4 * m))

if sum([1 for x in nums if x >= barr]) >= m:
    print('Yes')
else:
    print('No')

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

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

print("No" if a[m - 1] < 1/(4*m) * total else "Yes")

Solution (Python):
n, m = map(int, input().split())
l = list(map(int, input().split()))
target = sum(l) / (4 * m)
for x in l:
    if x >= target:
        m -= 1
    if m == 0:
        print("Yes")
        exit()
print("No")

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

Solution (Python):
n, m = map(int, input().split())
 
A = list(map(int, input().split()))
 
sum = 0
 
for i in range(n):
  sum += A[i]
  
counter = 0
rate = 4 * m
rate = sum / rate
for i in range(n):
  if A[i] >= rate:
    counter += 1
    
if counter >= m:
  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()))
b = []
for i in range(0, len(a)):
    if a[i]>=1/(4*m)*sum(a):
        b.append(a[i])
if len(b) >= 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()]
b = sum(a)/(4*M)
count = 0
for i in a:
  if i >= b:
    count = count + 1

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

Solution (Python):
import numpy as np
import math as mt
N,M=map(int, input().split())
A=list(map(int,input().split()))
boader=1/(4*M)
A.sort(reverse=True)
for i in range(0,M):
    if A[i]<(sum(A)*(1/(4*M))):
        print("No")
        break
    elif i==M-1:
        print("Yes")

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

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

Solution (Python):

line_num = input()
line = line_num.split(" ")
  
    
line2 = input().split(" ")
sum_vote = 0
for i in line2:
   
    sum_vote += int(i)
  

numa = sum_vote/int(line[1])
num= numa/4

list =[]
for i in line2:
    if int(i) >=num:
        list.append(i)
    else:
        pass

if len(list)>=int(line[1]):
    print("Yes")
else:
    print("No")

Solution (Python):
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N, M = list(map(int,_in[0].split(' ')))  
    A_arr = list(map(int,_in[1].split(' ')))  
    
    A_arr.sort(reverse=True)
    vote = sum(A_arr)
    TF = 'Yes' if A_arr[M-1] >= vote/(4*M) else 'No'
    
    print(TF)

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

A = list(map(int,input().split()))
A.sort()
A.reverse()
val = sum(A)/(4*M)

flag = False
for count in range(M):
    if A[count] >= val:
        flag = True
    else:
        flag = False
        break;

if flag == True:
    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):
import numpy as np


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

total = np.sum(a)
criteria = total / (4 * m)

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

print("No" if count < m else "Yes")

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

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

Solution (Python):
i = input().split()
i_int = [int(n) for n in i]
a = input().split()
A = [int(m) for m in a]
N = i_int[0]
M = i_int[1]

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



c = 0
for val in A:
    if val >= th:
    
        c += 1

if M > c:
    print('No')
else:
    print('Yes')

Solution (Python):
i = input().split()
i_int = [int(n) for n in i]
a = input().split()
A = [int(m) for m in a]
N = i_int[0]
M = i_int[1]

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



c = 0
for val in A:
    if val >= th:
    
        c += 1

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

Solution (Python):
n, m = map(int, input().split())
votes = list(map(int, input().split()))
k = (1/(4*m))*sum(votes)
 
items = []
 
for i in range(n):
  if votes[i] >= k:
    items.append(i)
 
if len(items) >= m:
  print('Yes')
else:
  print('No')

Solution (Python):
class atcorder:
    
    class atcorder:

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

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

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

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

Solution (Python):


N, M = map(int, input().split())
A = [int(a) for a in input().split()]
P = [1 for a in A if a >= sum(A) * 1 / (4 * M)]

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

Solution (Python):
from sys import stdin
import numpy as np






temp = stdin.readline().split()
N, M = np.asarray(temp).astype(int)
temp = stdin.readline().split()
a = np.asarray(temp).astype(int)

sumvotes = np.sum(a)

c = 0; OUT = False
for data in a:
    if data >= sumvotes/(4*M):
        c += 1
    if c >= M:
        OUT = True
        

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

Solution (Python):
n,m=map(int,input().split())
a=list(map(int,input().split()))
print("YNeos"[len([x for x in a if x>=sum(a)/4/m])<m::2])

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

S = sum(li)
cnt = 0
for i in range(N):
    if(4*M*li[i] >= S):cnt += 1
    
if(cnt >= M):print("Yes")
else :print("No")

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

sum=0
for i in range(n):
    sum+=a[i]

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

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

Solution (Python):
n,m = map(int,input().split())
A = list(map(int,input().split()))
A.sort(reverse=True)
sortedA = list()
sum_of_votes = 0
for i in A : 
    sum_of_votes += i
for i in range(m) : 
    sortedA.append(A[i])
isOK = True
for i in sortedA: 
    if i < sum_of_votes * (1/(4*m)) :
        isOK = False
if isOK == True :
    print("Yes")
else:
    print("No")

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

    th = sum(a) / (4 * m)
    a_ = [0 if x < th else 1 for x in a]

    print(["Yes", "No"][not m <= sum(a_)])


if __name__ == "__main__":
    main()

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

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

Solution (Python):
from collections import *
from heapq import *
from itertools import *


from decimal import *
import copy
from bisect import *
import time
import sys
import math

input=lambda :sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**7)
def gcd(a,b):
    if(a%b==0):return(b)
    return (gcd(b,a%b))

N,M=map(int,input().split())
A=sorted(list(map(int,input().split())),reverse=True)
a=sum(A)
Z=a/(4*M)
for m in range(M):
    if A[m]<Z:
        print("No")
        exit()
print("Yes")

Solution (Python):
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())), 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())
A = list(map(int, input().split()))

ans = 0
suma = sum(A)

for a in A:
    if a >= suma/(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()))

total = sum(A)
count = 0
for i in range(N):
    if A[i] * 4 * M >= total:
        count += 1
if count >= M:
    print('Yes')
else:
    print('No')

Solution (Python):
n, m = map(int, input().split())
aa = list(map(int, input().split()))
thre = sum(aa) / (4*m)
cnt = 0
for a in aa:
  if a >= thre:
    cnt +=1
if cnt >= m:
  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 sum(A) / (4*M) <= A[i]:
        count += 1

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

Solution (Python):

n,m = (int(x) for x in input().split()) 
s = list(map(int, input().split()))

t = sum(x>=(sum(s)/(4*m)) for x in s)

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

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

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

a = sorted(a,reverse=True)

vote = sum(a)


if a[m-1] < vote/(4*m):
    print("No")
else:
    print("Yes")

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

d=sum//(4*m)
if sum//(4*m)!=sum/(4*m):
  d=d+1

ct=0
flag=0
for i in range(n):
  if l[i]>=d:
    ct+=1
  
  if ct>=m:
    flag=1
    break

if flag==1:
  print('Yes')
else:
  print('No')

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

    threshold = sum(a) / (4 * m)
    if sum(1 for i in a if i >= threshold) >= m:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

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

all_vote = sum(A)
minimum = all_vote/(4*M)
count = 0
for i in A:
  if i >= minimum:
    count += 1
if count >= M:
  print("Yes")
else:
  print("No")

Solution (Python):
n, m  = map(int, input().split())
vote_list = list(map(int, input().split()))
def choose(n, m, vote_list):
    votes = sum(vote_list)
    necessary = votes/(4*m)
    count = 0
    for item in vote_list:
        if item >= necessary:
            count += 1
    if count >= m:
        return "Yes"
    return "No"

print(choose(n, m, vote_list))

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

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

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

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

lst.sort(reverse = True)

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

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

total = sum(v)
ans = 0

for i in v:
    if i >= total/(4*m):
        ans += 1
if ans >= m:
    print('Yes')
else:
    print('No')

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

count = 0
for i in range(N):
  if lst[i] >= sum(lst)/(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()))
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())
A=list(map(int,input().split()))
ans=0

for a in A:
    if a<(sum(A)/(4*M)):
        continue
    else:
        ans+=1

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

Solution (Python):
[_, m] = [int(s) for s in input().split()]
a = [int(s) for s in input().split()]
x = sum(a) / (4 * m)
print("Yes" if sum([i >= x for i in a]) >= m else "No")

Solution (Python):
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
d = sum(b)
e = d / (4*a[1])

for i in b:
    if i >= e:
        c.append(i)

if len(c) < a[1]:
    print("No")
else:
    print("Yes")

Solution (Python):
from sys import stdin

n,m=map(int,input().split())
hyo=list(map(int,input().split()))
sum=0
for i in hyo:
    sum+=i
giri=sum/(4*m)
ok=0
for i in hyo:
    if i>=giri:
        ok+=1
if ok>=m:
    print("Yes\n")
else:
    print("No\n")

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

Solution (Python):
n, m = map(int, input().split())
*point, = map(int, input().split())
count = 0
border = sum(point) / (4*m)
FLG = False

for num in point:
    if num >= border:
        count += 1

    if count >= m:
        FLG = True
        break

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

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


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

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

l.sort(reverse = True)

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

if check(l):
    print('Yes')
else:
    print('No')

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

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

cnt = 0
for i in a:
    if 4 * i * m >= sum:
        cnt += 1

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

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

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

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

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

Solution (Python):
N,M = map(int,input().split())
m = 0
v = input().split()
for i in range(N): v[i] = int(v[i])
  
v.sort(reverse=True)
v_min = sum(v)/4/M

while len(v):
  if v.pop(0) >= v_min:
    m += 1
  else:
    break

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

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

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

l=list(map(int,input().split()))
s=sum(l)
ans=0
t=s/(4*m)
for i in l:
    if i>=t:
        ans+=1
if ans>=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):
NM = list(map(int, input().split()))
A = list(map(int, input().split()))

count = 0
sumA = sum(A)
board = sumA / (4*NM[1])





for i in range(len(A)):
    if float(A[i]) >= board:
        count += 1
    else:
        continue


if count >= NM[1]:
    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 a in A:
	if a>=S/(4*M):
		cnt += 1

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

Solution (Python):
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
x = m
for item in a:
  if item >= ((1/(4*m))*sum(a)):
    x -= 1
if x <= 0:
  print("Yes")
else:
  print("No")

Solution (Python):
def main():
  n, m = (int(x) for x in input().split())
  a_list = list(map(int, input().split()))
  sum_num = 0
  sum_num = sum(a_list)
  count = 0
  for i in a_list:
    if(i >= sum_num/(4 * m)):
      count += 1

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

if __name__ == '__main__':
  main()

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

ansCnt = 0
for i in A:
    if i >= sumVal:
        ansCnt += 1

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

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

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

cnt=0
for i in range(m):
    if a[i] < a_sum / (4*m):
        cnt += 1
if cnt > 0:
    print('No')
else:
    print('Yes')

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

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

num = 0
for i in range(N):
    if A[i] >= sum(A) * 1/(4*M):
        num += 1
if num >= M:
    print('Yes')
else:
    print('No')

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

else:
    print("Yes")

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

Solution (Python):
N, M = map(int, input().split())
box = list(map(int, input().split()))
S=sum(box)
elected = [x for x in box if x >= S/M/4]
if len(elected) >= M:
  print('Yes')
else:
  print('No')

Solution (Python):
l = input()
m = input()
z = l.split(" ")
M = int(z[1])
F = m.split(" ")
X = []
for item in F:
  votes = int(item)
  X.append(votes)

X.sort(reverse=True)
S = sum(X)
C = (S/(4*M))
if X[M-1]<C:
  print("No")
else:
  print("Yes")

Solution (Python):
l = input()
m = input()
z = l.split(" ")
M = int(z[1])
F = m.split(" ")
X = []
amount=0
for item in F:
  votes = int(item)
  amount = amount + votes
  X.append(votes)
X.sort(reverse=True)
C = amount/(4*M)
if X[M-1]<C:
  print("No")
else:
  print("Yes")