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):
if __name__ == '__main__':
    n, m = tuple([int(i) for i in input().split()])
    a = [int(i) for i in input().split()]
    total = float(sum(a))

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

    print("Yes" if result >= m else "No")

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

A.sort(reverse=True)
cnt = 0
for a in A:
    
    if a >= A_sum/(4*M):
        cnt += 1
    else:
        ans = "No"

    if cnt == M:
        ans = "Yes"
        break

print(ans)

Solution (Python):
N,M=map(int,input().split())
list = [int(i) for i in input().split()]
SUM = sum(list)
n = sum(x>=SUM/(4*M) for x in list)

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

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

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

for i in range(len(A)):
    if A [i] < sum1/(4*M):
        A2[i] = 0
    else:
        A2[i] = 1

if sum(A2) < M:
    print("No")
else:
    print("Yes")

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

A = sorted(A)[::-1]
total = sum(A)
vote_need = total / (4 * M)



c = 0
for a in A:
    if a >= vote_need:
        c += 1
    else:
        break
if c >= M:
    print("Yes")
else:
    print("No")

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

if sorted(a)[-m] >= sum(a) / (4 * m):
    print('Yes')
else:
    print('No')

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

Asum = sum(A)
hyou = Asum * (1/(4*M))
count = 0
for i in A:
    if i >= hyou:
     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)

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

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

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

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

Solution (Python):
import bisect
N, M = map(int, input().split())
arr = sorted(map(int, input().split()))
sum_num = sum(arr)
th = sum(arr) / (4 * M)
idx = bisect.bisect_left(arr, th)
if N - idx >= M:
    print("Yes")
else:
    print("No")

Solution (Python):
k = list(map(int, input().split()))
a = list(map(int, input().split()))
n=k[0]
m=k[1]
d=0
e=0
for i in range (n):
    d+=a[i]

for j in range (n):
    if a[j]>=d/(4*m):
        e+=1

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

Solution (Python):
def calc(N, M, A):
    S = sum(A)
    n = len([x for x in A if x < S / 4 / M])
    if M <= N - n:
        return 'Yes'
    else:
        return 'No'



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

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

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

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

Solution (Python):

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

A_sum = sum(A_list)
is_selected = 1 / (4 * M) * A_sum

for i in range(M):
    if A_list[i] >= is_selected:
        continue
    else:
        print('No')
        exit(0)
print('Yes')

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

Solution (Python):

n,m=map(int, raw_input().split())
arr=map(int, raw_input().split())
s=sum(arr)
arr.sort()
k=m
for i in xrange(n-1,-1,-1):
    if arr[i]>=s/(4.0*m) and k>0:
        k-=1
 
if k>0:
    print 'No'
else:
    print 'Yes'

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

sum_a = sum(a)
sort_a = sorted(a, reverse = True)
mmm = sort_a[m-1]
base = sum(a)/ (4 * m)

if mmm < base:
    print("No")
else:
    print("Yes")

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

Solution (Python):
n,m=map(float,input().split())
a=list(map(float,input().split()))
s=sum(a)
cnt=0
for item in a:
    if(item>=s/4/m):
        cnt+=1
print("Yes" if cnt>=m else "No")

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


A.sort(reverse=True)
total = sum(A)
j = 0
for i in range(N):
    if A[i]<(total/(4*M)):
        break
    else:
        j += 1
if j>=M:
    print("Yes")
else:
    print("No")

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

th = sum(la) / (4 * m)

ans = sum(list(map(lambda x: x >= th if 1 else 0, la)))

if ans >= 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 a:
    if i * 4 * m >= sum(a):
        count += 1
    else:
        pass

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

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

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

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

Solution (Python):
def popular_vote(n, m ,al):
    al.sort(reverse=True)
    sum = 0
    for a in al:
        sum += a
    
    if al[m-1] >= sum/(4.0*m):
        print('Yes')
    else:
        print('No')

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

popular_vote(n, m, al)

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 6)  
to_index = lambda x: int(x) - 1  
print_list_in_2D = lambda x: print(*x, sep="\n")  


def input_int(): return int(input())

def map_int_input(): return map(int, input())

MII = map_int_input

def MII_split(): return map(int, input().split())

def MII_to_index(): return map(to_index, input())

def MII_split_to_index(): return map(to_index, input().split())


def list_int_inputs(): return list(map(int, input()))

LII = list_int_inputs

def LII_split(): return list(map(int, input().split()))


def LII_2D(rows_number): return [LII() for _ in range(rows_number)]

