peterverebics/CodeNet_Python_118 huggingface dataset:
n=int(input())
s=0
for i in range(1,n+1):
    if i%3!=0 or i%3!=0:
        s+=i
print(s)
N = int(input())
count = 0
for i in range(N):
    if i %3 != 0:
        if i%5 != 0:
            count +=i
print(count)
N = int(input())
list1 = []
for i in range(N):
  if i%3 ==0 or i%5 ==0:
    list1.append(i)
total1 =0
total2 = 0
for i in list1:
  total1 += i
for i in range(N):
  total2 += i
print(total2 -total1)
n=int(input())
sum_n=0
for i in range(n):
    if i%3==0:
        pass
    elif i%5==0:
        pass
    else:
        sum_n+=i
print(sum_n)
N = int(input())

result = 0

for i in range(1,N + 1):
    if i % 3 == 0 or i % 5 == 0:
      continue
    result += i
    
    print(result)
def fizz_buzz(n):
    total = 0
    for i in range(1,n):
        if i % 15 == 0:
            continue
        elif i % 3 == 0:
            continue
        elif i % 5 == 0:
            continue
        else:
            total += i
    return total


if __name__ == "__main__":
    n = int(input())
    print(fizz_buzz(n))
n = int(input())

fb = 0
for i in range(n):
    if(i%5 != 0 and i%3 != 0):
        fb = fb + i

print(fb)
n = int(input())
ans = 0
for i in range(1,n+1):
  if n%3 and n%5:
    ans += i
print(ans)
N = int(input())

b = 0

for i in range(1,N):
    if i%3 != 0:
        if i%5 != 0:
            b += i

print(b)
N = int(input())

n = 0
for i in range(1, N):
	if i % 3 != 0 and i % 5 != 0:
		n += i
print(n)
n = int(input())
s = []
for i in range(n):
  if not i%3==0:
    if not i%5==0:
      if not i%15==0:
     	 s.append(i)
print(sum(s))
N = int(input())
sum = 0
for i in range(N):
  
  if ( i % 3 == 0 ) :
      pass
  elif (i % 5 == 0) :
      pass
  else:
      sum += i

print(sum)
N = int(input())
a = [i+1 for i in range(N)]

S = 0
for x in range(1, N):
    if x % 15 == 0:
        a[x] = "FizzBazz"
    elif x % 3 == 0:
        a[x] = "Fizz"
    elif x % 5 == 0:
        a[x] = "Bazz"
    else:
        a[x] = x
        S += x
print(S)
n = int(input())

ans = 0
for i in range(n):
  if i % 3 != 0 and i % 5 != 0:
    ans += i
print(ans)
n = int(input())
sum = 0
for i in range(1,n):
  if i%3==0:
    continue
  elif i%5==0:
    continue
  sum += i
print(sum)
def main():
  N = int(input())

  counter = 0

  for i in range(N):
    if i%3 == 0 and i%5 == 0:
      pass
    elif i%3 == 0 :
      pass
    elif i%5 == 0:
      pass
    else:
      counter += i
    
  print(counter)


if __name__ == "__main__":
  main()
from math import gcd
K = int(input())
total = 0
for a in range(1, K + 1):
	for b in range(1, K + 1):
		for c in range(1, K + 1):
			total += gcd(a, gcd(b, c))

print(total)
#


def main():
    n, m = map(int, input().split(" "))
    a = [int(s) for s in input().split(" ")]
    total = sum(a)
    lim = total / (4 * m)
    a = sorted(a, reverse=True)
    count = 0
    for i in a:
        if i >= lim:
            count += 1
        else:
            break
    if count >= m:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
n, m = map(int, input().split())
list_a = list(map(int, input().split()))

list_sort = sorted(list_a, reverse = True)

if list_sort[m-1] >= sum(list_sort)/(4*m):
  print('Yes')
else:
  print('No')
a = list(map(int,input().split()))
b = list(map(int,input().split()))

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

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

if count < m:
    print("No")
else:
    print("Yes")
n,m = map(int,input().split())
s = list(map(int,input().split()))
a = []
for i in s:
  if i >= sum(s)/(4*m):
    a.append(i)
    
if len(a) >= m:
  print("Yes")
else:
  print("No")
n, m = map(int, input().split())
a = list(map(int, input().split()))
num = sum(a)
cnt = 0
for i in range(n):
    if a[i] < num/(4*m):
        continue
    else:
        cnt += 1
