Harryxun/stf_run huggingface dataset:
s=str(input())
if len(s)%2==1:
    print("No")
else:
    is_hitachi=1
    for i in range(len(s)/2):
        if s[2i]!="h" or s[2i+1]!="i":
            is_hitachi=0
            break
    if is_hitachi==1:
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

s=str(input())
if len(s)%2==1:
    print("No")
else:
    is_hitachi=1
    for i in range(int(len(s)/2)):
        if s[2*i]!="h" or s[2*i+1]!="i":
            is_hitachi=0
            break
    if is_hitachi==1:
        print("Yes")
    else:
        print("No")
H,W,D=map(int,input().split())
A=[[0,0]]*(H*W)
j=0
for i in range(H):
  for a in input().split():
    A[int(a)-1]=[i,j]
    j+=1
  j=0
Q=int(input())
S=[[0]*((H*W-1-i)//D+1) for i in range(D)]
for i in range(D):
  for k in range((H*W-1-i)//D):
    x1=A[D*k+i-1][0]
    x2=A[D*(k+1)+i-1][0]
    y1=A[D*k+i-1][1]
    y2=A[D*(k+1)+i-1][1]
    S[i][k+1]+=S[i][k]+abs(x1-x2)+abs(y1-y2)
ans=0
for q in range(Q):
  l,r=map(int,input().split())
  m=l%D
  ans=S[m][(r-m)//D]-S[m][(l-m)//D]
  print(ans)
  ans=0

### FIXED CODE ###

H,W,D=map(int,input().split())
A=[[0,0]]*(H*W)
j=0
for i in range(H):
  for a in input().split():
    A[int(a)-1]=[i,j]
    j+=1
  j=0
Q=int(input())
S=[[0]*((H*W-1-i)//D+1) for i in range(D)]
for i in range(D):
  for k in range((H*W-1-i)//D):
    x1=A[D*k+i][0]
    x2=A[D*(k+1)+i][0]
    y1=A[D*k+i][1]
    y2=A[D*(k+1)+i][1]
    S[i][k+1]+=S[i][k]+abs(x1-x2)+abs(y1-y2)
ans=0
for q in range(Q):
  l,r=map(int,input().split())
  m=(l-1)%D
  ans=S[m][(r-1-m)//D]-S[m][(l-1-m)//D]
  print(ans)
  ans=0
ans = 0

for i in range(10**9):
  ans += 1
  
print(ans

### FIXED CODE ###

n = int(input())
A, B = [], []
for _ in range(n):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)
ans = 0
for i in range(n-1, -1, -1):
    if (A[i]+ans) % B[i] == 0:
        continue
    else:
        ans += B[i] - (A[i]+ans) % B[i]
print(ans)
import math
a,b=map(int,input().split())
print(mayh.ceil(a/b))

### FIXED CODE ###

import math
a,b=map(int,input().split())
print(math.ceil(a/b))
n, m = map(int, input().split(" "))
(n, m) = (n, m) if n>m else (m, n)
M=1000000007

def newfact(n):
    
    return ((n * newfact(n-1)) % M if n > 1 else 1)

if n > m+1:
    print(0)
elif n == m:
    print((2 * newfact(n) * newfact(m)) % M)
else:
    print((newfact(n) * newfact(m)) % M)

### FIXED CODE ###

n, m = map(int, input().split(" "))
(n, m) = (n, m) if n>m else (m, n)
M=1000000007

def newfact(n):
    ans=1
    for i in range(1, n+1):
        ans = (ans*i)%M
    return ans

if n > m+1:
    print(0)
elif n == m:
    print((2 * newfact(n) * newfact(m)) % M)
else:
    print((newfact(n) * newfact(m)) % M)
N,M,X,Y=[int(x) for x in stdin.readline().rstrip().split()]
datax=[int(x) for x in stdin.readline().rstrip().split()]
datay=[int(x) for x in stdin.readline().rstrip().split()]
if sorted(datax)[-1] < sorted(datay)[0]:
    print("No War")
else:
    print("War")

### FIXED CODE ###

from sys import stdin
N,M,X,Y=[int(x) for x in stdin.readline().rstrip().split()]
datax=[int(x) for x in stdin.readline().rstrip().split()]
datay=[int(x) for x in stdin.readline().rstrip().split()]
if sorted(datax)[-1]+1 <= sorted(datay)[0] and  X < sorted(datax)[-1]  and sorted(datay)[0] <=Y: 
    print("No War")
else:
    print("War")
import math
import sys
n=int(input())
a=list(map(int,input().split()))
a.sort()
M=max(a)
p=[]

for i in range(n):
    p.append([j for j in range(a[i],M+1,a[i])])
print(len(set(set(a)-set(p))))

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
a.sort()
M=max(a)
p=[]
for i in range(n):
    if i+1<=n-1:
        if a[i]==a[i+1]:
            p+=[j for j in range(a[i],M+1,a[i])]
        else:
            p+=[j for j in range(a[i]*2,M+1,a[i])]
    else:
        p+=[j for j in range(a[i]*2,M+1,a[i])]

print(len(set(set(a)-set(p))))
import fractions


def prime_number(n):
    N = n + 1
    table = [0] * N
    prime_list = []
    
    for i in range(2, N):
        if table[i] == 0:
            prime_list.append(i)
            
            for j in range(i + i, N, i):
                table[j] = 1
    
    return prime_list

def prime_factor(n):
    prime_list = prime_number(n)
    
    ret = 1
    for i in prime_list:
        if n % i == 0:
            ret +=1
            while n % i == 0:
                n /= i
            
    return ret

if __name__ == "__main__":
    A, B = map(int, input().split())
    n = fractions.gcd(A, B)
    print(prime_factor(n))

### FIXED CODE ###

import math, fractions


def num_prime_factor(n):
    
    ret = 0

    for i in range(1, int(math.sqrt(n)) + 2):

        composite = False

        if n % i == 0:
            ret += 1
            n = n / i

            if i != 1:
                while n % i == 0:
                    n = n / i

            if n == 1:
                break

            for j in range(2, int(math.sqrt(n)) + 2):
                if n % j == 0:
                    composite = True
                    break

            if not composite:
                ret += 1
                break

    return ret

if __name__ == "__main__":
    A, B = map(int, input().split())
    n = fractions.gcd(A, B)
    print(num_prime_factor(n))
dic = {"C":0, "C#":1, "D":2, "D#":3,
       "E":4, "F":5, "F#":6, "G":7,
       "G#":8, "A":9, "A#":10, "B":11}
t = int(input())
for _ in range(t):
  n, m = map(int, input().split())
  t_lst = [-100] + list(map(lambda x:dic[x],input().split()))
  s_lst = list(map(lambda x:dic[x],input().split()))
  s_lst.reverse()
  
  def search(t_index, s_index):
    if s_index == m: return t_index == 0
    if t_index <= 0 or t_index > n: return False
    base = t_lst[t_index]
    proc = s_lst[s_index]
    diff = (proc - base) % 12
    if diff == 1  and search(t_index - 2, s_index + 1) or\
       diff == 0  and search(t_index - 1, s_index + 1) or\
       diff == 11 and search(t_index + 1, s_index + 1): return True
    return False
  
  print("Yes" if search(n, 0) or search(n - 1, 0) else "No")


### FIXED CODE ###

dic = {"C":0, "C#":1, "D":2, "D#":3,
       "E":4, "F":5, "F#":6, "G":7,
       "G#":8, "A":9, "A#":10, "B":11}
t = int(input())
for _ in range(t):
  n, m = map(int, input().split())
  t_lst = [-100] + list(map(lambda x:dic[x],input().split()))
  s_lst = list(map(lambda x:dic[x],input().split()))
  s_lst.reverse()
  
  def search(stack):
    t_index, s_index = stack.pop()
    if s_index == m: return t_index == 0
    if t_index <= 0 or t_index > n: return False
    base = t_lst[t_index]
    proc = s_lst[s_index]
    diff = (proc - base) % 12
    if diff == 1  :stack.append((t_index - 2, s_index + 1))
    if diff == 0  :stack.append((t_index - 1, s_index + 1))
    if diff == 11 :stack.append((t_index + 1, s_index + 1))
    return False
  stack = [(n, 0), (n - 1, 0)]
  while stack:
    if search(stack):
      print("Yes")
      break
  else:
    print("No")
from sys import stdin

n,w = [int(x) for x in stdin.readline().rstrip().split()]
nw = [0]*n
nv = [0]*n
for i in range(n):
    nw[i],nv[i] = [int(x) for x in stdin.readline().rstrip().split()]
def knapsack(n,w,nw,nv):
    dp = [[0*(w+1)]for j in range(n+1)]
    #dp[i][total_w]はi-1回目までの商品を加えた時に重さがtotal_wを超えないような値の最大値
    for i in range(n):
        for total_w in range(w+1):
            if total_w - nw[i] >= 0:
                dp[i+1][total_w] = max(dp[i][total_w],dp[i][total_w-nw[i]]+nv[i])
            else:
                dp[i+1][total_w] = dp[i][total_w]
    return dp[-1][-1]
print(knapsack(n,w,nw,nv))

### FIXED CODE ###

from sys import stdin
n,w = [int(x) for x in stdin.readline().rstrip().split()]
li = [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)]
def knapsack(n,w,li):
    #li[i][0]が重さ,li[i][1]が価値
    dp = [[0 for i in range(w+1)]for j in range(n+1)]
    #dp[i][total_w]はi-1回目までの商品を加えた時に重さがtotal_wを超えないような値の最大値
    for i in range(n):
        for total_w in range(w+1):
            if total_w - li[i][0] >= 0:
                dp[i+1][total_w] = max(dp[i][total_w],dp[i][total_w-li[i][0]]+li[i][1])
            else:
                dp[i+1][total_w] = dp[i][total_w]
    return max(dp[-1])
print(knapsack(n,w,li))
import sys
for line in sys.stdin:
    a,b,c = line.split()
    a,c = int(a), int(c)
    p = '+-*/?'.index(b)
    if p = 0: a += c
    elif p == 1: a -= c
    elif p == 2: a *= c 
    elif p == 3: a /= c
    elif p == 4: break
    print a

### FIXED CODE ###

while True:
    a, op, b = raw_input().split()
    a = int(a)
    b = int(b)

    if op == '+': a += b
    elif op == '-': a -= b
    elif op == '*': a *= b 
    elif op == '/': a /= b
    elif op == '?': break
    print a
from itertools import permutations
from math import sqrt, pow

n = int(input())
x = []
y = []
for i in range(n):
    m = raw_input().split()
    x.append(int(m[0]))
    y.append(int(m[1]))

l = []
for i in range(n):
    l.append(i)

p = list(permutations(l))
ave = 0
cnt = 0
for i in p:
    j = 0
    while (j < n - 1):
        ave += sqrt(pow(x[i[j]] - x[i[j + 1]], 2) + pow(y[i[j]] - y[i[j + 1]], 2))
        j += 1
    cnt += 1

res = ave / cnt
print(res)


### FIXED CODE ###

from itertools import permutations
from math import sqrt, pow

n = int(input())
x = []
y = []
for i in range(n):
    m = input().split()
    x.append(int(m[0]))
    y.append(int(m[1]))

l = []
for i in range(n):
    l.append(i)

p = list(permutations(l))
ave = 0
cnt = 0
for i in p:
    j = 0
    while (j < n - 1):
        ave += sqrt(pow(x[i[j]] - x[i[j + 1]], 2) + pow(y[i[j]] - y[i[j + 1]], 2))
        j += 1
    cnt += 1

res = ave / cnt
print(res)
N, M = map(int, input().split())
switches = []

for i in range(M):
    tmp = list(map(int,input().split()))
    tmp.pop(0)
    switches.append(tmp)

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

a = [list(f"{i:0{N}b}") for i in range(2**N)]

ans = 0

for i in a:
    flag = 0
    for j in range(M):
        sum = 0
        for k in switches[j]:
            sum += int(i[k-1])
        if sum%2 != R[j]:
            flag = 1
    if flag == 0:
        ans += 1
print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
switches = []

for i in range(M):
    tmp = list(map(int,input().split()))
    tmp.pop(0)
    switches.append(tmp)

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

a = [list(format(i, '0%db' % N)) for i in range(2**N)]

ans = 0

for i in a:
    flag = 0
    for j in range(M):
        SUM = 0
        for k in switches[j]:
            SUM += int(i[k-1])
        if SUM%2 != R[j]:
            flag = 1
    if flag == 0:
        ans += 1

print(ans)
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    H = string_to_int(inputs[0])
    min_h = -1

    if len(H) == 1:
        return "Yes"

    not_operation_start = -1
    for i in range(len(H)-1):
        if H[i] - H[i+1] >= 2:
            return "No"
        elif H[i] - H[i+1] == 1:
            if not_operation_start == -1:
                if i - 1 >= 0:
                    if H[i] - H[i-1] >= 1:
                        H[i] -= 1
                    else:
                        return "No"
                else:
                    H[i] -= 1
            else:
                if not_operation_start - 1 >= 0:
                    if H[not_operation_start] - H[not_operation_start-1] >= 1:
                        H[i] -= 1
                    else:
                        return "No"
                else:
                    H[i] -= 1
            not_operation_start = -1
        else:
            if not_operation_start == -1:
                not_operation_start = i
    return "Yes"


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    inputs()
    ret = solve(inputs(1))
    print(ret)


### FIXED CODE ###

import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    H = string_to_int(inputs[0])
    min_h = -1

    if len(H) == 1:
        return "Yes"

    not_operation_start = 0
    for i in range(len(H)-1):
        flg = True
        if H[i] - H[i+1] >= 2:
            return "No"
        elif H[i] - H[i+1] == 1:
            if i - 1 >= 0:
                if H[i] - H[i-1] >= 1:
                    flg = True
                else:
                    flg = False
            else:
                flg = True
            if flg is False and not_operation_start != -1:
                if not_operation_start - 1 >= 0:
                    # if H[not_operation_start] - H[not_operation_start-1] >= 1
                    flg = False
                    for j in range(not_operation_start, i+1):
                        if H[j] - H[j - 1] >= 1:
                            flg = True
                            break
                else:
                    flg = True
            if flg:
                H[i] -= 1
            else:
                return "No"
            not_operation_start = -1
        else:
            if not_operation_start == -1:
                not_operation_start = i
    return "Yes"


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    input()
    ret = solve(inputs(1))
    print(ret)
a, b, x = list(map(int,input().split()))

import math

if 2*x < a*a*b:
    hatena = 2*x/a/b
    print(90-math.degrees(math.atan(hatena/b)))
else:
    hatena = 2*x/a/a - b
    print(90-math.degrees(math.atan(a/(b-hatena))))
    

### FIXED CODE ###

import math
a,b,x=list(map(int,input().split()))
maxv=a*a*b
sukima=maxv-x
teimenseki=sukima/a
y=teimenseki*2/a
 
if x > (maxv/2):
    print(math.degrees(math.atan(y/a)))
else:
    tei=x/a
    z=tei*2/b
    print(math.degrees(math.atan(b/z)))
s=input()
while len(s)>0:
  #初めがdreamの場合
  if s[:5]=="dream" and (len(s)==5 or s[5]=="d" or d[5:8]=="era"):
    s=s[5:]
  elif s[:7]=="dreamer" and (len(s)==7 or s[7]=="d" or s[7]=="e"):
    #初めがdreamerの場合
    s=s[7:]
  elif s[:5]=="erase" and (len(s)==5 or s[5]=="d" or s[5]=="e"):
    #初めがeraseの場合
    s=s[5:]
  elif s[:6]=="eraser" and (len(s)==6 or s[6]=="d" or s[6]=="e"):
    s=s[6:]
  else:
    print("NO")
    exit()
print("YES")

### FIXED CODE ###

s=input()
while len(s)>0:
  #初めがdreamの場合
  if s[:5]=="dream" and (len(s)==5 or s[5]=="d" or s[5:8]=="era"):
    s=s[5:]
  elif s[:7]=="dreamer" and (len(s)==7 or s[7]=="d" or s[7]=="e"):
    #初めがdreamerの場合
    s=s[7:]
  elif s[:5]=="erase" and (len(s)==5 or s[5]=="d" or s[5]=="e"):
    #初めがeraseの場合
    s=s[5:]
  elif s[:6]=="eraser" and (len(s)==6 or s[6]=="d" or s[6]=="e"):
    s=s[6:]
  else:
    print("NO")
    exit()
print("YES")
NM=input().split()
M=int(NM[1])
a=input().split()
a_list=[]
for i in a :
  a_list.append(int(i))
a_list.sort(reverse=True)
sum1=sum(a_list)
 
flag=True
for i,youso in enumerate(a_list) :
  if(youso*4*M<sum1 and i+1<=M) :
    print(youso)
    flag=False
    break
    
if flag=True :
  print('Yes')
else :
  print('No')

### FIXED CODE ###

NM=input().split()
M=int(NM[1])
a=input().split()
a_list=[]
for i in a :
  a_list.append(int(i))
a_list.sort(reverse=True)
sum1=sum(a_list)
 
flag=True
for i,youso in enumerate(a_list) :
  if(youso*4*M<sum1 and i+1<=M) :
    flag=False
    break
    
if flag==True :
  print('Yes')
else :
  print('No')
N = int(input())
S = input()
r = [S[:N].count("#") + S[N:].count(".") for _ in range(N)]  
print(min(r))

### FIXED CODE ###

A, B, C = map(int, input().split())
if A <= C and C <= B :
    print("Yes")
elif B <= C and C <= A :
    print("Yes")
else:
    print("No")
N = int(input())
X = list(map(int, input().split()))
sum = 0
for a in X:
    sum = sum + a
C = sum/N
ans = 0
for b in X:
    ans = ans + (b-C)**2
print(math.ceil(ans))


### FIXED CODE ###

N = int(input())
X = list(map(int, input().split()))
sum = 0
all = True
for a in X:
    sum = sum + a
C = int(sum / N + 0.5)
ans = 0
for b in X:
    ans = ans + (b-C)**2
print(ans)
n, k = map(int, input().split())
h = list(map(int, input().split()))
ans = 0
for i in h:
    if h >= k:
        ans += 1
print(ans)

### FIXED CODE ###

n, k = map(int, input().split())
h = list(map(int, input().split()))
ans = 0
for i in h:
    if i >= k:
        ans += 1
print(ans)
a, b = map(int,input.split())
print(a*b)

### FIXED CODE ###

a, b = map(int,input().split())
print(a*b)
x = list(map(int,input().split())
         
for i in range(5):
	if x[i] == 0:
    	print(i+1)

### FIXED CODE ###

a, b, c, d, e = map(int,input().split())

if a == 0:
  print(1)
elif b == 0:
  print(2)
elif c == 0:
  print(3)
elif d == 0:
  print(4)
elif e == 0:
  print(5)
N=int(input())

while a=True:
  for i in range(10):
    for j in range(10):
      if i*j==N:
        print("Yes")
        break
  print("No")
  a=False

  
    

### FIXED CODE ###

N=int(input())

list=[]
for i in range(1,10):
  for j in range(1,10):
    list.append(i*j)
if N in list:
  print("Yes")
else:
  print("No")
k,s = map(int,input().split())
ans = 0
for i in range(k+1):
	for j in range(k+1):
		z = s-x-y
		if(0 <= z and z <= k):
			ans += 1
print(ans)

### FIXED CODE ###

k,s = map(int,input().split())
ans = 0
for i in range(k+1):
	for j in range(k+1):
		z = s-i-j
		if(0 <= z and z <= k):
			ans += 1
print(ans)
n,m=int(input().split())
print(n*m)

### FIXED CODE ###

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

b = np.zeros((n))




from numpy.linalg import solve

c = np.zeros((n,n))
for i in range(n):

    j = 1
    while (i+1) * j <= n:
        c[i][(i+1) * j-1] = 1
        j += 1

#print(c)
b = solve(c,a)
#print(b)

'''
for i in range(n):
    b[i] = a[i]

#print(b)

if n % 2 == 0:
    p = int(np.ceil(n/2))
else:
    p = int(np.ceil(n/2)-1)
#print(p)

for i in reversed(range(p+1)):
    for j in reversed(range(1,int(n/(i+1)))):
        #print(i,j)
        b[i] -= b[(i+1)*(j+1)-1]

'''


b = b.astype(int)

#print(b)

flag = True
for i in range(n):
    if b[i] < 0:
        flag = False
        break

if flag:
    print(str(b).replace('[','').replace(']','').replace(' 0',''))

else:
    print(-1)


### FIXED CODE ###

import numpy as np
n = int(input())
a = np.array(list(map(int, input().strip().split())))
b = [0] * (n+1)
for i in range(n):
    b[i+1] = a[i]

#print(b)

#print('p',n//2)
for i in reversed(range(1,n//2 + 1)):
    j = 2
    b_sum = 0
    #print(i)
    while i * j <= n:
        #print(i,j)
        b_sum += b[i*j]
        j += 1
    if (b_sum % 2) == a[i-1]:
        b[i] = 0
    else:
        b[i] = 1

#print(b)

s = sum(b)

print(s)
if s > 0:
    sl = ''
    for i in range(len(b)):
        if b[i] == 1:
            sl += str(i) + ' '

    print(sl[:-1])
import math
A,B = input().split()
A = int(A)
B = int(B)
lcm = int(A*B/math.gcd(A,B))
print(lcm)

### FIXED CODE ###

import fractions
A,B = input().split()
A = int(A)
B = int(B)
lcm = int(A*B/fractions.gcd(A,B))
print(lcm)
S = list(input())

if S[0] == "L" or S[2] == "L":
    print("No")
elif S[1] == "R" or S[3] == "R":
    print("No")
else:
    print("Yes")

### FIXED CODE ###

S = str(input())

num = 0
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == "L":
            num += 1
    else:
        if S[i] == "R":
            num += 1

if num == 0:
    print("Yes")
else:
    print("No")
from numpy import*
n,m=map(int,input().split())
l=[]
for i in range(m):
    *a,=map(int,input().split())
    l.append(a[1:])
*p,=map(int,input().split())

ans=0
for t in range(2**m):
    tmp=array([t>>s&1 for s in range(m)])
    if p==[sum(tmp[array(i)-1])%2for i in l]:
        ans+=1
print(ans)

### FIXED CODE ###

from numpy import*
n,m=map(int,input().split())
l=[]
for i in range(m):
    *a,=map(int,input().split())
    l.append(a[1:])
*p,=map(int,input().split())

ans=0
for t in range(2**n):
    tmp=array([t>>s&1 for s in range(n)])
    if p==[sum(tmp[array(i)-1])%2for i in l]:
        ans+=1
print(ans)
import sys


class Graph:
    def __init__(self, nodes={}):
        self.nodes = nodes
    def printAdjMatrix(self):
        # assuming that nodes' indices are 1,2,3,...,n
        n = len(self.nodes)
        for node in range(n):
        out = ''
        for adj in range(n):
            if adj + 1 != n:
                out += '1 ' if adj + 1 in G.nodes[node + 1] else '0 '
            else:
                out += '1' if adj + 1 in G.nodes[node + 1] else '0'
        print(out)


n = int(input())
G = Graph()
for line in sys.stdin:
    numList = list(map(int, line.split()))
    G.nodes[numList[0]] = list(numList[2:])

G.printAdjMatrix()

### FIXED CODE ###

import sys


class Graph:
    def __init__(self, nodes={}):
        self.nodes = nodes


n = int(input())
G = Graph()
for line in sys.stdin:
    numList = list(map(int, line.split()))
    G.nodes[numList[0]] = list(numList[2:])
for node in range(n):
    out = ''
    for adj in range(n):
        if adj + 1 != n:
            out += '1 ' if adj + 1 in G.nodes[node + 1] else '0 '
        else:
            out += '1' if adj + 1 in G.nodes[node + 1] else '0'
    print(out)
n, m = map(int, input().split())
a = list(map(int, input().split()))

all_sum = sum(a)
standard = all_sum//(4*M)
ans = 0

for i in a:
  if a[i] >= standard:
    ans += 1

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

### FIXED CODE ###

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

all_sum = sum(a)
standard = all_sum/(4*m)
ans = 0

for i in a:
  if i >= standard:
    ans += 1

if ans >= m:
  print('Yes')
else:
  print('No')
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)


n,x = map(int, input().split())
city = list(map(int,input().split()))

for i in range(n):
    city[i] = abs(city[i]-x)

print(gcd_list(city))


### FIXED CODE ###

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

n,x = map(int, input().split())
city = list(map(int,input().split()))

for i in range(n):
    city[i] = abs(city[i]-x)

ans = city[0]
for num in city:
    ans = gcd(ans, num)

print(ans)
import sys

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

sys.setrecursionlimit(N * 2)

Z = 1000000007

for _ in range(M):
    a = int(input())
    A.add(a)


B = [-1] * (N + 1)


def d(n):
    if n < 1:
        return 0
    if n in A:
        B[n] = 0
        return 0

    if B[n] != -1:
        return B[n]
    if n == 1:
        return 1
    if n == 2:
        if 1 in A:
            return 1
        return 2

    if n - 1 in A and n - 2 in A:
        return 0

    if n - 1 in A:
        B[n] = d(n-2)
        return B[n]

    if n - 2 in A:
        B[n] = d(n-1)
        return B[n]

    B[n] = (d(n-2) + d(n-1)) % Z
    return B[n]


print(d(N))


### FIXED CODE ###

import sys

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

sys.setrecursionlimit(N * 10)

Z = 1000000007

for _ in range(M):
    a = int(input())
    A.add(a)


B = [-1] * (N + 1)
B[0] = 0


def d(n):
    if n < 1:
        return 0
    if n in A:
        B[n] = 0
        return 0

    if B[n] != -1:
        return B[n]
    if n == 1:
        return 1
    if n == 2:
        if 1 in A:
            return 1
        return 2

    if n - 1 in A and n - 2 in A:
        return 0

    if n - 1 in A:
        B[n] = d(n-2)
        return B[n]

    if n - 2 in A:
        B[n] = d(n-1)
        return B[n]

    B[n] = (d(n-2) + d(n-1)) % Z
    return B[n]


print(d(N))