def LII_split_2D(rows_number): return [LII_split() for _ in range(rows_number)]

import math
N, M = MII_split()
A_list = LII_split()
A_list.sort(reverse=True)
min_vote = math.ceil(sum(A_list) * 0.25 / M)

print('Yes' if len([x for x in A_list if x >= min_vote]) >= M else 'No')

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

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

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

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


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

Solution (Python):
import numpy as np
n,m = map(int, input().split())
a_list = list(map(int, input().split()))

a_list.sort(reverse=True)
sum_ = sum(a_list)
min_ = np.ceil(sum_/ (4*m))

count = 0
for i in range(n):
    if a_list[i] < min_:
        break
    count += 1

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

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

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

A_sort = sorted(A, reverse=True)

if A_sort[M-1] >= limit:
  print("Yes")
else:
  print("No")

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

sum_vote = sum(a)
limit = sum_vote * (1 / (4 * m))

select = 0
for num in range(0, n):
  if a[num] >= limit:
    select += 1
    if select == m:
      print('Yes')
      exit()
print('No')

Solution (Python):
import itertools
import math
import fractions

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

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

if a[m-1] >= 1/(4*m)*sum:
    print("Yes")
else:
    print("No")

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

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

sumA = sum(A)
ans_list = [0]*N
for i in range(N):
    if (A[i]/sumA)>=(1/(4*M)):
        ans_list[i] = 1
if ans_list.count(1) >= M:
    print("Yes")
else:
    print("No")

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

all=sum(A)

for i in range(N):
    if A[i]>=all/(4*M):
        t+=1

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

Solution (Python):
n, m = map(int, input().split())
A = list(map(int, input().split()))
count = 0
total = 0
for j in range(n):
    total += A[j]
for i in range(n):
    if A[i] >= total *(1/(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)
s1=s/(4*m)
c=0
for i in a:
    if(i>=s1):
        c+=1
if(c>=m):
    print('Yes')
else:
    print('No')

Solution (Python):
N, M = [int(s) for s in input().split()]
A = [int(s) for s in input().split()]
all_A = sum(A)
B = [True if Ai >= all_A/4/M else False for Ai in A]
if B.count(True) >= M:
  print("Yes")
else:
  print("No")

Solution (Python):
N, M, *A = map(int, open(0).read().split())

total = sum(A)
can_select_num = 0

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

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

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

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

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

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

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

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

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

Solution (Python):
[N,M] = [int(s) for s in input().rstrip().split(' ')]
L = [int(s) for s in input().rstrip().split(' ')]
S = sum(L)
L.sort(reverse=True)
if L[M-1] * M *4 >= S:
  print("Yes")
else:
  print("No")

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

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

L.sort(reverse=True)


M_num = L[M-1]


A = sum(L)

if M_num < A/(4*M):
    print('No')
else:
    print('Yes')

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

total = sum(A)

ans = 0
for i in range(N):
    tmp = total * (1 / (4 * M))
    if A[i] >= tmp:
        ans += 1

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

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

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

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

n,m = map(int,readline().split())
lst1 = list(map(int,readline().split()))
lst1.sort(reverse=True)

ans = 0
need = sum(lst1)/(4*m) 

for i in lst1:
    if i >= need:
        ans += 1


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

Solution (Python):
n,m = map(int,input().split())
a = sorted(map(int,input().split()),reverse=True)
sum_a = sum(a)

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()))
cnt = 0

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

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

Solution (Python):
n, m = map(int, input().split())
nums = list(map(int, input().split()))
sm = sum(nums)
ssm = sum(4*m*x >= sm for x in nums)
print('Yes' if ssm >= m else 'No')

Solution (Python):
n, m = [int(i) for i in input().split(" ")]
a = [int(i) for i in input().split(" ")]
con = sum(a) / (4 * m)
r = [i for i in a if i >= con]

print("Yes" if len(r) >= m else "No")

Solution (Python):
N,M=map(int,input().split())
A=list(map(int,input().split()))
S=sum(A)
A.sort(reverse=True)
if A[M-1]>=S/4/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()]
su=sum(A)
count=N
for i in A:
    if 4*M*i<su:
        count-=1
if count>=M:
    print("Yes")
else:
    print("No")

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

summ = sum(a)
minn = summ/(4*m)
count = 0
for i in range(0,n):
  if a[i] >= minn:
    count = 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)
K = 0
for i in range(N):
  K += a[i]
if(a[M-1]>=K/(4*M)):
  print("Yes")
