peterverebics/CodeNet_Python_118 huggingface dataset:
(n, m) = [int(s) for s in input().split()]
a = [int(s) for s in input().split()]

t = sum(a)

a = sorted(a)

chosen = a[-m:]

r = 1 / (4 * m) * t

c = ['Yes' if a >= r else 'No' for a in chosen]

c = set(c)

ans = 'Yes' if len(c) == 1 else 'No'

print(ans)
x = input().split()
y = input().split()



a = [int(i) for i in x]
b = [int(i) for i in y]

M = a[1]
s = sum(b)
c = 0
f = False

for i in b:
    if i >= ((1/(4*M)*s)):
        c += 1
    if c > 1:
        print("Yes")
        f = True
        break

if not f:
    print("No")
a = input().split(' ')
b = input().split(' ')
a = [int(a) for a in a]
b = [int(b) for b in b]

b.sort(reverse=True)
v = sum(b)

ans = 'Yes'

if b[a[1]-1] / v < 1 / 20:
    ans = 'No'
            
print(ans)
n,m=map(int,input().split())
c=0
v=list(map(int,input().split()))
s=sum(v)
v.sort(reverse=True)
val=s/(m*4)
if(v[m-1]>=val):
	print("YES")
else:
	print("NO")
N, M = map(int, input().split())
A = list(map(int, input().split()))

count = 0
allpoint = 0

for i in A:
    allpoint += i

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

if  M > 0 and count >= M:
    print('Yes')
else:
    print('No')
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')
N,M=(int(x) for x in input().split())

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

list.sort(A,reverse = True)

s=float(sum(A)/(4*M))
check=0
for i in range(0, M):
    if A[i]<=s:
        check=1

if check ==1:
    print('No')
else:
    print('Yes')
N, M = map(int, input().split())
A = sorted(map(int, input().split()), reverse=True)

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

# i1 = "4 1"
# i2 = "5 4 2 1"
list1 = [int(s) for s in i1.split()]
list2 = [int(s) for s in i2.split()]

n = list1[0]
m = list1[1]


total = sum(list2)

# 選べる
count = 0

for a in range(n):
    if (list2[a]/total >= 1/(4*m)):
        count += 1 

if count == m:
    print("Yes")
else:
    print("No")
a,b=map(int,input().split())
n=list(map(int,input().split()))
c=sum(n)/4*b
d=[i for i in n if i>=c]
if b<=len(d):
    print('Yes')
else:
    print('No')
import numpy as np
from sys import stdin


def get_result(data):
    N, M = data[0]
    A = np.array(data[1])
    total = sum(A)
    pop_goods = A[A > total/(4*M)]
    if len(pop_goods) >= M:
        return 'Yes'
    return 'No'


if __name__ == '__main__':
    raw_data = [val.rstrip() for val in stdin.readlines()]
    data = [list(map(int, val.split(' '))) for val in raw_data]
    result = get_result(data)
    print(result)
n,m = map(int,input().split())
A = list(map(int,input().split()))

A.sort(reverse=True)
b = sum(A) // (4*m)
if A[m-1] < b:
  print('No')
else:
  print('Yes')
import math
N,M = (int(y) for y in input().split())
A = list(map(int, input().split()))
X = math.ceil(sum(A)/(4*M))
B = [i for i in A if i >= X]
print(sum(A))
print(X)
print(B)
if len(B) >= M:
  print("Yes")
else:
  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
ans = "No"

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

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


print(ans)
def main():
    n, m = map(int, input().split())
    a = [int(x) for x in input().split()]

    threshold = sum(a) / (4 * m)
    if sum(1 for i in a if i >= threshold):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()
import sys
import os
from fractions import Fraction

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()
    print('Yes' if int(N * 0.25) >= M else 'No')


if __name__ == '__main__':
    main()
n,m=map(int,input().split())
a=[int(ss) for ss in input().split()]
a=sorted(a,reverse=True)
r="Yes"
for ii in range(m):
  if a[ii]<1/(4*m):
    r="No"
    break
print(r)
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) > th:
    cnt+= 1

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

for m in range(M):
    s = sum(A)
    if A[m] > s / (4 * M):
        a = True
    else:
        a = False

if a == True:
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
A = [int(i) for i in input().split()]

total = sum(A)

for i in range(len(A)):
    if (A[i] / total) < (1 / M):
        print('{}'.format('No'))
        exit()

