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):
k,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('Yes')
else:
    print('No')

Solution (Python):
str = input().split()
n = int(str[0])
m = int(str[1])

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

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

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

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

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

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

total_votes = sum(votes)
threshold = total_votes / (4*M)
temp = 0
for v in votes:
    if v >= threshold:
        temp += 1

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

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

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

total_votes = sum(votes)
threshold = total_votes / (4*M)
temp = 0
for v in votes:
    if v >= threshold:
        temp += 1

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

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

counter = 0
for i in range(n):
    if float(a_L[i]) >= s/(4*m):
        counter += 1
if counter >= 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)

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

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

b=sorted(a)

if b[n-m]>=sum/4/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)
A.sort(reverse=True)
for a in A[:M]:
    if a<x:
        print("No")
        exit()
print("Yes")

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

for i in range(len(a)):
    if a[i] < sum:
        n -= 1

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

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

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

for i in range(M):
    if A[i] >= total/(4*M) :
        pass
    else :
        flag = 1

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

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


submit()

Solution (Python):
from sys import stdin, stdout
rl = lambda: stdin.readline()
rll = lambda: stdin.readline().split()

def main():
	N, M = (int(x) for x in rll())
	A = [int(x) for x in rll()]
	tot = sum(A)
	cutoff = tot/(4*M)
	A.sort(reverse = True)
	count = 0
	for i, num in enumerate(A):
		if num >= cutoff:
			count += 1
		else:
			break
	if count >= M:
		stdout.write("Yes");stdout.write("\n")
	else:
		stdout.write("No");stdout.write("\n")
	stdout.close()

if __name__ == "__main__":
	main()

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

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

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

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

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

sumA = sum(A)

filteredA = list(filter(lambda x: x >= (sumA / (4*M)), A))

if M <= len(filteredA):
    print('Yes')
else:
    print("No")

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

request_votes = sum(A) / (4*M)
count = 0

for vote in A:
    if vote >= request_votes:
        count += 1

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

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

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

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

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

Solution (Python):
N,M=map(int,input().split())
A=list(map(int,input().split()))
a=sum(A)
A.sort()
if A[N-M]<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)
min_num = float(s)/(4*m)

res = "No"
count = 0
for x in a:
    if x >= min_num:
        count += 1
    if count >= m:
        res = "Yes"
        break
print(res)

Solution (Python):
def main():
    _, m = map(int, input().split())
    ary = sorted(list(map(int, input().split())), reverse=True)
    if ary[m-1]*4*m >= sum(ary):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

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

su = sum(a)
if m <= (len(list(filter(lambda x: (su / (4 * m)) <= x, a)))):
    print('Yes')
else:
    print('No')

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

for i in a:
  if i*4*M >= sum(a):
    count+=1

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

Solution (Python):
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
line = sum(A) / (4 * M)
count = 0
for i in A:
  if (i >= line):
    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)
b = 0
c = 0
d = ""
l = 1 / (4 * m)
for i in a:
    b += i
b = b * l
while c < m:
  if a[c] < b:
    d = "No"
  else:
    d = "Yes"
  c += 1
print(d)

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):
import unittest


class TestB(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think([5, 4, 2, 1], 1), 'Yes')

    def test_2(self):
        self.assertEqual(think([380, 19, 1], 2), 'No')

    def test_3(self):
        self.assertEqual(think([4, 56, 78, 901, 2, 345, 67, 890, 123, 45, 6, 789], 3), 'Yes')


def solve():
    a, m = read()
    result = think(a, m)
    write(result)


def read():
    n, m = read_int(2)
    return read_int(n), m


def read_int(n):
    return read_type(int, n, sep=' ')


def read_float(n):
    return read_type(float, n, sep=' ')


def read_type(t, n, sep):
    return list(map(lambda x: t(x), read_line().split(sep)))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a, m):
    total = sum(a)
    threshold = total // (4 * m) if total % (4 * m) == 0 else total // (4 * m) + 1
    return 'Yes' if len(list(filter(lambda x: x >= threshold, a))) >= m else 'No'


def write(result):
    print(result)


if __name__ == '__main__':
    
    solve()

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

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

