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

Solution (Python):

from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def main():
    n, m = [int(s) for s in input().strip().split()]
    A = [int(s) for s in input().strip().split()]
    s = sum(A)
    A.sort()
    if A[-m] * 4 * m >= s:
        print("Yes")
    else:
        print("No")




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    main()

Solution (Python):
def resolve():
    N, M = map(int, input().split())
    arr = sorted(list(map(int, input().split())), reverse=True)
    s = sum(arr)
    th = s / 4 / M
    ans = 'Yes'
    for i in range(M):
        if arr[i] < th:
            ans = 'No'
            break
    print(ans)

resolve()

Solution (Python):
N,M=map(int,input().split())
A=list(map(int,input().split()))
s=sum(A)
c=0
for i in range(N):
  if A[i]>=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()
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())
a = sorted(list(map(int, input().split())), reverse=True)

ng = 0
for i in range(m):
    if a[i] < sum(a) * (1 / (4 * m)):
        ng = 1
print("Yes" if not ng else "No")

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

Solution (Python):
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
bound = (1 / (4*M))*sum(A)

for i in range(M):
    if A[i] < bound:
        print("No")
        break
else:
    print("Yes")

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

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

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

Solution (Python):
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, M = lr()
A = np.array(lr(), np.int32)
total = A.sum()
A *= 4*M
count = (A >= total).sum()
bl = count >= M
print('Yes' if bl else 'No')

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

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

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

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

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

Solution (Python):

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

min_vote_line = sum(A_list) / (4 * M)
ans_list = [i for i in A_list if i >= min_vote_line]

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

Solution (Python):


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

     s = sum(a)
     line = s / (4 * m)

     a = sorted(a, reverse=True)
     
     if a[m-1] >= line:
          print('Yes')
     else:
          print('No')

if __name__ == "__main__":
    main()

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

Solution (Python):
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

N, M = read_int()
A = read_int()


def solve():
    ans = 'No'
    res = 0
    all = sum(A)
    for a in A:
        if a >= all / (4 * M):
            res += 1
    if res >= M:
        ans = 'Yes'
    return ans

if __name__ == "__main__":
    print(solve())

Solution (Python):
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from decimal import *
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
INF = float('inf') 
def gcd(a,b):return fractions.gcd(a,b) 
def lcm(a,b):return (a*b) // fractions.gcd(a,b) 
def iin(): return int(sys.stdin.readline()) 
def ifn(): return float(sys.stdin.readline()) 
def isn(): return sys.stdin.readline().split() 
def imn(): return map(int, sys.stdin.readline().split()) 
def imnn(): return map(lambda x:int(x)-1, sys.stdin.readline().split()) 
def fmn(): return map(float, sys.stdin.readline().split()) 
def iln(): return list(map(int, sys.stdin.readline().split())) 
def iln_s(): return sorted(iln()) 
def iln_r(): return sorted(iln(), reverse=True) 
def fln(): return list(map(float, sys.stdin.readline().split())) 
def join(l, s=''): return s.join(l) 
def perm(l, n): return itertools.permutations(l, n) 
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) 
def comb(l, n): return itertools.combinations(l, n) 
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) 
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5 
def m_add(a,b): return (a+b) % MOD
def print_list(l): print(*l, sep='\n')
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def No(): print('No')

def sieves_of_e(n):
    is_prime = [True] * (n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i * 2, n+1, i): is_prime[j] = False
    return is_prime

N,M = imn()
A = iln()
total = sum(A)
cnt = 0
for a in A:
    if 4*M*a >= total:
        cnt += 1
print('Yes' if cnt >= M else 'No')

Solution (Python):
a,b=map(int,input().split())
val=[int(i) for i in input().split()]
valsum=sum(val)
ans=0
for i in val:
    if i>=valsum/(4*b):
        ans+=1
if ans>=b:
    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)

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

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

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

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

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

flag = True
for i in range(m):
  if a[i] < sum_val / (4 * m):
    flag = False

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

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

s = sum(a)
l = s * (1/(4*m))

cnt = 0
for ai in a:
    if ai >= l:
        cnt += 1
if cnt >= m:
    print('Yes')
else:
    print('No')

Solution (Python):

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

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

cnt = 0

for _a in a:
    if _a >= border:
        cnt += 1

if cnt >= 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)
cnt = 0
for a in A:
    if a * 4 * M >= total:
        cnt += 1

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

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