else:
  print("No")

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

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

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

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

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

t = sum(a)
s = 0
b = [a[i] >= t/(4*m) for i in range(n)]
if sum(b) >= m:
    print('Yes')
else:
    print('No')

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

Solution (Python):
n,m,*a=map(int,open(0).read().split());print('YNeos'[sorted(a)[-m]*4*m<sum(a)::2])

Solution (Python):
def main():
    N, M = map(int, input().split(' '))
    A_list = list(map(int, input().split(' ')))
    A_sum = sum(A_list) / (4 * M)
    cnt = 0
    for a in A_list:
        if a >= A_sum:
            cnt += 1
            if A_sum <= cnt:
                break
    if cnt >= M:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Solution (Python):

import collections
import itertools as it
import math
import numpy as np



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




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



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

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

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

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

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

Solution (Python):
N, M = map(int, input().split())
an = [int(x) for x in input().split()]
s = sum(an)
an.sort(reverse=True)

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

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

Solution (Python):
n,m=map(int,input().split())
a=list(map(int,input().split()))
ans=0
suma=sum(a)
k=suma/(4*m)
for i in a:
    if i>=k:
        ans+=1

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

Solution (Python):
nm = list(map(int, input().split()))
n = nm[0]
m = nm[1]
an = list(map(int, input().split()))


count = 0
for a in an:
  if a >= sum(an) / (4.0 * m):
    count += 1

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

Solution (Python):


import sys
import math
import time

import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq








N, M = map(int, input().split())
A = [int(i) for i in input().split()]
ans = 0

A.sort(reverse = True)

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

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


if __name__ == "__main__":
    resolve()

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

s = sum(A)
t = s / 4 / M
A = sorted(A, reverse=True)

flag = True
for i in range(M):
    if A[i] < t:
        flag = False
        break

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

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

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

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

Solution (Python):
n, m = list(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()))
A.sort(reverse=True)
if A[m-1]>=sum(A)/(4*m):
    print("Yes")

else:
    print("No")

Solution (Python):


import sys

sys.setrecursionlimit(10**9)

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

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

def check():
    for i in range(M):
        if A[i]*4*M < total:
            return 'No'
    return 'Yes'

print(check())

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

A_list = sorted(A_list, reverse=True)

sum_A = sum(A_list)

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

Solution (Python):

import sys
import math
import numpy as np
import itertools



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


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

a=sorted(a,reverse=True)
total=0
for i in range(n):
    total += a[i]
for i in range(m):
    if a[i]<(total/4/m):
        print("No")
        exit()
print("Yes")

Solution (Python):
n, m = map(int, input().split())
a_list = list(map(int, input().split()))
total_m = sum(a_list)
r_list = []
for a in a_list:
	if a < total_m/(4*m):
		continue
	r_list.append(a)
r = 'No' if len(r_list) < m else 'Yes'
print(r)

Solution (Python):
def main():
  x, y = map(int, input().split())
  tokuhyou = [int(t) for t in input().split()]
  th = sum(tokuhyou) / (4 * y)
  count = 0
  for i in tokuhyou:
    if i >= th:
      count += 1
  if count >= y:
    print('Yes')
  else:
    print('No')
main()

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

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

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

thr = sum(a) / (4 * m)

cnt = 0
for val in a:
    if val >= thr:
        cnt += 1

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

Solution (Python):
import numpy as np
N, M = map(int, input().split())
AA = np.array(list(map(int, input().split())))


S = sum(AA >= (sum(AA)/(4*M)))
if S >= M:
    print("Yes")
else:
    print("No")

Solution (Python):
n,m = (int(x) for x in input().split())
alist = [int(i) for i in input().split()]
ans = 0
arfa = sum(alist)/(4*m)

for i in range(n):
    if alist[i]>=arfa:
        ans += 1

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

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

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

c = 0
for i in A:
    if i >= p:
        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)

total = sum(A)
limit = total/(4*m)

cannot = 0
for i in range(m):
  if A[i]<limit:
    cannot=1
    break
    
if cannot:
  print('No')
else:
  print('Yes')

Solution (Python):
n, m = map(int, input().split())
*a, = map(int, input().split())
ans = ''
j = sum(a) / (4 * m)
a.sort()
a.reverse()

cnt = 0
for i in a[:m]:
    if i >= j:
        cnt += 1
    

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

Solution (Python):
import sys

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

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

for i in range(M):
    if A[i] < check:
        print('No')
        sys.exit()
