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()))
requiredValue = float(sum(a)) / 4 / m
count = 0

for x in a:
    if x >= requiredValue:
        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=0
for a in A:
    if a>=1/(4*M)*sum(A):
        b+=1
print("Yes" if b>=M else "No")

Solution (Python):
n, m = map(int,input().split())
A = [int(a) for a in 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()))
cnt = 0

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

a = sorted(a, reverse=True)

chflg = True

for i in range(m):
    if a[i] < cnt * 1 / (4 * m):
        chflg = False

if chflg == True:
    print('Yes')
else:
    print('No')

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


array = list(map(int, input().strip().split(' ')))
sum = 0
for i in range(n):
    sum = sum + array[i]

bd = sum / (4*m)

cnt = 0
for i in range(n):
    if array[i] >=  bd:
            cnt = cnt + 1
ans = 'No'
if cnt >= m:
    ans = 'Yes'
print(ans)

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

cutter = 0
all = 0
for i in range(len(score)):
    all += score[i]

candidate = 0
criteria = 4 * NM[1]
for i in range(len(score)):
    if (all <= (score[i] * criteria)):
        candidate += 1

if (candidate >= NM[1]):
    print("Yes")
else:
    print("No")

Solution (Python):


import sys
import math

from itertools import count, permutations
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint

INF = float('inf')

ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
sys.setrecursionlimit(1000000000)


def lcm(a, b):
    return (a * b) // gcd(a, b)



n,m = mis()
alist = lmis()

alist.sort()
alist.reverse()

min = sum(alist) * float(1/(4*m))

for i in range(m):
    if alist[i] < min:
        print('No')
        exit(0)

print('Yes')

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

arr = list(map(int, input().split()))
arr = sorted(arr, reverse=True)
ans = 0
s = sum(arr)/m/4

for i in range(n):
  if arr[i] >= s:
    ans += 1
  
if ans >= m:
  print('Yes')
else:
  print('No')

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

b.sort(reverse=True)


s = 0
for i in range(len(b)):
  s += b[i]
  
flag = True
for i in range(a[1]):
  if b[i] < (s / (4*a[1])):
    flag = False

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

Solution (Python):
N,M=map(int,input().split())
Z=[int(_) for _ in input().split()]
V=sum(Z)
rat=float(1/(4*M))
cnt=0
for i in range(N):
  if float(Z[i]/V)>=rat:
    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()
A.reverse()
A_sum = sum(A)
bound = 0
if A_sum % (4 * M) == 0:
    bound = A_sum // (4 * M)
else:
    bound = A_sum // (4 * M) + 1
if A[M - 1] >= bound:
    print("Yes")
else:
    print("No")

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

A.sort(reverse = True)
real = A[M-1] / sum(A)
ideal = 1 / (4 * M)

if real >= ideal:
    print("Yes")
else:
    print("No")

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

Solution (Python):
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    N, M = map(int, input().split())
    A = list(map(int, input().split()))

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


main()

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

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

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

cnt = 0

for j in range(N):
  if sumA * (1/4/M) <= A[j]:
    cnt = cnt + 1

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

Solution (Python):
[N,M]=[int(item)for item in input().split()]
items=[int(item)for item in input().split()]
items_sum=sum(items)

cnt=0
for item in items:
    if item >= items_sum /(4*M):
        cnt += 1
        if cnt==M:
            print("Yes")
            exit()
        
print("No")

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

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

Solution (Python):
n,m=map(int,input().split())
a=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 = sorted(a, reverse = True)
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=sorted(list(map(int,input().split())),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()))
x = sum(A)* 1/(4*m)
ans = [int() for a in range(m)]
for i in range(n):
    if A[i] >= x:
        if A[i] > ans[0]:
            ans[0] = A[i]
            ans.sort()
ct = 0
for i in range(m):
    if ans[i] != 0:
        ct +=1
if ct == m:
    print("Yes")
else:
    print("No")

Solution (Python):
from collections import defaultdict
import math
N, M = map(int, input().split(' '))
A = list(map(int, input().split(' ')))
kijun = sum(A)/M/4

a = list(filter(lambda x: x >= kijun, A))
if len(a) >= M:
    print('Yes')
else:
    print('No')

Solution (Python):
n, m = map(int, input().split())
a = list(map(int, input().split()))
sum_a = sum(a)
for i in range(m):
    if sum_a/4/m > max(a):
        print("No")
        break
    else:
        a.remove(max(a))
else:
    print("Yes")

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

Solution (Python):


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


sorted_A = sorted(A, reverse=True)


m_ele = sorted_A[:M]


total_toku = sum(sorted_A)


for m in m_ele:
    
    if m < 1 / 4 / M * total_toku:
        
        print('No')
        break

else:
    print('Yes')

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