ans = True
for i in range(M):
    if A[i]*4*M < S:
        ans = False
        break

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

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

for i in a:
  if i*4*M >= sum(a):
    count+=1

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

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


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

B = sorted(A)[::-1]

T=0
for i in range(N):
  T=T+B[i]
  





if B[M-1]>=T/4/M:
  print('Yes')
else:
  print('No')

Solution (Python):
def f(m, a):
    poll = sum(a)
    result = [i for i in a if i >= poll/4/m]
    print('Yes' if len(result) >= m else 'No')
 
n, m = map(int, input().split())
a = list(map(int, input().split()))
f(m, a)

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

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

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

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

    selected = []
    isSelected = False

    req = 1 / (4 * m)
    for item in item_votes:
        if item / total >= req:
            selected.append(item)

        if len(selected) == m:
            isSelected = True
            print("Yes")
            break

    if not isSelected:
        print("No")


popularVote()

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

sum_A = sum(As)

As.sort(reverse=True)

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

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

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

gokaku = 0

for i in A:
  if i >= threshold:
    gokaku +=1

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

Solution (Python):
import numpy as np

tmp = input().split(" ")
allItem, trendingItem = int(tmp[0]), int(tmp[1])

votes = input().split(" ")
votesInt = np.asarray([int(s) for s in votes])
votesTotal = np.sum(votesInt)

standard = votesTotal / (4 * trendingItem)

clearList = votesInt[votesInt >= standard]

result = 'Yes' if len(clearList) >= trendingItem else 'No'

print(result)

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

sum_line = sum(A) / (4 * M)
arranged = sorted(A, reverse=True)

if arranged[M-1] < sum_line:
  print('No')
else:
  print('Yes')

Solution (Python):
def f(m, a):
    poll = sum(a)
    result = [i for i in a if i >= poll/4/m]
    print('Yes' if len(result) >= m else 'No')

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

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

total = sum(a)

count = 0

valid = total / (4 * m)

for i in a:
    if i >= valid:
        count += 1

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

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

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

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

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

Solution (Python):



import sys
input = sys.stdin.readline

def main():
    N,M = map(int, input().split())
    A = list(map(int, input().split()))
    X = sum(A)/(4*M)
    c = sum([1 for i in A if i >= X])
    if c>=M:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Solution (Python):


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

Al_s = sorted(Al,reverse=True)
SUM=sum(Al)
trig=1/(4*M)*SUM
Bool=False

for i in range(M):
	if Al_s[i] >= trig:
		Bool=True
		continue
	else:
		Bool=False
		break

if Bool==True:
	print("Yes")
else:
	print("No")

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

num = 0
total = sum(A)
t = total / (4*M)
for p in A: num += 1 if p >= t else 0

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

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

tot = sum(A)
cnt = 0

A = sorted(A,reverse = True)


for i in range(N):
    if A[i]/tot >= 1/(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()))
A.sort(reverse = True)
threshold = sum(A)/(4*m)
if(A[m-1]>=threshold):
    print("Yes")
else:
    print("No")

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



total = sum(aList)

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

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

Solution (Python):
import numpy as np

N,M = map(int, input().split())
An = np.array(input().split(), dtype=int)

vote_sum = np.sum(An)
judge = np.where(An >= vote_sum /(4 * M), 1, 0)
judge_sum = np.sum(judge)

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

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

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

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

Solution (Python):
n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse = True)
temp = 1/(4*m)*(sum(a))
res = list(filter(lambda x:x<temp, a[:m]))
if len(res) == 0:
    print('Yes')
else:
    print('No')

Solution (Python):


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

    sortedA = sorted(A)[::-1]

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

if __name__ == '__main__':
    main()

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

Solution (Python):
def main():
    N, M = map(int, input().split())
    A = sorted([int(a) for a in input().split()], reverse=True)
    t = 1 / (4*M)
    vote_num = sum(A)

    for a in A:
        if t > (a/vote_num):
            print("No")
            return
        else:
            M -= 1
            if M == 0:
                print("Yes")
                return


if __name__ == "__main__":
    main()

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 print ("No")

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

Ns = sorted(A)


answer = Ns[len(Ns)-M]

sum = 0
for i in range(len(Ns)):
	sum = sum + Ns[i]