print('{}'.format('Yes'))
n,m = map(int,input().split())
A = list(map(int,input().split()))
pop = sum(A) / (m*4)
i = 0
p = A[i]
k = 0
for p in A :
    if p >= pop :
        k += 1
    if p < pop :
        break  
if k >= m :
    print('Yes')
else :
    print('No')
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()
num = []
vote = []
num = list(map(int,input().split()))
vote = list(map(int,input().split()))
N = num[0]
M = num[1]
j = int(sum(vote)/(4*M))
#print(j)

cnt = 0
for i in vote:
    if  i>=j:
        cnt += 1
    
if M<=cnt:
    print("Yes")
else:
    print("No")
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)
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()))

x = max(a)
s = 0
for i in a:
    s += i
y = [l for l in a if l >=s]
if len(y) >=m:
    print('Yes')
else:
    print('No')
import math

n,m = map(int, input().split())
A = list(map(int, input().split()))
line = math.floor(sum(A) / (4 * m))
cnt = 0
for a in A:
    if a >= line:
        cnt += 1
    if cnt >= m:
        print('Yes')
        break
else:
    print('No')
n,m=list(map(int,input().split()))
a=list(map(int,input().split()))
a.sort(reverse=True)

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

b=[]
for i in range(n):
    if a[i]>(cnt*(1/(4*m))):
        b.append(a[i])

if len(b) >= m:
    print("Yes")
else:
    print("No")
N,M = map(int,input().split())

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

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

B=[i for i in A if i > border]

if len(B) >= M:
  print("Yes")
  exit()
print("No")
i1 = input()
i2 = input()

# i1 = "4 1"
# i2 = "5 4 2 1"
list1 = [int(s) for s in i1.split()]
list2 = [int(s) for s in i2.split()]

n = list1[0]
m = list1[1]


total = sum(list2)

# 選べる
count = 0

for a in range(m):
    if (list2[a]/total > 1/(4*m)):
        count += 1 

if count == m:
    print("Yes")
else:
    print("No")
n,m = map(int, input().split())
A = list(map(int,input().split()))

min_limit = 1 / (4*m)
select_ok = 0

for i in A:
  if i >= min_limit:
    select_ok += 1

if select_ok >= m:
  print("Yes")
else:
  print("No")
n,m = map(int, input().split())
a = list(map(int, input().split()))
counter = 0
a.sort(reverse=True)

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

print(counter)
if counter >= m:
  print("Yes")
else:
  print("No")
n = list(map(int,input().split()))
vote = list(map(int,input().split()))
a = 4*n[1]*sum(vote)
result = 0
for i in range(n[0]):
  if vote[i]<a:
    result += 1
if result<n[1]:
  print('No')
else:
  print('Yes')
n,m = map(int,input().split())
A = list(map(int,input().split()))
sum = 0
for i in A:
  sum += i
A.sort()
if A[n-1] > sum/(4*m):
  print("Yes")
else:
  print("No")
N,M = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]
threshold = sum(A) / (4 * M)
A = [i for i in A if i > threshold ]
if len(A) >= M:
  print('Yes')
else:
  print('No')
n,m=map(int,input().split())
l=list(map(int,input().split()))
suml=sum(l)
##print(suml)



temp=4*m
temp=suml/temp

flag=False

for i in range(n):
    if m==0:
        flag=True
        break
    else:
        if l[i]>temp:
##            print(l[i],temp)
            m-=1

if flag:
    print("Yes ")
else:
    print("No ")
N,M = map(int,input().split())
A = list(map(int,input().split()))

cut = int(sum(A)/(4*int(M)))

count = 0

for i in A:
    if i > cut:
        count +=1

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


if __name__ == '__main__':
    main()
n, m = map(int, input().split())
a = list(map(int, input().split()))
u = sum(a) / (4*m)
l = 0
for i in a:
    if i > u:
        l += 1
print("Yes") if l >= m else print("No")
N,M = map(int,input().split())
A = list(map(int,input().split()))
A.sort(reverse = True)
num = 0
for i in A:
    num += i
if A[M-1] >= num//4*M:
    print('Yes')
else:
    print('No')
N, M = map(int, input().split())
A = list(map(int, input().split())) 

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

print(N, M)
print(A)

for i in range(N):
  if A[i] >= vote / 4 / M:
    cnt += 1
  else:
    continue

