peterverebics/CodeNet_Python_118 huggingface dataset:
#coding:utf-8

n, m = map(int, input().split())
a = list(map(int, input().split()))
vote = sum(a)
rank = sorted(a, reverse=True)
border = vote // (4*m)
#print(border, rank)
count = 0

for i in range(0, n):
    if rank[i] > border:
        count += 1

if count >= m:
    print('Yes')
else:
    print('No')
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')
hoge = input().split()
N = int(hoge[0])
M = int(hoge[1])
A_list = list(map(int,input().split()))

sugoi = 4 * M
_sum = sum(A_list)
ok = 0
for i in range(len(A_list)):
  if A_list[i] >  _sum / sugoi:
    ok += 1
    
if ok >= M:
  print("Yes")
else:
  print("No")
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
sumA = sum(a)

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

count = 0

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

if(count >= m):
    print("YES")

else:
    print("NO")
def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))
def iput(): return int(input())

def solve():
    n, m = mput()
    a = lput()
    line = n / (4 * m)
    bit = 0
    for i in a:
        if i >= line:
            bit += 1
    if bit >= m:
        print("Yes")
    else:
        print("No")
    return 0

if __name__ == "__main__":
    solve()
N,M=list(map(int, input().split()))
A=list(map(int, input().split()))
S=sum(A)
C=S/(4.0*M)
cnt=sum(map(lambda x:x>=C,A))
print(cnt)
N, M = map(int, input().split())
A = [int(i) for i in input().split()]

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

print("Yes" if num >= M else "No")
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")
n,m=map(int,input().split())
a=list(map(int,input().split()))
c=0
s=sum(a)
for i in range(n):
    if a[i] > s*(1/(4*m)):
        c+=1
if c >= m:
    print('Yes')
else:
    print('No')
i1 = input()
i1 = i1.split()
types = int(i1[0])
select = int(i1[1])

i2 = input()
i2 = [int(n) for n in i2.split()]
i2.sort(reverse=True)

summary = sum(i2)
threshold = summary / int(types * 4)

if i2[select-1] >= threshold :
    print("Yes")
else:
    print("No")
n, m = map(int,input().split())
a = list(map(int,input().strip().split()))[:n]
a.sort(reverse=True)
count=0
Sum=sum(a)
if(a[m-1]>=Sum/(m*4)):
    print("YES")
else:
    print("No")
N,M=list(map(int,input().split()))
lst=list(map(int,input().split()))
lst.sort()
if lst[1-M]*4*M>=sum(lst):
  print('Yes')
else:
  print('No')
N, M = map(int, input().split())
A = map(int, input().split())

a = sorted(A, reverse=True)

b = a[M-1]
c = sum(a)
d = 4*M
e = c//d

if b>e:
  print('Yes')
else:
  print('No')
import numpy as np
n, m = map(int, input().split())
A = np.array([int(i) for i in input().split()], dtype=int)
A -= sum(A) // (4 * m)
print('Yes' if np.sum(A > 0) >= m else 'No')
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

if __name__ == "__main__":
    N, M = map(int, input().split())
    A = sorted(LI(), reverse=True)
    sum = sum(A)
    if A[M-1] < sum//(4*M):
        print("No")
    else:
        print("Yes")
n, m = map(int, input().split())
points = [i for i in map(int, input().split())]

sumValue = sum(points)

candidates = [i for i in points if i > (sumValue/4)]

if len(candidates) >= m:
  print("Yes")
else:
  print("No")
s = [input() for i in range(2)]
n = int(s[0].split()[0])
m = int(s[0].split()[1])
a = list(map(int, s[1].split()))

sumVote = sum(a)
border = 1 / 4 * m
select = 0
for item in a:
    if border <= item:
        select += 1
    if select == m:
        print("Yes")
        exit()
print("No")
import math
import sys

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

a = input().split()
l_si_i = [int(b) for b in a]
#print(l_si_i)

#print(max(l_si_i))
#print(sum(l_si_i))

#border = math.floor(sum(l_si_i) / (4 * m))
border = sum(l_si_i) / (4 * m)
#print(border)

