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

t = 0
for i in range(n):
  t += a[i]
  
b = t/(4*m)

c = 0
for j in range(n):
  if a[j] >= b:
    c += 1

if c >= m :
  print('Yes')
else:
  print('No')
N,M=map(int,input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
s=sum(A)

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)
print('Yes' if a[m-1] >= sum(a)/4/m else 'No')
n , m = map(int,input().split())
a = list(map(int,input().split()))
can_choice_item_list =[]
for item in a:
  if item < sum(a) / (4 * m):
    pass
  else:
    can_choice_item_list.append(item)
if m <= len(can_choice_item_list):
  print('Yes')
else:
  print('No')
n, m = map(int,input().split())

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

#総投票数
s = sum(a)

a.sort(reverse=True)

b = 0

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

if M ==count:
    print("Yes")
else:
    print("No")
a,b=map(int,input().split())
n=list(map(int,input().split()))
n.sort()
n.reverse()
if sum(n)/(4*b)>n[b-1]:
  print("No")
else:
  print("Yes")
x,y= list(map(int, input().split()))
i = list(map(int, input().split()))
i.sort(reverse=True)
k=sum(i)
flag=0
for j in range(x):
    if i[j]*4*y>=k:
        flag+=1
if flag<y:
    print("No")
else:
    print("Yes")
n, m = map(int, input().split())
A = list(map(int, input().split()))
sum_v = sum(A)
cnt = 0
for i in range(n):
    if A[i] < sum_v / (4*m):
        continue
    else:
        cnt += 1

if cnt >= m:
    print('Yes')
else:
    print('No')
N_s,M_s=input().split()
M=int(M_s)
N=int(N_s)
A=list(map(int,input().split()))


th=sum(A)/(4*M)
#print('th='+ str(th))

A_th=[A_t for A_t in A if A_t>=th]

if len(A_th)>=M:
    print("Yes")
else:
    print("No")
(n,m)=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
a0 = sum(a)/(4*m)
m-=1
if a[m] >= a0:
  print("Yes")
else:
  print("No")
# python3
# -*- coding: utf-8 -*-
import sys
import math
#from math import gcd
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)


# main
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')
if __name__ == '__main__':
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    total = sum(A)
    threshold = total / (4*M)
    count = sum([a>=threshold for a in A])
    if count >= 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))

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

    if i >= border:
        cnt += 1

if cnt >= m:
    print('Yes')
else:
    print('No')
n,m = map(int,input().split(' '))
aa = list(map(int, input().split(' ')))
A = sorted(aa, reverse=True)
Am = A[:m]
for a in Am:
    if a>=(0.25/m)*sum(aa): continue
    else:
         print('No')
         exit(0)
print('Yes')
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
b=sum(a)
c=a[m-1]
if c<(b/(4*m)):
    print("No")
else:
    print("Yes")
n, m = map(int, input().split())
arr = list(map(int, input().split()))
all = sum(arr)
count = 0
for i in range(n):
    if arr[i] >= all / (4 * m):
        count += 1
if count >= m:
    print('Yes')
else:
    print('No')
import math
n,m=map(int,input().split())

l=list(map(int,input().split()))
s=sum(l)
ans=0
t=s/(4*m)
for i in l:
    if i>=math.ceil(t):
        ans+=1
if ans>=m:
    print("Yes")
else:
    print("No")
N, M = list(map(lambda x: int(x), input().split(" ")))
A = list(map(lambda y: int(y), input().split(" ")))
A.sort(reverse=True)
 
print("Yes") if 0.25 * sum(A) / M <= A[M - 1] else print("No")
# Problem B
N, M = map(int, input().split())
A_list = list(map(int, input().split()))

# initialization
a_sum = sum(A_list)
a_limit = a_sum / (4*M)
a_count = 0
is_ok = False

# search
for a in A_list:
    if a>=a_limit:
        a_count += 1

# output
if a_count>=M:
    print("Yes")
else:
    print("No")
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
from bisect import bisect_left 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n,m = inpl()
a = inpl()
a.sort(reverse = True)
su = sum(a)
res = 0
for i in range(m):
    if a[i]*4*m < su:
        print('No')
        break
else:
    print('Yes')
N,M = list(map(int,input().split()))
A=list(map(int, input().split())) 
total=sum(A)
cnt=0
for a in A:
  if a*4*M>=total:
  	cnt=cnt+1

print("Yes" if cnt>=M else "No")
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
S = sum(A)
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 = sorted(a, reverse=True)
all_vote = sum(a)

for i in range(m):
    if a[i] < all_vote * 0.25 / m:
        print("No")
        exit()
print("Yes")
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>=sum(A))
N, M = map(int, input().split())
A = list(map(int, input().split()))
 