if cnt >= m:
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
a = [int(k) for k in input().split()]
cnt = 0
for i in range(n):
    if 4*m*a[i] >= sum(a):
        cnt += 1
print("Yes" if cnt >= m else "No")
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    N, M = map(int, input().split())
    A = sorted(map(int, input().split()))[::-1]

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

if __name__ == '__main__':
    main()
n,m=map(int,input().split())
l=list(map(int,input().split()))
s=sum(l)
a=[]
for i in l:
    if i>=(s/(4*m)):

        a.append(1)
print('Yes' if len(a) >=m else 'No')
N, M = map(int, input().split())
vote = list(map(int, input().split()))

lis = sorted(vote, reverse=True)

if lis[M-1] < 1/(4*M) * sum(lis):
    print('No')
else:
    print('Yes')
N, M = map(int, input().split())
A = list(map(int, input().split()))
s = sum(A)

ans = len([a for a in A if a * 4 * M >= s])

print("Yes" if ans >= M else "No")
N,M = list(map(int,input().split()))
A = list(map(int,input().split()))
B = []
a = sum(A)
for i in A:
    if i >= a/(4*M):
        B.append(i)
if len(B) >= M:
    print('Yes')
else:
    print('No')
n, m = map(int, input().split())

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

totalvote = sum(votes)
threshold = totalvote * (1 / (4*m))


votes.sort(reverse=True)


if votes[m-1] < threshold:
    print('No')
else:
    print('Yes')
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)

n = M - 1
K = sum(A)

if A[n] < K / (4 *M):
  print('No')
else:
  print('Yes')
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))

cnt = 0
s = 0

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

for i in range(N):
    if 4*M*A[i] < s:
        cnt += 1

print(['No', 'Yes'][N - cnt >= M])
def resolve():
    N, M = map(int, input().split())
    arr = sorted(list(map(int, input().split())), reverse=True)
    s = sum(arr)
    th = s / 4 / M
    ans = 'Yes'
    for i in range(M):
        if arr[i] < th:
            ans = 'No'
            break
    print(ans)

resolve()
def resolve():
    N, M = list(map(int, input().split()))
    A = sorted(list(map(int, input().split())), reverse=True)
    total = sum(A)
    choose = 0
    th = total/(4*M)
    for a in A:
        if a < th:
            continue
        choose += 1
    print("Yes" if choose >= M else "No")



if '__main__' == __name__:
    resolve()
n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reverse=True)

if a[m-1] * 4 * m >= sum(a):
    print('Yes')
else:
    print('No')
# -*- coding: utf-8 -*-
"""
Created on Sat Apr  4 21:05:12 2020

@author: Kanaru Sato
"""

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

for i in range(len(a)):
    sum += a[i]
    
a.sort(reverse=True)

if a[m-1] < sum/(4*m):
    print("No")
else:
    print("Yes")
import numpy as np

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

if (np.count_nonzero(a >= np.sum(a)/(4*m)) >= m):
  print('Yes')
else:
  print('No')
n, m = map(int, input().split())
a = [int(_) for _ in input().split()]
aa = [0] * n

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

lim = sum(a)
ans = 0
for i in range(n):
    if aa[i] >= lim:
        ans += 1
    else:
        pass
if m <= ans:
    print('Yes')
else:
    print('No')
N, M = map(int, input().split())
A = list(map(int, input().split()))
total = sum(A)
least = total * (1 / (4 * M))

count = 0
for a in A:
    if a >= least:
        count += 1

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

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

if m <= count:
  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')
n=input().split()
m=input().split()

N=n[0]
Nn=n[1]
l = 0
a = 0

for k in range(int(N)):
    a+=int(m[k])

for i in range(int(N)):
    if int(m[i])/(a/(int(Nn)*4)) >= 1:
        l+=1

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

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

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

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

A_sort = sorted(A, reverse=True)
ALL = sum(A_sort)
cnt = 0
for c in A_sort:
    if c < ALL / (4 * M):
        break

    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)

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

if M <= len(filteredA):
    print('Yes')
else:
    print("No")
N, M = map(int, input().split())

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

A_sum = 0
for i in A:
    A_sum += i

A.sort(reverse = True)