check = 0
for i in range(n):
  c = l_si_i[i]
  if c > border:
    check += 1
    
  if check >= m:
    print("Yes")
    sys.exit()
    
print("No")
n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reverse=True)
suma = sum(a)
if a[n - 1] * (4 * m) >= suma:
    print('Yes')
else:
    print('No')
N,M = (int(x) for x in input().split())
A_list = [int(x) for x in input().split()]
A_sum = sum(A_list)
Bool_list = []
for A in A_list:
    if A >= A_sum/(N*M):
        Bool_list.append("True")
        
if (len(Bool_list)) >= M:
  print("Yes")
else:
  print("No")
n, m = [int(x) for x in input().split()]
sousuu = 0
kakutoku = 0
x = [0]*n

x = [int(y) for y in input().split()]

for i in range(n):
    sousuu += int(x[i])

for i in range(n):
    if int(x[i]) > int(sousuu/(4*m)):
        kakutoku += 1

if kakutoku >= m:
    print("Yes")
else:
    print("No")
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')
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")
import numpy as np
import math as mt
N,M=map(int, input().split())
A=list(map(int,input().split()))
boader=1/(4*M)
A.sort(reverse=True)
for i in range(0,M):
    if A[i]<(sum(A)*(1/(4*M))):
        print("No")
        break
    elif i==M-1:
        print("Yes")
print(A)
from collections import defaultdict, deque
import sys
import heapq
import bisect
import math
import itertools
import string
import queue
import copy
import time
# import numpy as np
from fractions import gcd

sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7


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


def inp_list(): return list(map(int, sys.stdin.readline().split()))


def lcm(x, y): return (x * y) // gcd(x, y)


N, M = inp_list()
A = inp_list()
A.sort(reverse=True)
total = sum(A)

bd = total // (4 * M) + 1
if A[M - 1] < bd:
    print('No')
else:
    print('Yes')
n,m = map(int,input().split())
a = [int(x) for x in input().split()]
ans = 'Yes'
list.sort(a, reverse=True)
for i in range(m):
  if a[i]/sum(a) <= 1/(4*m):
    ans = 'No'
print(ans)
N, M = map(int, input().split())
A = map(int, input().split())
x = 0
for i in A:
    if i < sum(A) / (4 * M) < i:
        x += 1
a = N - x
if a >= M:
    print("Yes")
else:
    print("No")
n , m = map(int , input().split())
a = input().split()
print(a)
ans = 0
for i in a:
    if int(i) >= sum(map(int , a)) * 1/(4*m):
        ans += 1
if ans >= m:
    print("Yes")
else:
    print("No")
n, m = input().split()

list = input().split()

m = int(m)
list = [int(i) for i in list]
list.sort(reverse=True)

M = m
i = 0
while 1:
    if m == 0:
        break
    
    if list[i] >= sum(list)/(4*M):
        ans = "Yes"
    else:
        print("n")
        ans = "No"
        
    m-=1
    i+=1

print(ans)
a,a1 = input().split()
b = input().split()
sum = 0
for _ in b:
    sum += int(_)
if int(b[int(a1) - 1]) > sum/4:
    print(True)
else:
    print(False)
n,m=map(int,input().split())
a=list(map(int,input().split()))
ans=0
for i in a:
    if i>=sum(a)//(4*m):
        ans+=1
if ans>=m:
    print('Yes')
else:
    print('No')
if __name__ == '__main__':
    n, m = map(int, input().split())
    a = [int(i) for i in input().split()]
    s = sum(a)
    a = sorted(a)[::-1]
    if a[m-1] >= (s / (4 * m)):
        print("yes")
    else:
        print("no")
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse = True)
if A[M - 1] >=1/4*M:
    print('Yes')
else:
    print('No')
N,M=map(int,input().split())
A=list(map(int,input().split()))
ans='No'
sum=0
b=1/(4*M)
c=0
for i in range(N):
  c+=A[i]
d=c*b
for i in range(N):
  if d<A[i]:
    sum=sum+1
  if sum==M:
    ans='Yes'
print(ans)
N, M = map(int, input().split())
*a, = map(int, input().split())
ttl = sum(a) // (4*M)
cnt = 0
for i in range(N):
    if a[i] < ttl:
        continue
    else:
        cnt += 1
        if cnt >= M:
            print('Yes')
            exit()