if len(list(filter(lambda x: x>=total/(4*m), votes))) >= m:
  print("Yes")
else:
  print("No")

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

	th = sum(A)/4/M

	A.sort(reverse=True)



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

Solution (Python):
n,m=map(int,input().split())
l=sorted(map(int,input().split()),reverse=True)
sum_1=sum(l)
miman=1/(4*m)

bl=True
for i in range(m):
    if l[i]/sum_1<miman:
        bl=False
        print("No")
        break
if bl :print("Yes")

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

Solution (Python):

init = [int(s) for s in input().rstrip().split(' ')]
data = [int(s) for s in input().rstrip().split(' ')]

sorData = sorted(data,reverse=True)

if sorData[init[1]-1] < sum(data)/(4*init[1]):
    print("No")
else:
    print("Yes")

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

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

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

c=0
for i in a:
    if i >= asum/(4*m):
        c+=1

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

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

N = int(N)
M = int(M)

a_s = sorted(A, reverse=True)
a_i = [int(x) for x in a_s ]
total = sum(a_i)
m_4 = total / (4 * M)

count = 0
for i in a_i:
  if i >= m_4:
    count += 1
  
if M <= count:
  print('Yes')
else:
  print('No')

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

if alist[m - 1]/sum(alist) >= 1/(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)
ans = True

for i in range(m):
  if a[i] < sum(a) / (4*m):
    ans = False

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

Solution (Python):

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

threshold = sum(A) / (4*M)
count=0
for i in range(len(A)):
    if A[i] >= threshold:
        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)

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

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

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

if __name__ == '__main__':
  main()

Solution (Python):
n,m=map(int,input().split())
s=list(map(int,input().split()))
s.sort(reverse=True)
total_vote=0
for i in range(n):
    total_vote += s[i]

count = 0
while count != m:
    if total_vote * (1/(4*m)) > s[count]:
        print("No")
        exit()
    else:
        count+=1
print("Yes")

Solution (Python):
def main():
  n,m = map(int, input().split())
  
  point = sorted(list(map(int, input().split())), reverse=True)
  border = sum(point) / (4*m)
  
  result = 'Yes'
  for i in range(m):
    if point[i] < border:
      result = 'No'
      break
 
  return result

print(main())

Solution (Python):
from sys import *
N,M = map(int,stdin.readline().split())
items = list(map(int, stdin.readline().split()))
total = sum(items)
items.sort(reverse = True)
count = 0
for item in items[0:M]:
    if item < total * (1/(4*M)):
        print("No")
        exit()
print("Yes")

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

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

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

hyousu = sum(item_list)
threshold = hyousu * (1 / (4 * M))

item_list.sort(reverse=True)
if item_list[M-1] < threshold:
  print('No')
else:
  print('Yes')

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

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

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

A.sort(reverse=True)

amount = sum(A)

selectable = 0
for a in A:
    if(not (a*4*M < amount)):
        selectable += 1

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

Solution (Python):
import bisect as bs

n,m = map(int, input().split())
a = sorted(list(map(int, input().split())), reverse=True)
s = sum(a)

count = 0

for i in range(len(a)):
  if a[i]*m*4 >= s:
    count += 1
  else:
    break

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

Solution (Python):
import sys

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

sorted_a = sorted(a, reverse=True)

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

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

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

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

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

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

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

treshold = sum(a)/(4*nm[1])
judge = 'Yes'
for i in range(nm[1]):
    a_max = max(a)
    a[a.index(a_max)] = 0
    if a_max < treshold:
        judge = 'No'
        break

print(judge)

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

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


ans = len(list(filter(lambda x:x>=border,a)))

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

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

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




a.sort(reverse=True)


last = a[m-1]

total = sum(a)