YN = True
for i in range(M):
    if A[i] < A_sum / (4 * M):
        YN = False
        break

if YN == True:
    print("Yes")
else:
    print("No")
n, m = list(map(int, input().split()))
goods = list(map(int, input().split()))
flag = 1
limit = float(sum(goods)) / (4 * m)
for i in range(n - 1):
  for j in range(n - i - 1):
    if goods[j] <= goods[j+1]:
      tmp = goods[j]
      goods[j] = goods[j+1]
      goods[j+1] = tmp
for i in range(1, m):
  if goods[i] < limit:
    flag = 0
    break
if flag:
  print('Yes')
else:
  print('No')
N,M = map(int,input().split())
listA = list(map(int,input().split()))
A = sorted(listA,reverse=True)
T = sum(A)
b = True
for i in range(M):
    if A[i] < T/(4*M):
        b = False
if b == True:
    print('Yes')
else:
    print('No')
n, m = map(int,input().split())
a = list(map(int,input().split()))

t = sum(a)
a.sort(reverse=True)
for i in range(m):
    if a[i] < t * 1/(4*m):
        print("No")
        exit()

print("Yes")
# -*- coding: utf-8 -*-
"""
Created on Sat Apr  4 20:49:19 2020

@author: naoki
"""

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

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

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

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

s = sum(a) * (1 / (4 * m))

cnt = 0
for i in a:
    if i >= s:
        cnt += 1
if cnt >= m:
    print("Yes")
else:
    print("No")
#input
N, M = map(int,input().split())
A = list(map(int,input().split()))

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

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

if cnt >= M:
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
A = list(map(int, input().split()))
 
mmin = sum(A) / (4*M)
A.sort(reverse=True)
 
if A[M-1] < mmin:
  print('No')
else:
  print('Yes')
# -*- coding: utf-8 -*-
n, m = map(int, input().split())
i = list(map(int, input().split()))

sumsum = sum(i) 
border = sumsum/4/m

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

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

if len(b) >= m:
  print("Yes")
else:
  print("No")
inputs = input().split(' ')
inputs2 = input().split(' ')
inp1=[int(a) for a in inputs]
inp2=[int(a) for a in inputs2]

# inp1 = [12,3]
# inp2 = [4,56,78,901,2,345,67,890,123,45,6,789]


sums = sum(inp2)
rest = 1/(4*inp1[1])

inp2.sort()
inp2.reverse()

result = []

for i in range(inp1[1]):

	if inp2[i] > sums*rest or inp2[i] == sums*rest:
		result.append(int(inp2[i]))



if len(result)>inp1[1] - 1:
	print("Yes")
else:
	print("No")