if cnt >= M:
  print('Yes')
else:
  print('No')
N, M = map(int, input().split())
shina = list(map(int, input().split()))
shina.sort(reverse=True)
hantei = 0

for i in range(M):
  if shina[i] < 1 / (4 * M):
    hantei += 1

if hantei == 0:
  print('Yes')
else:
  print('No')
N,M = map(int, input().split())
A = [int(N) for N in input().split()]
X=0
F=int(sum(A)/(4*M))
for i in range(N):
    if A[i] >= F:
        X+=1
if X>=M:
    print('Yes')
else:
    print('No')
# Nこの商品の中からM個選ぶ
N, M = list(map(int, input().split()))
# 商品iの得票数はA_i
A = list(map(int, input().split()))

A = sorted(A, reverse=True)

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

for i in range(M):
    if a[i] >= sum(a)//(M*4)+1:
        b += 1

if b == M:
    print('Yes')
elif b < M:
    print('No')
line = input().rstrip().split(" ")
N = [str(i) for i in line]

vote = input().rstrip().split(' ')
V = [str(i) for i in vote]
flag = 0
C = N[0]
for i in range(int(C)):
  if int(V[i]) > (1/(4*int(N[1]))):
    flag = flag + 1
    
if flag >= int(N[1]) :
    print("Yes")
    
else:
    print('No')
N, M = map(int, input().split())
A_list = list(map(int, input().split()))

sum_list = sum(A_list)
n = sum_list*0.25*M

a = 0
for i in A_list:
    if i>=n:
        a+=1

if a>=M:
    print('Yes')
else:
    print('Yes')
mn = input().split()
ob = input().split()

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

votes = 0

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

ob.sort()

line = votes//(4*m)

ans = 0

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

if ans == 0:
    print("Yes")
else:
    print("No")
nm = input('')
n = int(nm.split(' ')[0])
m = int(nm.split(' ')[1])
alist = input('').split(' ')

t = 0
for i in range(n):
  t += int(alist[i])
s = 0
for i in range(n):
  a = int(alist[i])
  if a*4*m > t:
    s+=1

if s >= m:
  print('Yes')
else:
  print('No')
NM=list(map(int,input().split()))
N=NM[0]
M=NM[1]
N_list=list(map(int,input().split()))
 
total=sum(N_list)
 
total=total/4
 
counter=0
for number in N_list:
  if number>=total/4:
    counter+=1
    
if counter>=M:
  print('Yes')
else:
  print('No')
N, M = map(int, input().split())
A = list(map(int, input().split()))

A_sum = sum(A)
th = A_sum / (4 * M)
popular_product = 0

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

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

N=int(N)
M=int(M)
total=sum(A)
cnt=0
for i in range(N):
  if A[i]>total*(1/(4*M)):
  	cnt=cnt+1
    
if cnt>=M:
  print('Yes')
else:
  print('No')
a,b=map(int,input().split())
c=list(map(int,input().split()))
c=[i for i in c if i>a/(4*b)]
if len(c)<b:
  print("No")
else:
  print("Yes")
n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
print("YNeos"[sum([sum(a)/(4*m)>=a[i] for i in range(m)])==m::2])
#def main(S, b):
if __name__ == '__main__':
    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
    #print(cnt)
    if (cnt >= m):
        print("Yes")
    else:
        print("No")
data = input().split()

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

pro = [int(s) for s in input().split()]

vote = 0
for i in pro:
  vote += i

if pro[m - 1] < 1 / (4 * vote):
  print("No")
else:
  print("Yes")
N, M = map(int, input().split())
A=list(map(int,input().split()))
count=0
count2=0
flag=False
for i in range(N):
    count+=A[i]
for i in range(N):
    if A[i]>count*1/(4*M) and flag==False:
        count2+=1
    if count2>=M:
        flag=True
        break
if flag:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
aa = list(map(int, input().split()))

t = sum(aa) // (4 * m)
c = 0
for a in aa:
    if a >= t:
        c += 1
if c >= m:
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
a_list =  list(map(int, input().split()))

for voted in a_list:
    if voted >=1/4*M:
        print("Yes")
        break
else:
    print("No")
import sys
input = lambda: sys.stdin.readline().rstrip()
yes = lambda boolean: print('Yes') if boolean else print('No')
input_ints = lambda: list(map(int, input().split()))