print('No')
n,m = map(int,input().split())
x = list(map(int,input().split()))
x.sort(reverse = True)
sumx = sum(x)
limit = int(sumx/4/m)
if x[m-1]>=limit:
    print("Yes")
else:
    print("No")
array = []

for i in range(2):
    val = input()
    array.append(val.split())

kinds = int(array[0][0])
populars = int(array[0][1])
votes_sum = 0

for vote in array[1]:
    votes_sum = votes_sum + int(vote)

winning = votes_sum / (4 * populars)
numbers = 0

for vote in array[1]:
    if int(vote) > winning:
        numbers = numbers + 1

if numbers >= populars:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())

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

votes = sum(arr)

c = n

for i in arr:
    if i < votes / (4 * m):
        c -= 1

if c >= m:
    print ('YES')
else:
    print ('NO')
import bisect
n,m = [int(i) for i in input().split()]
al = sorted([int(i) for i in input().split()])
total = sum(al)

l = al[n-m:]

if l[0] > total/(4*m):
    print('Yes')
else:
    print('No')
N, M = map(int, input().split())
c = 0
A = [int(i) for i in input().split()]

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

if c >= M:
    print('Yes')
else:
    print('No')
import sys 
N, M = map(int, input().split())
A = list(map(int, input().split()))  
A = sorted(A,reverse=True)
for i in range(M):
    if A[i] < sum(A)*1//(4*M):
       # print(A[i])
        print('No')
        sys.exit()
print('Yes')
from collections import defaultdict, deque
import sys
import heapq
import bisect
import itertools
import queue
import copy
import time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7

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

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpl_str(): return list(sys.stdin.readline().split())

n, m = inpl()
a = inpl()
s = sum(a)
for i in a:
        if i < s//(4*m):
            print('No')
            exit()
print('Yes')
import sys
N,M = map(int, input().split())
A = list(map(int, input().split()))
sorted_A = sorted(A, reverse=True) 
all_A = sum(A)

rule = (1/(4*M))

ans = 0

for i in sorted_A:
    if (i/all_A) > rule:
        ans = ans + 1
    if ans >= M:
        print("Yes")
        sys.exit()

print("No")
n,m = map(int,input().split())
lis = input().split()
lis = [int(i) for i in lis]
s = sum(lis)
ans = 0


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