n, m = map(int, input().split())
A = list(map(int, input().split()))
sa = sum(A)
print('Yes' if len([a for a in A if a>=sa/(4*m)])>=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('No')
else:
    print('Yes')
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")
import sys
import numpy as np


scan = sys.stdin.readline


def main():
    n, m = map(int, scan().rstrip().split())
    a = np.array([int(_) for _ in scan().rstrip().split()])

    votes = np.sum(a)
    candidate_num = np.sum(a >= (votes / (4 * m)))
    
    if candidate_num >= m:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
def resolve():
    N, M = map(int,input().split())
    S = tuple(map(int, input().split()))
    g = sum(S) * (1/(4*M))

    count = 0
    ans = 'No'
    for s in S:
        if s >= g:
            count += 1

        if count == M:
            ans = 'Yes'
            break

    print(ans)

if __name__ == '__main__':
    resolve()
def resolve():
    n, m = map(int, input().split())
    a = list(map(int, input().split()))
    a = sorted(a, reverse=True)
    all = sum(a)
    c = a[m-1]
    if c >= all / (4*m):
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    resolve()
def main():
    N, M = [int(_) for _ in input().split()]
    slist = list(map(int, input().split()))
    sort_list = sorted(slist)
    thr = sum(sort_list) / (4 * M)
    
    cnt = 0
    for i in sort_list:
        if i >= thr:
            cnt += 1

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

main()
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
bound = (1 / (4*M))*sum(A)

for i in range(M):
    if A[i] < bound:
        print("No")
        break
else:
    print("Yes")
N,M = map(int,input().split())
A = list(map(int,input().split()))
su = sum(A)

a = 0
for i in range(N):
    if A[i] >= su/4/M :
        a += 1

print(["No","Yes"][a>=M])
n,m =  map(int,input().split())
a = list(map(int,input().split()))
cnt = 0
for i in a:
    if i >= sum(a)/(4*m):
        cnt += 1
if cnt >= m:
    print("Yes")
else:
    print("No")
N,M = map(int,input().split())
A = list(map(int,input().split()))

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

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

su=sum(A)
i=0
while max(A)*4*M>=su:
    i+=1
    A.remove(max(A))
    if i>=M:
        print("Yes")
        break
else:
    print("No")
import math
import sys

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

vote = []
vote = list(map(int, input().split()))
sum_n = sum(vote)

i = 0
while i < M:
    max_n = max(vote)
    if max_n < math.ceil(sum_n / (4 * M)):
        print("No")
        sys.exit()
    vote.pop(vote.index(max_n))
    i += 1

print("Yes")
import math

n,m = map(int,input().split())
li = list(map(int,input().split()))
wa = 0
for i in li :
    wa+=i

for i in li :
    if i < math.ceil((wa/float(4*m))) :
        n -= 1

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

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

else :
	print( 'No' )
from math import ceil
n, m = map(int, input().split())
a = list(map(int, input().split()))
c = ceil(sum(a) / (4 * m))
d = 0
for e in a:
    if e >= c:
        d += 1
        if d == m:
            print('Yes')
            exit(0)
print('No')
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
total_vote = 0
result = True
for a in A:
    total_vote += a
for m in range(M):
    if A[m] < (total_vote/(4*M)):
        result = False
if result:
    print("Yes")
else:
    print("No")
N, M = map(int, input().split())
A = list(map(int, input().split()))

A = sorted(A, reverse=True)

X = A[M-1]
Y = sum(A)
th = Y / (4*M)

if X >= th:
  print('Yes')
else:
  print('No')
import sys
input = sys.stdin.readline

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

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

print('Yes')
import numpy as np
n, m = list(map(int,(input().split())))
a = np.array(list(map(int,(input().split()))))

all_b = sum(a)
t = 1/(4*m)*all_b
#all_t =a*t

ans = np.where(a>=t)
#print(ans)
#print(all_b[all_b >t])
#print(all_b,t)
#print(len(ans[0]))
if len(ans[0]) >= m:
  print('Yes')
else:
  print('No')
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
gross_vote = sum(A)
A_pop = [i for i in A if i>=gross_vote/4/M]
if len(A_pop)>=M:
    print("Yes")
else:
    print("No")
n, m = map(int, input().split())
a = sorted(list(map(int, input().split())),reverse=True)
t = 0
for i in range(n):
    t += a[i]

if a[m-1] >= t/(4*m):
    print("Yes")
else:
    print("No")
n,m=map(int,input().split())
a=list(map(int,input().split()))
aa=sum(a)
count=0
for i in range(len(a)):
    if a[i]>=aa*(1/(4*m)):
        count+=1
    else:
        pass
if count>=m:
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
nlist = list(map(int,input().split()))
ans = 0
for i in range(n):
  if nlist[i] >= sum(nlist)/(4*m):
    ans += 1
if ans >= m:
  print('Yes')
else:
  print('No')
import numpy as np
N,M = (int(x) for x in input().split(' '))
A = np.array([int(x) for x in input().split(' ')])
A = A/np.sum(A)


if len(np.where(A>=1/4/M)[0]) >= M:
	print("Yes")
else:
	print("No")
n,m = map(int,input().split())
a = list(map(int, input().split()))
ord = []
summ = sum(a)
isSmallThan = True
for j in range(m):
  ord.append(max(a))
  a.remove(max(a))
for k in range(m):
  if ord[k]/summ >= 1/(4*m):
    isSmallThan = True
  else:
    isSmallThan = False
    break
print('Yes' if isSmallThan else 'No')
x,y= list(map(int, input().split()))
i = list(map(int, input().split()))
i.sort(reverse=True)
k=sum(i)
flag=0
if i[y-1]>=k/(4*y):
    print("Yes")
else:
    print("No")
n,m = map(int,input().split())
a = list(map(int, input().split()))
popular = list(filter(lambda e: e>=(1/(4*m))*sum(a),a))
print("Yes" if len(popular) >= m else "No")
import numpy as np
n, m = list(map(int, input().split()))

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

total = np.sum(a)
#print(len(a[a>=total/(4*m)]))

if len(a[a>=total/(4*m)])>=m:
  print('Yes')
else:
  print('No')
n, m = map(int, input().split())
a_list = list(map(int, input().split()))
a_list = sorted(a_list)

cnt = 0

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

if cnt >= m:
    print('Yes')
else:
    print('No')
def f(M,A):
  c=0
  s=sum(A)
  for a in A:
    if a>=s/4/M:c+=1
    if c>=M:return("Yes")
  return("No")
N,M=map(int,input().split())
A=[int(x) for x in input().split()]
s=sum(A)
print(f(M,A))
N, M = map(int, input().split())
A = list(map(int, input().split()))
total = sum(A)
print('Yes' if M <= len(list(filter(lambda x: x, map(lambda x: x * 4 * M >= total, A)))) else 'No')
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))

