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

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

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

print("No")

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

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

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


total = sum(A)
import math
thres = math.ceil(total / (4 * M))
count = len([i for i in range(N) if A[i] >= thres])
if count >= 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_num = A_list[M - 1]
if check_num / sum(A_list)  >= 1 / (4 * M):
  print('Yes')
else:
  print('No')

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

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

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

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

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

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

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

Solution (Python):
def sep():
    return map(int,input().strip().split(" "))
def lis():
    return list(sep())
import sys
sys.setrecursionlimit(10**6)

n,m=sep()
ar=lis()
ar.sort(reverse=True)
k=ar[m-1]
if k>=((sum(ar)/(4*m))):
    print("Yes")
else:
    print("No")

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

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

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

for i in a:
    get += i

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
N,M=map(int,input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
AM=A[0:M]
asum=sum(A)
rate=asum/4/M

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

Solution (Python):
import decimal

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

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

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

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

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

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

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

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

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

votes = sum(A)
tot = 0

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

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

Solution (Python):

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

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

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

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

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

Solution (Python):
from collections import Counter
N,M=map(int,input().split())
A=sorted(map(int,input().split()),reverse=True)
s=sum(A)/(4*M)
for i in range(M):
    if A[i]<s:
        print('No')
        exit()
print('Yes')

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

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

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

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

print('Yes')

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):



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

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

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

total = sum(a)
cnt = 0

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

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

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

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

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

Solution (Python):


if __name__ == '__main__':
    N, M = map(int, input().split())
    li = list(map(int, input().split()))
    lisum = sum(li)

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

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

    else:
        print('No')

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

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


main()

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

s = sum(A)
th = s / (4*M)
cnt = 0

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

if cnt < M:
    print("No")
else:
    print("Yes")

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

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

Alist = sorted(Alist,reverse=True)

Ans = "No"
for i in range(M):
  
  
  if Alist[i]>=(sum(Alist)/(4*M)):
    Ans ="Yes"
  else:
    Ans = "No"
    
print (Ans)

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

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

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

Solution (Python):
n,m=map(int,input().split())
A = list(map(int,input().split()))
A.sort()
A = A[::-1]
for i in range(m):
  if A[i]*4*m < sum(A):
    print("No")
    break
else:
  print("Yes")

Solution (Python):
a,b=map(int,input().split())
c=list(map(int,input().split()))
d=sum(c)
e=(4*b)
f=0
for i in c:
    if(i*e>=d):
        f+=1

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

Solution (Python):
n,m = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
a.sort(reverse = True)
s = sum(a)
res = "Yes"
for i in range(m):
  if a[i] * 4 * m < s:
    res = "No"
print(res)

Solution (Python):
mn = input().split()
ob = input().split()

n = int(mn[0])
m = int(mn[1])

votes = 0

for i in range(n):
    ob[i] = int(ob[i])
    votes += ob[i]

ob.sort(reverse = True)

line = votes/4/m

ans = 0

for i in range(m):
    if ob[i] < line:
        ans += 1

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

Solution (Python):

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

if __name__ == "__main__":
    main()

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

hyo.sort(reverse=True)

a = True

for x in range(m):
  if hyo[x] < all_hyo / 4 / m:
    a = False
    break

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

Solution (Python):

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


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

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

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

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

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


if __name__ == '__main__':
    main()

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

cn = 0
SUM = 0

for i in range(len(A)):
    SUM = SUM + A[i]
    
for i in range(len(A)):
    if A[i] >= (SUM / 4 / M):
        cn = cn + 1
    else:
        continue

if cn >= 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()))
print("Yes" if len([i for i in a if i/sum(a) >= 1/(4 * m)]) >= m else "No")

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

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

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

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

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

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

A=list(map(int,input().split()))
ans=0
A.sort(reverse=True)
S=sum(A)

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

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

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

alist.sort(reverse=True)
allvote = sum(alist)

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

Solution (Python):
ri = lambda S: [int(v) for v in S.split()]
N, M = ri(input())
A = ri(input())
T = sum(A)
thresh = (1/(4*M)) * T
c = len([v for v in A if v >= thresh])
print("Yes" if c >= M else "No")

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

Solution (Python):
n,m = map(int, input().split())
A = list(map(int, input().split()))
rank = sum(A) / (4*m)
cnt =0

for a in A:
    cnt += rank <= a

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

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

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

Solution (Python):
n, m = map(int, input().split())
a = list(map(int, input().split()))
l = sorted(a, reverse=True)
sum = sum(l) / 4 / m
count = 0

for i in range(len(l)):
    if l[i] >= sum:
        count += 1
    else:
        break


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

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

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

for i in range(m):
    if border <= a[i]:
        pass
    else:
        print('No')
        exit(0)

print('Yes')

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

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

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

A.sort(reverse=True)

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

ans='Yes'
if A[M-1] < th:
    ans='No'
    
print(ans)

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

S = sum(A)
th = math.ceil(S / (4*M))

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

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