s = sum(A)
A = sorted(A, reverse=True)
ans = 'Yes'
for i in range(M):
  if A[i]*(4*M) < s: 
    ans = 'No'
    break

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

ans = 0
for i in range(N):
    if (4*M*A[i] >= sum_A):
        ans+=1
    else:
    	ans+=0
    	
if (ans >= M):
    print('Yes')
else:
    print('No')
n ,m = list(map(int,input().split(" ")))
a = list(map(int,input().split(" ")))
s = 0
for i in range(n):
    s += a[i]
cnt = 0
for i in range(n):
    if a[i] >= (s + 4 * m - 1) // (4 * m) :
        cnt+=1
if cnt >= m :
    print("Yes")
else :
    print("No")
n, m = map(int, input().split())
a = input().split()
a = [int(i) for i in a]
s = sum(a)
dif = (1 / (4*m)) * s
cont = 0
for i in a:
     cont += (1 if i >= dif else 0)
print ('Yes' if cont >= m else 'No')
n,m = map(int,input().split(" "))
ar = list(map(int,input().split(" ")))
ar = sorted(ar,reverse=True)
M = sum(ar) * (1 / (4 * m ))
if ar[m-1] >= M:
    print("Yes")
else:
    print("No")
#!/usr/bin/env python

t = input().split()
n = int(t[0])
m = int(t[1])

a = sorted(map(int, input().split()))

s = sum(a)

if a[n-m] < s/(4*m):
    print("No")
else:
    print("Yes")
n,m = map(int,input().split())
a = list(map(int,input().split()))

count = 0
sum_vote = sum(a)

for i in a:
    if i >= sum_vote/(4*m):
        count += 1

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

import math

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

s = sum(A)
print('Yes' if A[-M] >= math.ceil(s/(4*M)) else 'No')
n, m = map(int,input().split())
l = list(map(int,input().split()))
total = sum(l)

y = 0
for i in range(n):
    x = total /(4*m)
    if total //(4*m) == total /(4*m):
        if l[i] >= total //(4*m):
            y += 1
    else:
        if l[i] > total //(4*m):
            y += 1

if y >= m:
    print('Yes')
else:
    print('No')
n,m = map(int,input().split())
a = list(map(int, input().split()))
x = sum(a) / (4 * m)
c = 0
for i in range(n):
  if a[i] >= x:
    c += 1
  if c >= m:
    print('Yes')
    break
if c < m:
  print('No')
if __name__ == "__main__":
  N,M = (int(x) for x in input().split())
  vote = [int(x) for x in input().split()]
  vote.sort(reverse=True)
  point = sum(vote)/(4*M)
  flag=1
  for i in vote[:M]:
    if i < point:
      print('No')
      flag=0
      break
  if flag == 1:
    print('Yes')
N,M=map(int,input().split())
A=list(map(int,input().split()))
k=1/(4*M)
t=0
S=0
for i in range(N):
  S=S+A[i]
for i in range(N):
  if A[i]>=S*k:
    t=t+1
  else:
    continue