N, M = input_ints()
A = input_ints()
A.sort(reverse=1)
yes(A[M-1]*4*M>1)
N, M =map(int, input().split())
lst = list(map(int, input().split()))

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

if count>=M:
  print("Yes")
else:
  print("No")
n,m= map(int, input().split())
a=list(map(int,input().split()))

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

print("Yes" if c>=m else "No")
import math
n,m=map(int,input().split())
a=list(map(int,input().split()))
t=sum(a)
a=list(filter(lambda x: math.ceil(t/(4*m)) < x, a))
print('Yes' if m <= len(a) else 'No')
# your code goes here
N,M = map(int,input().split())
A = list(map(int,input().split()))
T = 0
C = 0
Y = "Yes"
E = "No"
for i in range(N):
    T += A[i]
for i in range(N):
    if C >= M:
        print(Y)
        break
    if (A[i]*4*M) > T:
        C += 1
if C < M:
    print(E)
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())))
border = sum(A) * (1 // 4 * M)
count = 0
for i in A:
    if i > border:
        count += 1
    else:
        break
if count >= M:
    print("Yes")
else:
    print("No")
#AtCoder
N, M = map(int, input().split())
A = list(map(int, input().split()))

sm = sum(A)
ms = sm // (4*M)
pop = []
for i in range(N):
    if ms < A[i]:
        pop.append(A[i])
    else:
        pass

if len(pop) > M:
    print('Yes')
else:
    print('No')
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) + 1

clearList = votesInt[votesInt >= standard]

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

print(result)
N, M = map(int, input().split())
A =  [int(p) for p in input().split()]

sumA = sum(A)
count = 0

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

if(count > M-1):
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
arrayA = input().split()
convertedArray = [int(ele) for ele in arrayA]
count = 0
total = sum(convertedArray)
con = (1 / (4 * M)) * total
for A in convertedArray:
    if A >= int(con):
        count += 1
if count >= M:
    print('Yes')
else:
    print('No')
N,M = map(int,input().split())
n = list(map(int,input().split()))
goukei = sum(n)
ans = 0
for i in n:
    if i >= 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()))
SUM=sum(a)
ninnki=SUM/(4*M)
count=0

for i in (a):
    if i>ninnki:
        count+=1
        
if count>=M:
    print("Yes")
else:
    print("No")
n, m = (int(x) for x in input().split())
num_point = [int(x) for x in input().split()]
count = 0

print(sum(num_point))
for n in num_point:
    n > (sum(num_point)/(4*m))
    count += 1

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