Solution (Python):
n,m = map(int,input().split())
a = sorted(map(int,input().split()))
sum_a = sum(a)
thresh = sum_a/(4*m)
ans = [i for i in a if i >= thresh]
print("No" if len(ans)<m else "Yes")

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

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

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

a = sum(List)/(4*M)
b = max(List)

List.sort(reverse=True)
ans = 1

for i in range(M):
  if List[i] >= a:
    ans = 1
  else:
    ans = 0

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

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

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

s = sum(a)
border = s / (4 * m)


if len(list(filter(lambda x: x >= border, a))) >= m:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
n,m = map(int,input().split())
lis = list(map(int,input().split()))
s = sum(lis)
s_lis = sorted(lis,reverse=True)[:m]
if min(s_lis) < s /(4*m):
    print('No')
else:
    print('Yes')

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

Solution (Python):


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

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

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

ans = 0
for i in a:
    if i >= sum(a)*(1/(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()))
b=sum(a)/(4*m)
count=0
for i in range(0,len(a)):
  if a[i]>=b:
    count=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())))[::-1]
bar=sum(a)
print('Yes' if a[m-1]*4*m>=bar else 'No')

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

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

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

count=0
for i in range(n):
    if (a[i]>=border):
        count+=1
print("Yes" if (count>=m) else "No")

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

c = 0
for i in range(n):
    if ass/(4*m) <= a[i]:
        c += 1
if c >= m:print("Yes")
else:print("No")

Solution (Python):
n, m = map(int, input().split())
lst = list(map(int, input().split()))
ttl = sum(lst)
cnt = 0
for x in lst:
    if x >= ttl*(1/(4*m)):
        cnt += 1

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

Solution (Python):
n, m = map(int, input().split())
As = list(map(int, input().split()))
As = sorted(As, reverse=True)
num = sum(As)
ans = 0
for a in As:
  if num / (4*m) <= a:
    ans += 1
if ans >= m:
  print('Yes')
else:
  print('No')

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

Solution (Python):

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

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

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

Solution (Python):
n,m=map(int,input().split())
a=sorted(list(map(int,input().split())),reverse=True)
Threshold=sum(a)/(4*m)
ans='Yes'

for i in range(m):
    if a[i]<Threshold:
        ans='No'
        break
print(ans)

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

s = sum(a)
a.sort()

if all(a[-i-1] >= s/4/m for i in range(m)):
    print('Yes')
else:
    print('No')

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

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

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

t.sort(reverse=True)

check =sum(t)*(1/(4*m))

if check<=t[m-1]:
    print('Yes')
else:
    print('No')

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

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

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

Solution (Python):
InputIntList = lambda : list(map(int, input().split()))
InputStrList = lambda : list(input().split())

import numpy as np

N, M = InputIntList()
A = InputIntList()

A = np.array(A)
All = A.sum()
if len(A[A >= All / 4 / M]) >= M:
    print('Yes')
else:
    print('No')

Solution (Python):
N, M = map(int,input().split())
A = list(map(int,input().split()))
total = sum(A)
ans = 0
for i in range(N):
    if A[i] >= total/(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()))
A.sort(reverse=True)
total = sum(A)

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

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

Solution (Python):
N, M = map(int, input().split())
A = sorted(list(map(int,input().split())),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()))
s = sum(a)
b = s / 4 / m
if m <= len([1 for x in a if b <= x]):
    print('Yes')
else:
    print('No')

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

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


if __name__ == '__main__':
    main()

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

totalvote=sum(good)
limit=totalvote/(4*m)
good.sort()
if good[-1*m]<limit:
    print("No")
else:
    print("Yes")

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

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

ct = 0
for aa in a:
    if aa >= x:
        ct += 1

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

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

x = sum(A) / (4 * M)
cnt = 0

for a in A:
    if a >= x:
        cnt += 1

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

Solution (Python):
import sys
import heapq
from operator import itemgetter
 
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N,M = IL()
a = IL()
num = sum(a)

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

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

k=0
ll=sum(l)
for i in range(n):
    if l[i]>=ll/(4*m):
        k+=1
if k>=m:
    print("Yes")
else:
    print("No")

Solution (Python):
a,b=map(int,input().split())
l=list(map(int,input().split()))
l=sorted(l)
s=sum(l)
x=l[-1*b]
if float(s/(b*4))>x:
  print('No')
else:
  print('Yes')

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

border=sum(alist)/(4*M)
cnt=0
for a in alist:
  if a>=border:
    cnt+=1
    


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

Solution (Python):
import numpy as np

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