if (last >= (total / (4 * 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)
sum = sum(A)
check = A[M-1]
if check < sum/(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)
S=sum(A)
OK=S/(4*M)
ans=0
for i in range(M):
  if A[i]>=OK:
    ans+=1
if ans==M:
  print("Yes")
else:
  print("No")

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

test = sum(A) / (4 * M)
ans = 0
for i in A:
    if i >= test:
        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 range(n):
    if(a[i]>=sum(a)*1.0/(4.0*m)):
        cnt+=1
if(cnt>=m):
    print("Yes")
else:
    print("No")

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

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

cnt = 0
for a in A:
    if a >= lower_limit:
        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=sum(A)
number=0
for i in A:
    if i>=a/(4*M):
        number+=1
if number>=M:
    print('Yes')
else:
    print('No')

Solution (Python):

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, M, *A = map(int, read().split())
A.sort(reverse=True)
x = A[M - 1]
S = sum(A)

answer = 'Yes' if 4 * M * x >= S else 'No'
print(answer)

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

Solution (Python):
N, M = input().split()
N = int(N)
M = int(M)
votes_str = list(input().split())
votes = [int(i) for i in votes_str]
votes_sum = sum(votes)
votes.sort(reverse=True)
thresh = votes[M-1]
if thresh < votes_sum/(4*M):
  print("No")
else:
  print("Yes")

Solution (Python):
n, m = map(int, input().split())
votes = list(map(int, input().split()))
vote_total = sum(votes)
base_4m = vote_total / (4 * m)
over4m_count = 0

for i in votes:
    if i >= base_4m:
        over4m_count += 1

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

Solution (Python):


def solve():

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

    Alist.sort(reverse=True)

    needRatio = 1/(4*M)
    total = sum(Alist)

    for i in range(M):
        ratio = Alist[i] / total
        if ratio < needRatio:
            print("No")
            exit()

    print("Yes")


if __name__ == "__main__":
    solve()

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

border = sum(A) / (4 * M)
pnum = 0
for i in range(N):
    test = A[i] - border
    if test >= 0:
        pnum +=1
    else:   
        pass
    if pnum >= M:
        break
    else:
        pass

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

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

count = 0

for tg in l:
	if tg >= 1 / (4 * m)* sum(l):
		count += 1


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

Solution (Python):
n, m = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]
goukei = sum(l)
tokuhyo = goukei / (4 * m)
f = True
for i in range(m):
  if max(l) >= tokuhyo:
    goukei -= max(l)
    l.pop(l.index(max(l)))
  else:
    f = False    

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

Solution (Python):

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

a=sorted(a,reverse=True)
item=a[m-1]
s=sum(a)/(4*m)

if item >= s:
    print("Yes")
else:
    print("No")

Solution (Python):
n, m = map(int, input().split())
a = [int(_) for _ in input().split()]
aa = [0] * n

for i in range(n):
    aa[i] = a[i] * (4*m)

lim = sum(a)
ans = 0
for i in range(n):
    if aa[i] >= lim:
        ans += 1
    else:
        pass
if m <= ans:
    print('Yes')
else:
    print('No')

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

min_voted_num = 1 / (4 * M) * sum(Ai)
num_selected = sum(A >= min_voted_num for A in Ai)
if num_selected >= M:
  print('Yes')
else:
  print('No')

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

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

c = 0
for i in A:
    if i < a:
        c+=1
d = N-c

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

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

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

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

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

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

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

print("Yes" if n - unpopular >= m else 'No')

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

for i in range(N):
    tokuhyo += int(A[i])

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

Solution (Python):

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

flag = True
diff = 0
s = sum(a_L)
a_L = list(sorted(a_L))



for i in range(n):

    if float(a_L[i]) >= s/(4*m):
        diff += 1

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

Solution (Python):
N,M,*A = map(int,open(0).read().split())
A.sort()
A.reverse()
A2=A[:M]
j = sum(A) / (4*M)
print("Yes" if all(a>=j for a in A2) else "No")

Solution (Python):

"""
Created on Sat Apr  4 20:49:19 2020

@author: naoki
"""

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

criteria = sum(A) / (4*M)
count = 0
for i in range(N):
    if A[i] >= criteria:
        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_votes = sum(A)
limit = total_votes/(4*M)
if sorted(A, reverse=True)[M-1]<limit:
  print("No")
else:
  print("Yes")

Solution (Python):
def main():
    _, M = [int(x) for x in input().split()]
    A = [int(x) for x in input().split()]
    border = sum(A) / (M * 4)
    count = 0
    for a in A:
        if a >= border:
            count += 1
            if count >= M:
                print("Yes")
                return
    print("No")

if __name__ == "__main__":
    main()

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

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

l_sort = sorted(l , reverse=True)

l_sum = sum(l)

s = l_sum/(m*4)

ans = 0
for i in range(m):
    if l_sort[i] >= s:
        ans += 1



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

Solution (Python):
a=list(map(int,input().split()))
b=list(map(int,input().split()))
count = a[0]
choice = a[1]
all = sum(b)
answer = 1
b.sort(reverse=True)
for i in range(choice):
     if b[i]<(all/(4*choice)):
          answer = answer*0
if answer==0:
     print("No")
else:
     print("Yes")

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

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

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

d=c/(4*M)

for j in range(N):
    if A[j]>=d:
        ans=ans+1
    else:
        pass

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

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

Solution (Python):




def main():
    
    N, M = list(map(int, input().split()))
    A = list(map(int, input().split()))
    s = sum(A)
    t = s / (4 * M)
    A.sort()
    A = A[::-1]
    ans = 'Yes'
    for i in range(M):
        if A[i] < t:
            ans = 'No'
    print(ans)


if __name__ == "__main__":
    main()

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

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n,m = iim()
A = sorted(iil(),reverse=True)

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

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

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

for i in range(n):

   if a[i]*4*m >= s:
       c+=1

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

Solution (Python):
import sys

n, m = map(int, input().split())
table = list(map(int, input().split()))
table.sort(reverse=True)
for x in range(0, m):
    if table[x] < sum(table) / (4 * m):
        break
else:
    print('Yes')
    sys.exit()
print('No')

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

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

min = arr_sum * (1 / (4 * int(M)))

for x in A[:int(M)]:
    if x < min:
        print('No')
        break
else:
    print('Yes')

Solution (Python):


n = list(map(int,input().split()))
m = list(map(int,input().split()))
m.sort()
l = []
for i in m:
    l.insert(0,i)
ans = 0
s = 0
for i in m:
    s += i
for i in range(n[1]):
    if l[i]<s/4/n[1]:
        ans = 1

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

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

x = sum(A)
for a in A[:m]:
    if a < x / (4 * m):
        print("No")
        exit()
print("Yes")

Solution (Python):
import numpy as np
S = input().split(" ")
N = int(S[0])
M = int(S[1])

ARR = np.array([int(s) for s in input().split(" ")])


criterion = np.sum(ARR) / (4 * M)

res = ARR >= criterion

result = np.sum(res)

if result >= 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_vote = 0
result = True
for a in A:
    total_vote += a
for m in range(M):
    if A[m] < (total_vote/(4*M)):
        result = False
if result:
    print("Yes")
else:
    print("No")

Solution (Python):

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


sum_a = sum(l_a)
l_a.sort(reverse=True)
for i in range(m):
    if(l_a[i] < sum_a / 4 / m):
        Ans = 'No'
        break
    else:
        Ans = 'Yes'


print(Ans)

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

Solution (Python):
import sys

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

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

if t.is_integer():
    t = sum(A) // (4*M)

for i in range(M):
    if A[i] < t:
        print("No")
        sys.exit()

print("Yes")

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

sou_tokuhyousuu = sum(A)
count = 0
for i in A:
    if sou_tokuhyousuu / (4 * NM[1]) <= i:
        count += 1

if NM[1] <= count:
    print("Yes")
else:
    print("No")

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

def checkPopular():
    count = 0
    for i in range(N):
        if (A[i] / total)  >= (1 / (4*M)):
            count += 1
    return count

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

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

Solution (Python):
import sys

def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getlist():
    return list(map(int, input().split()))
def getlist2():
    return [int(x) * 100000 for x in input().split()]
import math
import bisect
import heapq
from decimal import Decimal

MOD = 10**9 + 7
INF = 10**15
def main():
    n,m = getlist()
    nums = getlist()
    sou = sum(nums)
    ans = 0
    for num in nums:
        if num >= sou / (4*m):
            ans += 1
    if ans >= m:
        print("Yes")
    else:
        print("No")
    return

if __name__ == '__main__':
    main()

"""
9999
3

2916
"""

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


def value_evaluator(x:int)->bool:
    return x >= sum(a) / (4 * m)

flt_a = list(filter(value_evaluator, a))

if len(flt_a) >= 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)
c=0
for i in a:
  if i<x:
    continue
  else:
    c+=1