aa = sorted(a, reverse=True)

suma = sum(aa)
threshold = suma / (4 * m)

if aa[m-1] >= threshold:
    print("Yes")
else:
    print("No")
n,m = map(int, input().split())
A = list(map(int, input().split()))

s = 0
for i in range(n):
  if A[i] >= sum(A)/(4*m):
    s += 1
  else:
    pass
  
if s >= m:
  print("Yes")
else:
  print("No")
n,m = map(int,input().split())
line = sorted(list(map(int,input().split())),reverse = True)
sums = sum(line)
if sums % (4*m) != 0:
  least = sums//(4*m) + 1
else:
  least = sums//(4*m)
box = []
for i in line:
  if i >= least:
    box.append(i)
if len(box) >= m:
  print("Yes")
else:
  print("No")
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
k=sum(a)/(4*m)
s=0
for i in range(m):
    if a[-i-1]>=k:
        pass
    else:
        s=1
        break
if s==1:
    print("No")
else:
    print("Yes")
n, m = map(int, input().split())
 
A = list(map(int, input().split()))
 
sum = 0
 
for i in range(n):
  sum += A[i]
  
counter = 0
rate = 4 * m
rate = sum / rate
for i in range(n):
  if A[i] >= rate:
    counter += 1
    
if counter >= m:
  print('Yes')
else:
  print('No')
t = list(map(int,input().split()))
a = list(map(int,input().split()))
s = sum(a)
count = 0

for i in range(t[0]):
    if a[i] >= s/(4 * t[1]):
        count += 1

if count >= t[1]:
    print("Yes")
else:
    print("No")
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")
def getInput():
    return [int(i) for i in input().rstrip().split(' ')]
N, M = getInput()
A = getInput()
_4M = sum(A) / (4*M)
A.sort(reverse=True)
cnt = 0
for i in A:
    if i >= _4M:
        cnt += 1
print('Yes') if cnt >= M else print('No')
N,M = map(int,input().split())
A = list(map(int,input().split()))
S = sum(A)
A.sort(reverse=True)
if (A[M-1] * 4 * M) < S:
    print('No')
else:
    print('Yes')
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')
a=list(map(int,input().split()))
n=a[0]
m=a[1]
touhyou=list(map(int,input().split()))
s=float(sum(touhyou)/4/m)
list=[]
for i in touhyou:
  if i>=s:
    list.append(i)
if len(list)>=m:
  print("Yes")
else:
  print("No" )
n, m = map(int, input().split())
a_list = [int(i) for i in input().split()]

a_sum = sum(a_list)
a_sorted = sorted(a_list)[::-1]

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

#必要票数を求める
s = sum(a)
needed = s/4/m if s%(4*m) == 0 else s//(4*m)+1

for i in range(m):
    if a[i] < needed:
        print("No")
        break
else:
    print("Yes")
input_line = input().split(" ")
N=int(input_line[0])
M=int(input_line[1])
count=0

input_line = input().split(" ")
total=0
for i in range(len(input_line)):
    total=total+int(input_line[i])

border=total/(4*int(M))

for i in range(len(input_line)):
    if int(input_line[i])>=border:
        count=count+1
    

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

# input_line=' '.join(input_line)
a=list(map(int, input().split()))
n=a[0]
m=a[1]
l=list(map(int, input().split()))
lm=sum(l)
l=sorted(l, reverse=True)
for i in range(m):
    if l[i]*4*m<lm:
        print("No")
        exit()
print("Yes")