if t>=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')
N, M = map(int, input().split())
A = [int(i) for i in 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 = map(int,input().split())
B = list(A)
C = sorted(B,reverse=True)
S = sum(B)
#print(S)
#print(C)
if C[M-1]>= S/(4*M) :
    print("Yes")
else :
    print("No")
n,m=map(int,input().split())
List=list(map(int,input().split()))
cnt=0
for i in List:
    if (i/sum(List))>=1/(4*m):
        cnt+=1
if cnt>=m:
    print("Yes")
else:
    print("No")
import math
n,m= map(int,input().split(' '))
arr= list(map(int,input().split(' ')))

votes= sum(arr)
lim=math.ceil(votes/(4*m))
m_arr= [i for i in arr if i>= lim]
if len(m_arr)>=m:
    print('Yes')
else:
    print('No')
N,M=map(int,input().split())
A=list(map(int,input().split()))
d=0

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

if A[m - 1] >= total / (4*m):
    print('Yes')
else:
    print('No')
from sys import stdin, stdout

def solve(a,M):
    total = sum(a)
    a.sort(reverse = True)
    #print(total)
    if a[M - 1]*4*M >= total: return 'Yes'
    return 'No'



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

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

sum=0
count=0

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

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

if count>=m:
    print("Yes")
else :
    print("No")
[n,m] = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
cri = sum(a)/(4 * m)
a.sort(reverse = True)
if a[m-1] >= cri:
    print("Yes")
else:
    print("No")
import sys
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n,m = na()
a = na()
s = sum(a)
b = 0

for i in a:
    if i >= s/(4*m):
        b+=1

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

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

for a in A:
    if a >= t:
        c += 1
    else:
        continue

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

if select == 1:
    print('Yes')
else:
    print('No')
n,m=map(int, input().split())
a=list(map(int, input().split()))

sa = sorted(a, reverse=True)
sum = sum(a)
flg = 0
for index in range(m):
    if sa[index] < sum / (4 * m):
        print("No")
        flg = 1
        break
if flg == 0:
    print("Yes")
N, M = map(int, input().split())
A = list(map(int, input().split()))
cr = sum(A) / (4*M)
Arev = sorted(A, reverse = True)

if Arev[M-1] >= cr:
    print('Yes')
else:
    print('No')
line = input().split(" ")
syurui = int(line[0])
itemCnt = int(line[1])

line2 = input().split(" ")
line2 = list(map(int,line2))
line2.sort(reverse=True)
okFlg = True;

for i in range(itemCnt):
  if line2[i] < 1 / (4 * itemCnt) * sum(line2):
    okFlg = False;
  
if okFlg:
  print("Yes")
else:
  print("No")
N,M =  map(int,input().split())
L=  [int(x) for x in input().split()]
L.sort(reverse=True)
for x in range(M):
    if float(L[x]) < sum(L) / (4*M):
        print("No")
        exit()
print("Yes")
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
kijun = sum(A)/(4*M)
cnt = 0

for x in A:
    if x >= kijun:
        cnt+=1

if cnt >= M:
    print('Yes')
else:
    print('No')
n, m = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
all = sum(a)

bi = all/(4*m)
ans = 0
for i in a:
  if i >= bi:
    ans += 1

if ans >= m:
  print('Yes')
else:
  print('No')
#!/usr/bin/env python3

def main():
    N,M = map(int, input().split())
    votes = [int(s) for s in input().split()]
    votes_sum = sum(votes)
    border_line = votes_sum / (4*M)

    result = 'Yes'
    votes.sort(reverse=True)
    for i in range(M):
        if votes[i] < border_line:
            result = 'No'
            break

    print(result)


if __name__ == "__main__":
    main()
n, m = map(int, input().split())
A = list(map(int, input().split()))
vote = 0

for i in range(1, n+1):
    if A[i-1] >= sum(A)/(4*m):
        vote += 1
if vote >= m:
    print("Yes")
else:
    print("No")
url = "https://atcoder.jp/contests/abc161/tasks/abc161_b"


def main():
    n, m = list(map(int, input().split()))
    n_li = list(map(int, input().split()))
    n_li = sorted(n_li, reverse=True)
    all_num = sum(n_li)
    for i in range(1, m + 1):
        if all_num // (4 * m) > n_li[i - 1]:
            print('No')
            exit()
    print('Yes')


if __name__ == '__main__':
    main()
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] >= 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()))
a.sort(reverse=True)
a0 = sum(a)/(4*m)
m-=1
if a[m] > a0:
  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(M):
  total+=A[i]
if A[M-1]>total/(4*M):
  print("Yes")
else:
  print("No")
N,M = list(map(int, input().split()))
A = list(map(int, input().split()))

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

if ans >= M:
    print('Yes')
else:
    print('No')
n, m = map(int, input().split())
a = list(map(int, input().split()))
mini = n / (4 * m)
a.sort(reverse = True)
if a[m-1] < mini:
	print('No')
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")
n,m=map(int,input().split())
a=list(map(int,input().split()))
x=sum(a)//4*m
c=0

for i in range(n):
    if a[i]>=x:
        c+=1
if c<m:
    print('No')
else:
    print('Yes')
N,M=map(int,input().split())
A=list(map(int,input().split()))
Total=sum(A)

n=0
def jugde_A(n):
    i=0
    for i in range(len(A)):
        if A[i]<(Total/4*M):
            n+=1
    return n
if jugde_A(n)>=M:
    print("Yes")
else:
    print("No")
n,m = list(map(int, input().split()))
A = list(map(int,input().split()))
A = sorted(A,reverse=True)


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

print(ans)
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 = sorted(list(map(int, input().split())))
ans = sum(x >= (sum(A) // (4 * M)) for x in A)
print('Yes' if ans >= M > 0 else 'No')
def actual(n, m, a_list):
    threshold = sum(a_list) / (4 * m)

    count_can_be_popular = 0

    for vote in a_list:
        if vote >= threshold:
            count_can_be_popular += 1

    if count_can_be_popular >= m:
        return 'Yes'

    return 'No'

n, m = map(int, input().split())
a_list = map(int, input().split())
  
print(actual(n, m, a_list))
N,M = map(int,input().split())
A = list(map(int,input().split()))

sumOfA = sum(A)

condition = sumOfA//(4*M)


flag = 0
for i in A:
    if(i >= condition):
        flag += 1 
    else:
        continue

    if(flag==M):
        print("Yes")
        break

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

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

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

if cnt < M:
    print("No")
else:
    print("Yes")
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])
N, M = map(int, input().split())
A = list(set((map(int, input().split()))))
print(A)
vote = []
for Ai in A:
    if Ai > (1 / (4 * M) * sum(A)):
        vote.append(Ai)