if c>=m:
  print('Yes')
else:
  print('No')

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

amax = max(a)
s = sum(a)

mm = s / (4 * m)
a.sort(reverse=True)

y = True
for i in range(m):
    if a[i] < mm:
        print('No')
        y = False
        break

if y:
    print('Yes')

Solution (Python):
def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    A.sort(reverse=True)
    ans = 1
    for i in range(M):
        if A[i] < sum(A)/(4*M): ans = 0

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


main()

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

Solution (Python):

def main():
  
  
  
  
  
  
  
  
  
  
  
  
  import sys
  sys.setrecursionlimit(10**6)
  readline = sys.stdin.readline
  ints = lambda: map(int, readline().split())
  floats = lambda: map(float, readline().split())
  pyes = lambda: print("Yes")
  pno = lambda: print("No")
  lli = lambda I, J: [[0] * J for _ in range(I)]
  mod = 10**9+7

  n,m = ints()
  a = list(ints())
  sm = sum(a) / 4 / m
  x = len([i for i in a if i >= sm])
  if x < m:
    pno()
  else:
    pyes()

if __name__ == '__main__':
  main()

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

sums = 0
for i in range(n):
  sums += List[i]
border = sums / (4*m)

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

Solution (Python):
from decimal import *

n , m = map(int, input().split())
arr = list(map(int, input().split()))
check = Decimal(1/(4*m)) * sum(arr)
count = 0
for i in arr:
	if i < check:
		continue
	else:
		count+=1
if count >= m:
	print("Yes")
else:
	print("No")