if ans >= m:
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
A = list(map(int, input().split()))
total = sum(A)
cnt = 0
for i in range(0, N):
    if A[i] < (total//(4*M)):
        continue
    cnt += 1
if cnt >= M:
    print('Yes')
else:
    print('No')
n_m = input()
sp_n_m = n_m.split()
ai = input()
sp_ai = ai.split()
sum = 0

for num in sp_ai:
  sum += int(num)

th = sum / (4 * int(sp_n_m[1]))

cnt = 0
for num2 in sp_ai:
  if int(num2) > int(th):
    cnt+= 1

if cnt >= int(sp_n_m[1]):
  print('Yes')
else:
  print('No')
n,m = map(int,input().split())
li = list(map(int,input().split()))
sum_vote = sum(li)
kijun = sum_vote // (4 * m)
sum_above = len([i for i in li if i >= kijun])
if sum_above >= m:
    print("Yes")
else:
    print("No")
l = input()
m = input()
z = l.split(' ')
M = int(z[1])
N = int(z[0])
C = (N/(4*M))
F = m.split(' ')
print("Yes")
X = []
for item in F:
  votes = int(item)
  X.append(votes)

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

A.sort(reverse=True)

T = (sum(A)//(4*M))
n = 0
for i in range(N):
    if A[i] < T:
        continue
    n += 1

if n >= M:
    print('Yes')
else:
    print('No')
n,m=map(int,raw_input().split())
a=sorted(map(int,raw_input().split()))
if m>n:
    print 'No'
    quit()
s=sum(a)//(4*m)
print 'No' if a[n-m]<s else 'Yes'
N,M = map(int,input().split())
*A, = map(int,input().split())

total = sum(A)
border = total/(4*M)
X=[1 for i in range(N) if A[i]>border]

ans = 'Yes' if len(X)>=M else 'No'

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

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

total = sum(A)

bodor = total / (4 * M)
cnt = 0

for i in A:
    if i > bodor:
        cnt += 1

if cnt >= M:
    print("Yes")
else:
    print("No")
n,m=map(int,input().split())
a=list(map(int,input().split()))
ave=sum(a)/len(a)/4
cnt=0
for i in range(n):
    if a[i]>=ave:
        cnt+=1
if cnt<m:
    print('No')
else:
    print('Yes')
N,M=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
b=sum(A)/4*M
A.reverse()
ans="Yes"
for i in range(M):
    if A[i]<b:
        ans="No"
print(ans)
n, m = map(int, input().split())
a_list = list(map(int, input().split()))

border = sum(a_list) * (1/(4*m))

cnt = 0
for i in a_list:
    if cnt == m:
        print('Yes')
        exit()

    if i >= border:
        cnt += 1

print('No')
N,M=map(int,input().split())
A=list(map(int,input().split()))
pop = int(1/(4*M)*sum(A))
lis = []
for i in A:
    if i>pop:
        lis.append(i)
if len(lis)>=M:
    print("Yes")
else:
    print("No")
import numpy as np

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

i = list(map(int, input().split()))
a=[]
for x in np.arange(n):
    a.append(i[x])
a.sort()
if a[m-1] > 1/4*m:
    print("Yes")
else:
    print("No")
n, m = (int(x) for x in input().split())
a_list = list(map(int, input().split()))

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

# print('border')
# print(border)

count = 0

for i in range(len(a_list)):

    # print('a_list')
    # print(a_list[i])

    if border < a_list[i] :
        count = count + 1

if m <= count :
    print('Yes')
else:
    print('No')
N, M = map(int, input().split())
A = list(map(int, input().split()))
sorted_A = sorted(A, reverse=True)
all_vote = sum(A)
guard = all_vote // (M * 4)
selected = []

for i in range(M):
    if sorted_A[i] >= guard:
        selected.append(sorted_A[i])

if M <= len(selected):
    print("Yes")
else:
    print("No")
import numpy as np

# 入力
N,M = map(int,input().split())
A = np.array([int(x) for x in input().split()])
S = sum(A)/(4*M)

if np.count_nonzero(A>S) >= M:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
a_list = list(map(int, input().split()))

border = sum(a_list) * (1/(4*m))
print(sum(a_list))
print(1/(4*m))
print(border)

cnt = 0
for i in a_list:
    if cnt == m:
        print('Yes')
        exit()

    if i >= border:
        cnt += 1

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

total = sum(A)
cnt = 0

for a in A:
    if a > total/(4*M):
        cnt += 1
if cnt >=M:
    print("Yes")
else:print("No")
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
a.reverse()
_sum = sum(a)
ans = "Yes" if a[m - 1] > _sum / (4 * m) else "No"
print(ans)
n,m=map(int,input().split())
a=list(map(int,input().split()))
sort=sorted(a,reverse=True)
print(sort)
b=sum(a)
print(b)
count=0
for i in sort:
  count+=1
  if i<b/4*m:
    break
print(count-1)
 
if count-1<=m:
  print('Yes')
else:
  print('No')
N, M = map(int, input().split())
A = list(map(int, input().split()))

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

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

ans = 'Yes' if cnt >= M else 'No'
print(ans)
from sys import stdin

N, M = [int(x) for x in stdin.readline().rstrip().split()]
A = [int(x) for x in input().split()]

# print(N, M, A)
A.sort()
b = sum(A)*(1/(4*M))
# print(b)
if A[N-1-M-1] >= b:
    print("Yes")
else:
    print("No")
# print(A)
N,M=map(int, input().split())
A = list(map(int, input().split()))
count =0
m = 1//(4*M)
for i in range(N):
  if A[i] >= m:
    count += 1
if count >= M:
  print("Yes")
else:
  print("No")
M, N = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
print("Yes" if A[N-1] * 4 * M >= sum(A) else "No")
n,m = input().split(" ")
n=int(n)
m=int(m)
arr = list(map(int,input().split(" ")))

x = sum(arr)

frac = x//(m*4)

ans=0

for i in range(len(arr)):
    if(arr[i]>frac):
        ans+=1
    
if(ans>=m):
    print("Yes")
else:
    print("No")
n , m = map(int, input().split())
arr = list(map(int, input().split()))
check = 1/(4*m)
count = 0
for i in arr:
	if i < check:
		continue
	else:
		count+=1
if count >= m:
	print("Yes")
else:
	print("No")
num = []
vote = []
num = list(map(int,input().split()))
vote = list(map(int,input().split()))
N = num[0]
M = num[1]
j = 0
j /= 4*M
cnt = 0
for i in range(0,len(vote)-1):
    if  vote[i]>=j:
        cnt += 1
    else:
        pass
if M<=cnt:
    print("Yes")
else:
    print("No")
import bisect
N,M=map(int,input().split())
A=sorted(list(map(int,input().split())))

if bisect.bisect(A,sum(A)/4/M)>N-M:
  print('No')
else:print('Yes')
a,b = map(int,input().split())
aaa = list(map(int,input().split()))

aaa.sort(reverse=True)
result = [0]*b
for i in range(b):
    h = aaa[i]
    j = sum(aaa) / (4*b)

    if h > j:
        result[i] = 1
    else:
        result[i] = 0

if result.count(1) >= b:
    ans = "Yes"
else:
    ans = "No"

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

a_sum = sum(A)
ans = 0
for i in range(n):
    if float(A[i]) < a_sum/(4*m):
        ans += 1


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

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

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

for i in range(M):
    if p > A[i]:
        print("No")
        sys.exit()
    
print("Yes")
n,m=map(int,input().split())
a=list(map(int,input().split()))
t=sum(a)
x=0
for i in range(n):
    if a[i]>=(t//(4*m)):
        x+=1 
if x>=m:
    print("Yes")
else:
    print("No")
n, m = map(int, '12 3'.split())
a = list(map(int, '4 56 78 901 2 345 67 890 123 45 6 789'.split()))
# n, m = map(int, (input()).split())
# a = list(map(int, input().split()))

a = sorted(a, reverse=True)
thresh = sum(a)/(4*m)

count = 0
for i in a:
  if i >= thresh:
    count+=1
  else: 
    break
if count > m:
  print('Yes')  
else:
  print('No')
i = input().split()

n = int(i[0])
m = int(i[1])
a = [int(i2) for i2 in i[2::]]
m2 = sum(a) // (4 * m)
c = sum([1 if i >= m2 else 0 for i in a])

print("Yes" if c >= m else "No")
from sys import stdin
N,M=list(map(int,(stdin.readline().strip().split())))
A=list(map(int,(stdin.readline().strip().split())))
hyou=int(sum(A)/(4*M))
count=0
for i in range(N):
    if A[i]>=hyou:count+=1
if count==M:print("yes")
else:print("no")
N,M = map(int,input().split(" "))
MER = map(int,input().split(" "))
mer_sum = sum(MER)
 
threshold = mer_sum / (4 * M)
mer_over = [1 if i >= threshold else 0 for i in MER]
mer_threshold = sum(mer_over)
 
if N <= mer_threshold:
  print("Yes")
else:
  print("No")
n, m = map(int,input().split())
a = list(map(int,input().split()))
a.sort(reverse = True)
s = sum(a)
for i, l in enumerate(a):
    if l < s//(4*m):
        break
if i >= m-1:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
A = list(map(int, input().split()))

l = int(sum(A)/(4*m))

cnt = 0
for a in A:
    if a >= l:
        cnt += 1
        
print("Yes" if cnt >= m else "No")
nm=input().split()
vote=[int(i) for i in input().split()]
n=int(nm[0])
m=int(nm[1])
selectable=0
for v in vote:
	if v < 4*m:
		continue
	else:
		selectable+=1
if selectable>=m:
	print("Yes")
else:
	print("No")
n,m=map(int,input().split())

l=list(map(int,input().split()))
s=sum(l)
ans=0
t=s*1/(4*m)
for i in l:
    if i>t:
        ans+=1
if ans>=m:
    print("Yes")
else:
    print("No")
N,M=map(int,input().split())
A=list(map(int,input().split()))
new_A= sorted(A,reverse=True)
if(new_A[M-1]>=1/(4*sum(A))):
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
A = list(map(int, input().split()))
all = sum(A)
border = int(all / (4 * M))

count = 0
for i in A:
  if i >= border:
    count += 1

print('Yes' if count >= M else 'No')
N, M = map(int, input().split())
a_list =  list(map(int, input().split()))
a_list.sort(reverse = True)
a_total = sum(a_list)
count = 0
for voted in a_list:
    if count >= M:
        print("Yes")
        break
    if voted > (1/(4*M))*a_total:
        count +=1
else:
    print("No")
n, m = map(int, input().split())
ar = list(map(int, input().split()))

add = sum(ar)
big = [0]*m

for num in ar:
    for i, number in enumerate(big):
        if num > number:
            big[i] = num
            break

check = add / (4 * m)
yes = True

for val in big:
    if val < check:
        print("No")
        yes = False

if yes:
    print("Yes")
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
total = sum(A)
result = []
for i in A:
    if i > (total * (1/(4*M))):
        result.append(i)
if len(result) < M:
    print("No")
else:
    print("Yes")
def popularVote():
    m, n = list(map(int, input().split()))
    item_votes = list(map(int, input().split()))
    total = sum(item_votes)

    selected = []

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

        if len(selected) == n:
            print("yes")
            return

    print("no")
    
popularVote()
N, M = map(int, input().split())
list_goods = [int(x) for x in input().split()]

list_goods.sort(reverse=True)

flag = "Yes"

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

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

num = 0

for i in list:
    if i >= sum(list)/(4*M):
        num+=1

print(num)

if num >= M:
    print('Yes')
else:
    print('No')
n, m = map(int, input().split())
a = list(map(int, input().split()))
b = 0
c = 0
d = "Yes"
l = 1 / (4 * m)
for i in a:
  b += i
b = b * l
while c < m:
  if a[c] < b:
    d = "No"
  c += 1
print(d)
items,select = input().split()
x = [int(items) for x in input().split()]
for u in x:
    if u > (1 / (4 * int(select))*sum(x)):
        print("No")
        break
    else:
        print("Yes")
        break
a,b=map(int,input().split())
l=list(map(int,input().split()))
t=sum(l)//(4*b)
ans = [True for i in range(b-1,len(l)-3) if sum(l[i:i+3])]
print('Yes' if ans and all(ans) else 'No')
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")
def listint():
  a = input().split()
  for i in range(len(a)):
    a[i] = int(a[i])
  return a
num,mem = listint()
votes = listint()
sumvo = 0
for i in range(num):
  sumvo = sumvo + votes[i]
able = 0
mini = int(sumvo/(4*mem))
for i in range(num):
  if mini <= votes[i]:
    able = able+1
if able >= mem:
  print('Yes')
else:
  print('No')
n,m = map(int,input().split())
a=map(int,input().split())
a=sorted(a)
if a[-m] > sum(a)/4/m:
    print("Yes")
else:
    print("No")
import math
n,m = list(map(int,input().split()))
a = list(map(int,input().split()))
t = sum(a)
c = 0
f = 0
for i in range(n):
	if a[i] >= math.ceil(t/(4*m)):
		c += 1
	if c==m:
		f = 1
		print("YES")
		break
if f==0:
	print("NO")
N,M = map(int, input().split())
A = list(map(int, input().split()))
vote = sum(A)
#print(vote)
count = 0
line = 4*M
line2 = vote/line
#print(line2)
ans = "No"

for i in A:
    if (i >= line2):
        count += 1

#print(count)
if (count > M):
    ans = "Yes"


print(ans)
n, m = map(int, input().split())
List = list(map(int, input().split()))
 
if m <= (len([i for i in List if i > sum(List)/(4*m) ])):
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())))
ans = sum(x >= sum(A) // 4 // M for x in A)
print(ans)
if ans >= M:
    print('Yes')
else:
    print('No')
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
sum_ = 0
for i in a:
    sum_ +=i
if(a[m-1]>=(sum_/4*m)):
    print('Yes')
else: print('No')