if len(vote) >= M:
    print("Yes")
else:
    print("No")
NM = input().split()
A = input().split()
N = int(NM[0])
M = int(NM[1])
for j in range (N):
    A[j] =int(A[j])
for i in range(M):
    if int(A[i])<sum(A)/4*M:
        print("No")
        exit()
print("Yes")
import math
N,M = map(int,input().split())
l = [int(i) for i in input().split()]
l.sort(reverse = True)
l_sum = sum(l)
d = (1/(4*M))*l_sum
d = int(d)
cnt = 0
 
for i in range(N):
    if l[i] > d:
        cnt += 1
    else:
        break
 
if cnt >= M:
    print("Yes")
else:
    print("No")
import sys
a = list(map(int,input().split()))
b = list(map(int,input().split()))

N = a[0]
M = a[1]

count = 0
b_sum = sum(b)

for i in range(0,N-1):
    if b[i] >= (b_sum/(4*M)):
        count+=1

if count >= M:
    print('Yes')
else:
    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))
#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()))
total = sum(A)
cutoff = total/N

over=[]
for i in A:
    if i>=cutoff:
        over.append(i)

if len(over)>=M:
    print('Yes')
else:
    print('No')
n,m = map(int, input().split())
arr = list(map(int, input().split()))

total = sum(arr)

ans =0
for i in arr:
    if (4*m*i)>=total:
        ans+=1

if ans>m:
    print("Yes")
else:
    print("No")
N, M=input().split()
A=list(map(int,input().strip().split()))
ls=[]
for Ai in A:
    if int(Ai)>(1/(4*int(M)))*sum(A):
        ls.append(Ai)
if len(ls)>int(M):
    print('Yes')
else:
    print('No')
n,m = map(int,input().split())
arr = list(map(int,input().split()))
arr.sort()
M = round(sum(arr)/(2*m))
cnt = 0
for i in range(n):
  if arr[i] >= M:
    cnt+=1
    
if cnt == m or cnt > m:
  print('Yes')
else:
  print('No')
N, M = map(int, input().split())
A = list(map(int, input().split()))
t = 0
S = 0
for Ai in A:
    S=S+Ai

for Ai in A:
    if Ai >= S/(4*M):
        t = t+1

if t >= M:
    print('yes')
else:
    print('no')
N,M=map(int,input().split())
A=list(map(int,input().split()))
L=sum(A)/(4*M)
j=0
A1=sorted(A,reverse=True)
for i in range(M):
    if A1[i]>L:
        j+=0
    else:
        j+=1
if j==0:
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
lists = list(map(int, input().split()))
lists.sort()

sums = sum(lists)/4/m
lens = len(lists)
for i in range(m):
    if lists[lens-1-i] < sums:
        print("No")
        break

print("Yes")
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)
count = 0

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

for i in range(M):
  if A[i] > sou:
    count += 1

if count >= M:
  print('Yes')
else:
  print('No')
b, c = map(int, input().split())
a = list(map(int, input().split()))
d = sum(a)
new_a = list(reversed(sorted(a)))
e = 0
f = 0
g = 4*c
while new_a[e] >= d/g:
    e = e+1
    if e == b:
        break
    f = f+1
if f >= c:
    print("Yes")
else:
    print("No")
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")
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')
n,m=map(int,input().split())
l=list(map(int,input().split()))
s=sum(l)//(4*m)
c=0
for i in range(n):
    if(l[i]>=s):
        c=c+1
if(c>=m):
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
A = [int(i) for i in input().split()]
total = sum(A)

ans = sum([1 for a in A if a>=total/(4*M)])
print('Yes' if total >=M else 'No')
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n, m = nm()

aa = nl()

mx = sum(aa)/(4*m)

a = sorted(aa)[::-1]


for i in range(m):
  if a[i] <= mx:
    print('No')
    exit()
print('Yes')
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 = list(map(int,input().split()))
A = list(map(int,input().split()))

A.sort(reverse=True)

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

ans='No'
if A[M-1] >= th:
    ans='Yes'
    
print(ans)
N, M = map(int, input().split())
A = list(map(int, input().split()))

A.sort(reverse=True)
x = sum(A)
min_ = x / (4*M)
flag = 0

for i, a in enumerate(A):
  if i == M:
    flag = 1
    break
  if a < min_:
    break
if flag == 1:
  print("Yes")
else:
  print("No")