a.sort(reverse=True)
sm = sum(a)
if len(list(filter(lambda v: v >= sm // (4 * m), a[:m]))) == m:
    print("Yes")
else:
    print("No")
N,M = map(int, input().split())
A = sorted(list (map(int, input() .split() ) ) )

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

else :
	print( 'No' )
# -*- coding: utf-8 -*-
#標準入力の取得
N,M = map(int,input().split())
A = list(map(int,input().split()))

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


if count_pop<M :
    print("No")
else:
    print("Yes")
n, m = map(int, input().split())
a = list(map(int, input().split()))
b = sum(a)
c = 0
d = ""
l = 1 / (4 * m)
b = b * l
while c < m:
  if a[c] < b:
    d = "No"
  else:
    d = "Yes"
  c += 1
print(d)
n, m = map(int, input().split())
a = list(map(int, input().split()))
sou = 0
for i in a:
    sou += i
line = sou//(4*m)
count = 0
for i in a:
    if i > line:
        count+=1
if count>= m:
    print("Yes")
else:
    print("No")
n, m= map(int, (input().split()))
a = list(map(int, input().split()))
count = 0
total = 0
for i in a:
  total += i
for j in a:
  if j / total > 1 / (4 * m):
    count += 1
if count > m:
  print("Yes")
else:
  print("No")
n, m = input().split()
b = input().split()
sum = 0
for x in b:
    sum += int(x)
yy=0
for y in b:
    if int(y) > sum/(4*int(m)):
        yy+=1
if yy <= int(m):
    print("No")
else:
    print("Yes")
N,M = map(int,input().split())
A = list(map(int,input().split()))

def vote(a,m):
  a.sort(reverse=True)
  for i in range(m):
    if a[i-1] >= sum(a)/(4*m):
      return True
    else:
      return False
    
ans = "Yes" if vote(A,M) else "No"
print(ans)
n,m=map(int,input().split())
a=list(map(int,input().split()))
ans=0
al=0
for i in range(n):
    al+=a[i]
p=al/(4*m)
for i in range(n):
    if p<a[i]:
        ans+=1
print("Yes" if m<=ans else "No")
n, m = map(int, input().split())
a_list = list(int(x) for x in input().split())
b = []

for i in a_list:
    if i > sum(a_list)/(4*m):
        b.append(i)

if len(b) >= m:
    print("Yes")
else:
    print("No")
N,M=map(int,input().split())
A=[int(i) for i in input().split()]

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



def check(A,M):
    flag = 0 
    condition = sum(A)//(4*M)
    if(M==1 and max(A)>condition):
        return "Yes"
    for i in A:
        if(i > condition):
            flag+=1
        if(flag==M):
            return "Yes"
    return "No"

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

idx = bisect.bisect_left(al,total/(4*m))

if n - idx > m:
    print('Yes')
else:
    print('No')
input_d21 = list(map(int, input().split()))
input_d22 = list(map(int, input().split()))

N = input_d21[0]
M = input_d21[1]

A = input_d22

sohyo = sum(A)
zyoken = sohyo // (4 * M)


A = sorted(A, reverse=True)


if A[M-1] >= zyoken:
    print('Yes')
else:
    print('No')
li = list(map(int, input().split()))
A = list(map(int, input().split()))

# N種類の商品
N = li[0]

# 選ぶ個数M
M = li[1]

# 総得票数
sumA = sum(A)

# 基準総得票数の1/4M
check = sumA / (4*M)

# 基準より上の要素を入れる箱
box = []

for i in A:
    if i > check:
        box.append(i)

if len(box) >= M:
    print("Yes")
else:
    print("No")
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
sumA = sum(a)

sumBy4 = sumA/(4*m)

count = 0

for i in range(n):
    if(a[i] < sumBy4):
        continue

    else:
        count += 1

if(count == m):
    print("Yes")

else:
    print("No")
N, M = map(int,input().split())
An = list(map(int,input().split()))

S = sum(An)
A = [a for a in An if a * 4 * M >= S]

if len(A)>=M:
    print('Yes')
else:
    print('NO')
N,M=map(int,input().split())
l=list(map(int,input().split()))
limit=sum(l)/(M*3)
num=0
for i in l:
  if i >= limit:
    num+=0
if num >=M:
  print("Yes")
else:
  print("No")
n, m = map(int, input().split())
a = list(map(int, input().split()))
total = sum(a)
minimum = 1.0/ (4 * m)
total_percent = list(map(lambda x:x/(sum(a)), a))
choicable = list(map(lambda x:True if x>minimum else False,total_percent))
print('Yes' if sum(choicable) >= m else 'No')
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) == n:
            isSelected = True
            print("Yes")
            break

    if not isSelected:
        print("No")


popularVote()
list = input().split()
A = input().split()

for i in range(len(A)):
  A[i] = int(A[i])
  
N = int(list[0])
M = int(list[1])

tmp = []
for i in A:
  if i >= sum(A) / (4 * M):
    tmp.append(i)
if len(tmp) >= M:
  print("Yse")
else:
  print("No")
l = input()
m = input()
z = l.split(' ')
M = int(z[1])
N = int(z[0])
F = m.split(' ')
X = []
 
for item in F:
  votes = int(item)
  X.append(votes)
print("Yes")
N,M=map(int,input().split())
A=[input().split() for i in range(1)]

all=0
for i in range(N):
    all+=int(A[0][i])
FLAG=int(1/(4*M)*all)
flag=0

for i in range(N):
    if FLAG>int(A[0][i]):
        flag+=1
if flag==0:
    print('Yes')
else:
    print('No')
n,m=map(int,input().split())
a=list(map(int,input().split()))
a_sort=[]
a_sort=sorted(a,reverse=True)
sum=0
for i in a:
  sum+=i
b_sort=a_sort[0:m-1]
for j in b_sort:
 if j<sum/(4*m):
    print("No")
    exit()
print("Yes")
am,n = list(map(int,input().split()))
arr = list(map(int,input().split()))
got = 0
for i in range(am):
    if arr[i]>=1/(4*am):
        got+=1
if got >=n:
    print("YES")
else:
    print("NO")