if sum / (4 * M) <= answer:
	print("Yes")
else:
	print("No")

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

A_popular = [i for i in A if i * 4 * M >= total]

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

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

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

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

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

A.sort()
A.reverse()

for i in range(M):
    if A[i] < sum(A) / (4 * M):
        print('No')
        exit(0)
    else:
        continue

print('Yes')

Solution (Python):
n,m=map(int,input().split())
a=sorted(list(map(int,input().split())),reverse=True)
flag=1
s=sum(a)
for i in a[0:m]:
  if i>=s/(4*m):
    pass
  else:
    print('No')
    flag=0
    break
if flag:
  print('Yes')

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

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

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

for i in range(len(A)):
    if A[i] >= through:
        cnt += 1

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

Solution (Python):


import sys
sys.setrecursionlimit(300000)

YES = "Yes"  
NO = "No"  

def solve(N: int, M: int, A: "List[int]"):
    A.sort()
    A.reverse()
    c = 0
    s = sum(A)
    for a in A:
        if a * 4 * M >= s:
            c += 1
    if c >= M:
        ret = YES
    else:
        ret = NO
    print(ret)
    return

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

if __name__ == '__main__':
    main()

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

def main():
	n, m = read()
	a = read()
	total_vote = sum(a)
	number_of_popular_items = 0
	for i in range(n):
		if a[i]*(4*m) >= total_vote:
			number_of_popular_items += 1
	if number_of_popular_items >= m: print("Yes")
	else: print("No")
main()

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

cnt = 0
for i in range(n):
	if a[-(i+1)] < b:
		break
	cnt += 1

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

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

Solution (Python):
n, m = map(int, input().split())
A = list(map(int, input().split()))
s = sum(A)
c = 0
val = s/(4*m)
for a in A :
  if a >= val:
    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)
cnt = 0
for i in a:
    if 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()))

line = sum(A) / (4 * M)
ans = [i for i in A if i >= line]
print("Yes") if len(ans) >= M else print("No")

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

for Ai in A:
    if Ai>=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()))
S = sum(A)
cnt = 0

for Ai in A:
    if Ai*4*M>=S:
        cnt += 1

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

Solution (Python):

def main():
    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 4*m*a[i] < s:
            c += 1
    ans = n - c
    print('Yes') if ans >= m else print('No')
main()

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


ans = "Yes"
sumA = sum(A)
for i in range(m):
    if A[i]*4*m < sumA:
        ans = "No"

print(ans)

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

B = sum(a)

if A[m-1] >= B/(4*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(len(a)):
    if a[i] >= sum(a)/(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()))
total = sum(a)

def counter(val):
  return True if val >= total / (4 * m) else False
  
def main():
  res = list(map(counter, a))
  print("YNeos"[sum(res)<m::2])

if __name__ == "__main__":
  main()

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

Solution (Python):

n,m=map(int,raw_input().split())
a=map(int,raw_input().split())
x=sum(a)/(4.0*m)
l=[i for i in a if i>=x]
if len(l)>=m:
 print 'Yes'
else:
 print 'No'

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

Solution (Python):

N, M = map(int, input().split())
A_list = list(map(int, input().split()))
A_total = sum(A_list)
A_popular = []
for i in range(N):
    if A_list[i] >= A_total/(4*M):
        A_popular.append(A_list[i])
if len(A_popular) >= M:
    print('Yes')
else:
    print('No')

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

Solution (Python):
m = input()
b = input()
x = int(0)
a = list()

n, m = m.split(' ')
n = int(n)
m = int(m)

b = b.split(' ')
for i in range(len(b)):
    a.append(int(b[i]))

list.sort(a, reverse = True)

for i in range(len(a)):
    x += int(a[i])

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

print('Yes')

Solution (Python):
n, m = map(int, input().split())
a = list(map(int, input().split()))
sumA = sum(a)
cnt = 0
for i in a:
    if not i < sumA / 4 / m:
        cnt += 1

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

Solution (Python):

def main():
    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] < (s+4*m-1)//(4*m):
            c += 1
    ans = n - c
    print('Yes') if ans >= m else print('No')
main()

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

s = sum(a)
a_select = [x for x in a if x >= s / (4 * m)]