Solution (Python):
N, M = map(int, input().split())
A = list(map(int, input().split()))
A = sorted(A)
A = A[::-1]
X = sum(A)
Y = 1/4/M
ans = 'Yes'
for i in range(M):
  if A[i]/X < Y:
    ans = 'No'
print(ans)

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

s = sum(A)
A = sorted(A, reverse=True)


if A[M-1]*(4*M) >= s: 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]*(4*M) < s: 
    ans = 'No'
    break

print(ans)

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

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

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

popular = [x for x in a if x*4*m >= total]

if len(popular) >= 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()))

print('No' if sorted(A)[-M]*M*4 < sum(A) 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 = input()
n = n.split()
m = int(n[1])
n = int(n[0])
a = input()
a = a.split()
c = int(a[0])
for b in range(n-1):
    c = c + int(a[b+1])
c = c / (4 * m)
e = 0
for d in range(n):
    if int(a[d]) >= c :
        e = e + 1
if e >= m:
    print("Yes")
else:
    print("No")

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

a_sort = sorted(a, reverse=True)
a_sum = sum(a)

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

Solution (Python):


kind, choose = map(int, input().split())
count = 0
total = 0

num = input().split(" ")
for i in num:
    total += int(i)

ok = total / (4 * choose)

for i in num:
    if int(i) >= ok:
        count += 1

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

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

Solution (Python):
n, m = (int(x) for x in input().split())
list_a = sorted([int(x) for x in input().split()], reverse=True)

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

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

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

Solution (Python):
def main():
    n, m = map(int, input().split())
    a_lst = list(map(int, input().split()))
    total = sum(a_lst)
    cnt = 0

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

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

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    n, m = map(int, input().split())
    a_lst = list(map(int, input().split()))
    total = sum(a_lst)
    cnt = 0

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

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

    print(ans)


if __name__ == "__main__":
    main()

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

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

ans = len([a for a in A if a * 4 * M >= s])

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

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

ans = 0
for a in A:
  if a * 4 * M >= s:
    ans += 1

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

Solution (Python):
nums = list(map(int,input().split()))
N = nums[0]
M = nums[1]
numss = list(map(int,input().split()))
cnt = M
summ = sum(numss)
for num in numss:
  if num >= summ/(M*4):
    cnt -= 1
if cnt > 0:
  print("No")
else:
  print("Yes")

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

add = sum(ar)
check = add / (4 * m)
amt = 0

for num in ar:
    if num >= check:
        amt += 1

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

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

Solution (Python):
n,m = input().split()
n = int(n)
m = int(m)
arr = list(map(int,input().split()))
minn = sum(arr)*(1/(4*m))
t = 0
for i in arr:
  if i >= minn:
    t += 1

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

Solution (Python):
def main():
    N,M = map(int,input().split())
    A = list(map(int,input().split()))
    sum = 0
    for i in range(N):
        sum += A[i]

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

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

main()

Solution (Python):
r=input().split()
N=int(r[0])
M=int(r[1])
d_pre=input().split()
d=[int(s) for s in d_pre]
x=sum(d)
ans=0
for i in range(N):
    if d[i]>=x/(4*M):
        ans+=1
if ans>=M:
    print("Yes")
else:
    print("No")

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

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

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

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



if '__main__' == __name__:
    resolve()

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

sum = sum(A)
limit = sum / (4 * M)
A.sort(reverse = True)

ans = True
for i in range(M):
    if A[i] < limit:
        ans = False
        break
if ans:
    print("Yes")
else:
    print("No")

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

print('Yes' if len(list(filter(lambda x : x >= s * (1/(4*m)), a))) >= m else 'No')

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

sum = 0
for i in range(N):
	sum = sum + A[i]

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

Solution (Python):
import math

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

cnt = 0
A_sum = sum(A_list)

for i in range(N):
    if A_list[i] >= math.ceil(A_sum/4/M):
        cnt += 1
if cnt >= M:
    print("Yes")
else:
    print("No")

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

Solution (Python):
import sys
input = sys.stdin.readline
N, M = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse = True)
sm = sum(a)
for i in range(M):
  if a[i] < sm / 4 / M:
    print("No")
    break
else: print("Yes")

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

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

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

Solution (Python):
n, m = map(int,input().split())
A = list(map(int,input().split()))
sum = 0
count = 0
for a in A:
    sum += a
for a in A:
    if a >= 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()))
b=sum(a)
a.sort()
ans=0
for x in a:
  if x>=(b/(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()))
num = 0
for i in a:
    if 1/(4*m) <= i/sum(a):
        num += 1
if m <= num:
    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 sum(a)/(4*m) <= i:
        count+=1
print('Yes' if count >= m else 'No')

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

Solution (Python):
n,m = map(int,input().split())
a = list(map(int,input().split()))
count = 0
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 = map(int,input().split())
a = list(map(int,input().split()))
s = sum(a)
a.sort(reverse=True)
if a[m - 1] < s*1/(4*m):
    print("No")
else:
    print("Yes")