print('Yes')

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

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

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

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

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

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


if __name__ == "__main__":
    main()

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

k=sum(a)/(m*4)

if a[m-1]<k:
  print("No")
else:
  print("Yes")

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

    if M > len(A):
        print('No')
        return

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

    for i in range(M):
        if (A[i] < total * (1 / (4 * M))):
            print('No')
            return

    print('Yes')


resolve()

Solution (Python):
N,M = map(int, input().split())
lst = list(map(int, input().split()))
t=0
for ele in lst:
    if t==M: break
    if ele >= sum(lst)/(4*M): t += 1
print('Yes' if t==M else 'No')

Solution (Python):
nm=list(map(int, input().split(" ")))
n=nm[0]
m=nm[1]
votes=list(map(int, input().split(" ")))
can=sorted(votes,reverse=True)

stan=0
for vote in votes:
    stan+=vote

if can[m-1]<stan/4/m:
    print("No")
else:
    print("Yes")

Solution (Python):
N, M = map(int, input().split())
ITEMS = list(map(int, input().split())) 
MAX = sum(ITEMS)
def solve():
    count = 0
    for item in reversed(list(sorted(ITEMS))):
        if item >= MAX * (1 / (4 * M)):
            count += 1
        if count >= M:
            print("Yes")
            return 
    
    print("No")
    
solve()

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

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

total = sum(a)
c = 0

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

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

Solution (Python):
import sys

N, M = map(int,input().split())
vote_list = list(map(int, input().split()))
mysum = sum(vote_list)

mycnt = 0
for v in vote_list:
    
    if v >= mysum * (1/(4*M)):
        mycnt += 1
        if mycnt >= M:
            print('Yes')
            sys.exit()
print('No')

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

for i in a:
    su += i

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

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

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

for i in range(m):
    if a[n-i-1]*4*m<asum:
        
        print("No")
        exit()
print("Yes")

Solution (Python):
n, m = map(int, input().split())
a = list(map(int, input().split()))
b = sum(a) / (4 * m)
c = 0
for i in a:
    if i >= b:
        c += 1
if c >= 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)
check = a_list[:m]
frag = True
for a in check:
  if a < sum(a_list)/(4*m):
    frag = False
if frag:
  print("Yes")
else:
  print("No")

Solution (Python):
n,m=map(int,input().split())
a=list(map(int,input().split()))
s=sum(a)
jogen=(s-1)//(4*m)

erabi=0

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

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

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

sum_a = sum(a_list)

border = (1 / (4 * m)) * sum_a


count = 0
for a in a_list:
  if a >= border:
    count += 1


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

Solution (Python):
first = [int(i) for i in str(input()).split()]
n = first[0]
m = first[1]
a = [int(i) for i in str(input()).split()]

v = sum(a)/(4*m)

c= 0
for coso in a:
    if coso >= v:
        c += 1

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

Solution (Python):
import sys
input = sys.stdin.readline
from collections import Counter, deque


INF = float('inf')

""" Input
S = input()
N = int(input())
D = [int(input()) for _ in range(N)]
"""

def main():
    N, M = map(int, input().split())
    A = sorted(list(map(int, input().split())), reverse=True)
    total_score = sum(A)
    threshold = total_score * (1 / (4 * M))

    counter = 0
    for a in A:
        if threshold <= a:
            counter += 1

    if counter < M:
        print('No')
    else:
        print('Yes')


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
N, M = map(int, input().split())
A = list(map(int, input().split()))
to = sum(A)
cnt = 0
for a in A:
    if a>=(to * (1/(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()))

total = sum(A)
po = total*(1/(4*m))

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


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

Solution (Python):
N, M, *A = map(int, open(0).read().split())

bound_product = sorted( A, reverse=True )[M-1]
total_votes = sum( A )

if ( bound_product / total_votes ) < 1 / ( 4 * M ):
  print( "No" )
else:
  print( "Yes" )

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

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

A.sort()

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

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

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

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

for i in range(m):
  if a[i] < sum(a)/(4*m):
    print('No')
    exit()
print('Yes')

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

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


total = sum(As)
count = len([True for x in As if x >= total / (4*M) ])
if count >= M:
    print('Yes')
else:
    print('No')

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

n = nm[0]
m = nm[1]

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

Solution (Python):
import numpy as np
n, m = map(int, input().split())
A = list(map(int, input().split()))
s = sum(A)
A.sort()
index = n
for i in range(n):
    if A[i] >= s / (4 * m):
        index = i
        break

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