print('Yes' if len(a_select) >= m else '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=list(map(int,input().split()))
c=0
for i in a:
    if i >= sum(a)/(4*m):
        c += 1

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

Solution (Python):
import sys


def input():
    return sys.stdin.readline().strip()


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

A = list(map(int, input().split()))
A.sort(reverse=True)
all = sum(A)

for i in range(M):
    if A[i] < all / (4 * M):
        print("No")
        sys.exit()

print("Yes")

Solution (Python):

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

S = sum(A)
count = 0
for i in A:
    if i >= S/(4*M):
        count += 1

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

Solution (Python):
def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    A_tot = sum(A)
    A = sorted([a / A_tot for a in A], reverse=True)

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


if __name__ == '__main__':
    main()

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

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

flag = "Yes"

if list_goods[M-1] < total/(4*M):
    flag = "No"

print(flag)

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

Solution (Python):

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

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

total_item_votes = sum(item_votes)

item_vote_percentages = [item_votes/total_item_votes for item_votes in item_votes]

required_vote_percentage = 1/(4*m)

can_select = 0
for vote_percentage in item_vote_percentages:
    if vote_percentage >= required_vote_percentage:
        can_select += 1

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

Solution (Python):
import math
N,M = map(int,input().split())
List = list(map(int,input().split()))
a = 0
b = 0
for i in range(0,N):
    a = a + List[i]
for j in range(0,N):
    if List[j] >= math.ceil(a/(4*M)):
        b = b+1
if b <  M:
    print('No')
else:
    print('Yes')

Solution (Python):
import sys
n,m = [int(_) for _ in input().split()]
alist = sorted([int(_) for _ in input().split()], reverse=True)

base = sum(alist)/(4*m)
for i in reversed(range(m)):
  if base > alist[i]:
    print("No")
    sys.exit()

print("Yes")

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

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

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

B = [j for j in A if j>=(sum(A)/(4*M))]

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

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

g = sum(A)/(4*N[1])
cnt = 0

for i in range(N[0]):
  if A[i] >= g:
    cnt += 1

if cnt >= N[1]:
  print('Yes')
  sys.exit()

print('No')

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

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


sum_vote = sum(A)



for i in range(len(A)):
    if A[i] >= sum_vote * 1/(4 * M):
        B.append(A[i])
    else:
        pass


if len(B) >= M:
    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 a :
  if 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()))

A_sum = sum(A) 
cnt = 0
for i, a in enumerate(A):
    if a*(4*M) >= A_sum:
        cnt += 1

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

Solution (Python):


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

cutoff = sum(A)/(4*M)
count_pop = sum(i >= cutoff for i in A)


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

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

tot = sum(a)

cnt = 0
for x in a:
    cnt += int(x * 4 * M >= tot)

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

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

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

Solution (Python):
N,M = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]
threshold = float(sum(A) / (4 * M))
cnt=0
for i in A:
  if 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()))

total=sum(A)
if total%(4*M)==0:
  n=total//(4*M)
else:
  n=total//(4*M)+1


cnt=0
for i in range(N):
  if A[i]>=n:
    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)
if A[M - 1] >= sum(A)/(4*M):
  print('Yes')
else:
  print('No')

Solution (Python):
nm=input().split()
vote=[int(i) for i in input().split()]
n=int(nm[0])
m=int(nm[1])
selectable=0
all=sum(vote)
for v in vote:
	if v < all/(4*m):
		continue
	else:
		selectable+=1
if selectable>=m:
	print("Yes")
else:
	print("No")

Solution (Python):
import sys,math
n,m=[int(x) for x in input().split()]
a = [int(x) for x in input().split()]
total = sum(a)
cnt = n
for i in range(0, n):
  if a[i] < math.ceil(total / (4 * m)):
    cnt -= 1
  if cnt < m:
    print("No")
    sys.exit()
print("Yes")

Solution (Python):
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

Solution (Python):
n, m = map(int, input().split())
A = 0
arr = [int(i) for i in input().split() ]
arr.sort(reverse = True)
A = sum(arr)
x = A/(4 * m)
count = 0
for i in arr:
	if i >= x:
		count +=1
	else:
		break

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