As = np.asarray(input().split(), dtype=np.uint32)

As.sort()

votes = np.sum(As)

if As[-m] >= (votes / (4 * m)):
    print("Yes")
else:
    print("No")

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

Solution (Python):

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


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


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

Solution (Python):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    N,M = map(int, readline().split())
    A = [int(i) for i in readline().split()]

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

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


if __name__ == "__main__":
    main()

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

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

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

cnt=0
for num in A:
  if num >= summ/(4*M):
    cnt+=1
  else:
    break

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

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

Solution (Python):










n,m=list(map(int,input().split()))
a=list(map(int,input().split()))
a.sort()
a.reverse()
t=sum(a)/(4*m)
for i in range(m):
    if a[i]<t:
        print("No")
        exit()

print("Yes")

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

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

Solution (Python):

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

if cnt >= m:
    ret ="Yes"
print(ret)

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

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

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

Solution (Python):
n, m = map(int, input().split())
a = list(map(int, input().split()))
s_a = sum(a)
a = list(filter(lambda x: x >= 1 / (4 * m) * s_a, a))
if len(a) >= m:
    print("Yes")
else:
    print("No")

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

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

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

if __name__ == '__main__':
    resolve()

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

a_list = [int(s) for s in input().split()]
a_list = list(reversed(sorted(a_list)))

a_all = sum(a_list)

ans = "Yes" if a_list[m - 1] >= a_all / (4 * m) else"No"
print(ans)

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

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

total = sum(a)
b = []

for i in range(n):
    if a[i] >= total/(4*m):
        b.append(a[i])
        
if len(b) >= m:
    print("Yes")
else:
    print("No")

Solution (Python):
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

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

N,M = input_int()
A = many_int()

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


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

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

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

Solution (Python):

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

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

l = 1/(4*m)*sum(list_A)
cnt = 0
for c in list_A:
    if c >= l:
        cnt += 1

ans = "No"
if cnt >= m:
    ans = "Yes"

print(ans)

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

Solution (Python):

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

ans = 0
b = sum(a)
c = b / (4*m)
for i in a:
    if i >= c:
        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)
flag=True
x=sum(a)
for i in range(m):
    if a[i]<sum(a)/(4*m):
        flag=False

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

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

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

Solution (Python):
import sys
n,m = map(int,input().split())
a = list(map(int,input().split()))
count = 0
a = sorted(a,reverse=True)
sums = sum(a)
for i in range(m):
    if a[i] < sums*(1/(4*m)):
        print("No")
        sys.exit()
    count += 1
print("Yes")

Solution (Python):
N,M=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
s=sum(a)
f = True
for i in range(M):
    if a[i]<s/(4*M):
        f = False
        break

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

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

threshold = sum(A)/M/4
count = 0
for elem in A:
    if elem >= threshold:
        count += 1
        
if count >= M:
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
mod = 10**9+7
import sys
from collections import Counter, defaultdict, deque
from itertools import product, permutations, combinations
from itertools import accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from math import ceil,floor
from copy import deepcopy
from heapq import heappop,heappush,heapify
import heapq


sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1


p2D = lambda x: print(*x, sep="\n")

def II(): return int(sys.stdin.readline())

def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())




def LLI(rows_number): return [LI() for _ in range(rows_number)]


def LI(): return list(map(lambda x:int(x), sys.stdin.readline().split()))
def HI(): return list(map(lambda x:int(x)*(-1), sys.stdin.readline().split()))


N,M = MI()
A = LI()
s = sum(A)
l = [a for a in A if a>=(s/(4*M))]

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

Solution (Python):
def main():
    n, m = map(int, input().split())
    num_list = list(map(int, input().split()))

    vote_num = sum(num_list)

    count = 0

    for i in range(n):
        if vote_num * 1/(4*m) <= num_list[i]:
            count += 1

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

if __name__ == '__main__':
    main()

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

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


A = list(map(int,input().split()))
sm = sum(A)
A.sort(reverse=True)
for x in range(m):
    if A[x] < (1/(4*m))*sm:
        print("No")
        exit(0)
print("Yes")

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

get = sum(a)

num = 0

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

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

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

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

Solution (Python):
n, m = map(lambda i: int(i), input().split())
As = list(reversed(sorted(list(map(lambda i: int(i), input().split())))))

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

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

Solution (Python):
n, m = map(int, raw_input().strip().split())
a = map(int, raw_input().strip().split())

total = sum(a)
cnt = 0

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

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