peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
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')
# Judge status: Wrong Answer
def area(r):
  big = r*r
  return big
# Judge status: Accepted
N = int(input())
n = 0
for i in range(1, N+1):
    n += i
    
print(n)
# Judge status: Accepted
from decimal import Decimal, ROUND_HALF_UP


def main():
    length = int(input())
    numbers = list(map(int, input().split()))
    target = Decimal(str(sum(numbers) / length)).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
    answer = 0
    for num in numbers:
        answer += (num - target) ** 2
    print(answer)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n = input()
l = map(int, input().split())

d = {}
m = set()
for i in l:
    if i not in d:
        d[i] = 1
    else:
        d[i] += 1
        if d[i] > 1:
            m.add(i)
a = sorted(m, reverse=True)[:2]
if len(a) == 0:
    print(0)
    exit()
elif len(a) == 1 and d[a[0]] < 4:
    print(0)
    exit()
if d[a[0]] > 3:
    print(i*i)
    exit()
print(a[0]*a[1])
# Judge status: Accepted
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a > k:
    print(":(")
else:
    print("Yay!")
# Judge status: Wrong Answer
L, R, d = [int(s) for s in input().split()]
print(R // d - L // d)
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

m = sum(B) - sum(A)
cnt_a, cnt_b = 0, 0

for a, b in zip(A, B):
    if a > b:
        cnt_b += 1
    elif a < b:
        if (b-a) % 2 == 0:
            cnt_a += (b-a)//2
        else:
            cnt_a += (b-a)//2 + 1

if max(cnt_a, cnt_b) <= m:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n,k = map(int, input().split())
print((n-2)//(k-1) + 1)
# Judge status: Accepted
mod=10**9+7

def modpow(a,n):
  if n<1:
    return 1
  ans=modpow(a,n//2)
  ans=(ans*ans)%mod
  if n%2==1:
    ans*=a
  return ans%mod

def conb(n,i):
  inv,ans=1,1
  for j in range(1,i+1):
    ans=ans*(n-j+1)%mod
    inv=inv*j%mod
  return (ans*modpow(inv,mod-2))%mod

n,a,b=map(int,input().split())
all_patterns=modpow(2,n)
a=a if n/2>a else n-a
b=b if n/2>b else n-b
print((all_patterns-conb(n,a)-conb(n,b)-1)%mod)
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
ans = sum(B)

for i in range(N - 1):
  if A[i + 1] == A[i] + 1:
    ans += C[A[i] - 1]
    
print(ans)
# Judge status: Accepted
a,b,c=map(int,input().split())
if (10*b+c)%4==0:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
import math
H, A = map(int, input().split())

print(math.ceil(H / A))
# Judge status: Accepted
import heapq
n=int(input())
v=list(map(int,input().split()))
heapq.heapify(v)
for i in range(n-1):
    a=heapq.heappop(v)
    b=heapq.heappop(v)
    heapq.heappush(v,(a+b)/2)
ans=heapq.heappop(v)
print(ans)
# Judge status: Wrong Answer
#python3
#python3
import numpy as np
n=int(input())
a=np.array([int(i) for i in input().split()])
MOD = int(1e9+7)
ans=0
for k in range(60):
  b=(a>>k)&1
  x=sum(b)
  ans+=x*(n-x)*2**k
print(ans%MOD)
# Judge status: Accepted
from math import factorial

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

if N <= 1:
  a = 0
else:
  a = factorial(N) / 2 / factorial(N - 2)
  
if M <= 1:
  b = 0
else:
  b = factorial(M) / 2 / factorial(M - 2)
  
print(int(a+b))
# Judge status: Accepted
def Candies(n , a1l , a2l):

    ans = 0

    for i in range(n):
        count = sum(a1l[:i + 1]) + sum(a2l[i:])
        ans = max(ans , count)
    return ans

def main():
    n = int(input())
    a1l = list(map(int , input().split()))
    a2l = list(map(int , input().split()))
    print(Candies(n , a1l , a2l))

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
S = input()
if "hi" in S:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
in1 = input().split()
in2 = input().split()
in3 = input()
oni = int(in1[0])
onispeed = int(in1[1])
kid = int(in2[0])
kidspeed = int(in2[1])
time = int(in3)

pase = onispeed - kidspeed
if pase <= 0:
  print("NO")

if (pase * time) + oni >= kid:
  print("YES")
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))

ans=1

if 0 in a:
    print(0)
    exit()

for i in a:
   ans*=i
   if ans>10**18:
    print(-1)
    exit()


print(ans)
# Judge status: Accepted
import math
k=int(input())
res=0
#すべてが同じ値の場合:1-kの合計
res += k*(k+1)//2
#2値が同じ場合:*3
for i in range(1,k+1):
  for j in range(1,k+1):
    if i==j:
      continue
    res += math.gcd(i,j)*3
#全部違う場合:*6
for i in range(1,k+1):
  for j in range(i+1,k+1):
    for m in range(j+1,k+1):
      if len(list(set([i,j,k]))) == 3:
        res += math.gcd(math.gcd(i,j),m)*6
print(res)
# Judge status: Accepted
import math
def gcd(x,y):
    if y == 0:
        return x
    return gcd(y,x%y)
def lcm(x,y):
    return x*y//gcd(x,y)
N = int(input())
if N == 1:
    print(int(input()))
else:
    ans = int(input())
    for i in range(N-1):
        J = int(input())
        ans = lcm(ans,J)
    print(ans)
# Judge status: Accepted
n=int(input())
a=input()

lista=list(a)
w=lista.count("W")
r=lista.count("R")
count=0
for i in range(r):
  if lista[i]=="W":
    count+=1
print(count)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
t=a+b+c
k=0 if a+b==c or a+c==b or b+c==a else 0
print('YNeos'[k::2])
# Judge status: Wrong Answer
A, B = map(int, input().split())
if((A and B)<=9):
    print(int(A*B))
else:
    print()
# Judge status: Wrong Answer
n,m= list(map(int, input().split()))
if n>=m*2:
    print(m//2)
else:
    print(n+(m-n*2)//4)
# Judge status: Accepted
a,b,c = map(int,input().split())
if a > b+c:
    print(0)
else:
    print(b+c-a)
# Judge status: Accepted
P,Q,R=list(map(int, input().split()))
v=max(P,Q,R)
print(P+Q+R-v)
# Judge status: Accepted
n = int(input())
ans = ''
al = 'abcdefghijklmnopqrstuvwxyz'
while n>0:
    n -= 1
    ans += al[n%26]
    n //= 26
print(ans[::-1])
# Judge status: Accepted
q,h,s,d = map(int, input().split())
n = int(input())

q = 4*q
h = 2*h
x = min(q,h,s)

print((n//2)*min(2*x,d)+(n%2)*x)
# Judge status: Accepted
n = int(input().strip())
ans = 0
for i in range(1, (n + 1), 2):
    cnt = 0
    for j in range(1, (i + 1), 1):
        if (i % j == 0):
            cnt += 1
    if cnt == 8:
        ans += 1
print(ans)
# Judge status: Accepted
import math
Time=[int(input()) for _ in range(5)]
amari=[math.ceil(Time[i]/10)*10 for i in range(5)]

last=min((Time[i]-1)%10 for i in range(5))
last+=1

print(amari[0]+amari[1]+amari[2]+amari[3]+amari[4]+last-10)
# Judge status: Accepted
n, m, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
cuma = [0]
cumb  = [0]
for a in A:
    cuma.append(cuma[-1] + a)
for b in B:
    cumb.append(cumb[-1] + b)
from bisect import bisect_left
ans = 0
for i in range(n+1):
    if k < cuma[i]: continue
    idx = bisect_left(cumb, k - cuma[i] + 1)
    ans = max(ans, i + idx - 1)
for j in range(m+1):
    if k < cumb[j]: continue
    idx = bisect_left(cuma, k - cumb[j] + 1)
    ans = max(ans, j + idx - 1)
print(ans)
# Judge status: Accepted
a, b, c, = map(int, input().split())

ret = "bust"
if a + b + c <= 21:
   ret = "win" 

print("{}".format(ret))
# Judge status: Wrong Answer
a,b = list(map(int, input().split()))
print(a*b)
# Judge status: Accepted
n = int(input())
s = (1+n) * n // 2
for i in range(1, n+1):
    if i % 3 == 0 or i % 5 == 0:
        s -= i
print(s)
# Judge status: Wrong Answer
X = input()

if X == 3 or X == 5 or X == 7:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

n = int(input())

a = n % 10

if a == 2 or a == 4 or a == 5 or a == 7 or a == 9:
    print("hon")
elif a == 0 or a == 1 or a == 6 or a == 8:
    print("pon")
else:
    print("bon")
# Judge status: Accepted
N,T = map(int,input().split())
ans = 10000
for i in range(N):
    c,t = map(int,input().split())
    if t <= T:
        ans = min(ans,c)
print(ans if ans != 10000 else 'TLE')
# Judge status: Wrong Answer
N = int(input())
S = input()
Rcount = 0
Gcount = 0
Bcount = 0
for i in S:
    if i == "R":
        Rcount += 1
    if i == "G":
        Gcount += 1
    if i == "B":
        Bcount += 1

sum2 = Rcount * Gcount * Bcount

for i in range(1, len(S) // 2):
    for j in range(len(S)-(i*2)):
        #print(j, j+i, j+i*2)
        if S[j] != S[j + i] and S[j] != S[j + (i * 2)] and S[j+i] != S[j+(i*2)]:
            sum2 -= 1
print(sum2)
# Judge status: Accepted
import sys 
n=int(input())
l=list(map(int,input().split()))
if n==0:
    if l[0]==1:
        print(1)
    else:
        print(-1)
    sys.exit()
w=[1-l[0]]*(n+1)
for i in range(1,n+1):
    w[i]=w[i-1]*2-l[i]
if min(w)<0:
    print(-1)
    sys.exit()
for i in range(1,n+1):
    w[i]+=l[i]
for i in range(n-1,-1,-1):
    l[i]+=l[i+1]
ans=0 
for i in range(n+1):
    ans+=min(l[i],w[i])
#print(w,w1)
print(ans)
# Judge status: Wrong Answer
def main():
    n=int(input())
    for i in range(26):
        if (n - i*4) % 7 == 0:
            print("Yes")
            return
    print("No")
    
if __name__ == "__main__":
    main()
# Judge status: Accepted
import bisect
n=int(input())
l=sorted(list(map(int,input().split())))

ans=0
for i in range(2,n):
    for j in range(1,i):
        ans+=max(j-bisect.bisect_right(l,l[i]-l[j]),0)
print(ans)
# Judge status: Accepted
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 18 09:56:28 2020

@author: liang
"""
from math import ceil

N, K = map(int, input().split())
A = [int(x) for x in input().split()]
ans = ceil((N-K)/(K-1)) + 1
print(ans)
# Judge status: Accepted
import copy

ab = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']

n = int(input())

value = ['a']
for i in range(10):
    if len(value[0]) == n:
        break
    tmp_value = copy.copy(value)
    value = []
    for v in tmp_value:
        for j in range(n):
            value.append(v + ab[j])
            if ab[j] not in v:
                break
for v in value:
    print(v)
# Judge status: Wrong Answer
N,K = list(map(int,input().split()))
h = list(map(int,input().split()))
DP = [float("inf")]*N

for i in range(1,min(K,N)):
    DP[i] = abs(h[i]-h[0])

DP[1] = abs(h[1]-h[0])
for i in range(K,N):
    for k in range(1,K+1):
        DP[i] = min(DP[i],DP[i-k]+abs(h[i]-h[i-k]))
print(DP[N-1])
# Judge status: Accepted
n=int(input())
ans=-1
c=[[0]*10 for _ in range(11)]
for i in range(n+1):
  c[int(str(i)[0])][int(str(i)[-1])]+=1
for i in range(10):
  for j in range(10):
    ans+=c[i][j]*c[j][i]
print(ans)
# Judge status: Accepted
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections


x,a,b = map(int,input().split())
if a >= b:
    print("delicious")
elif x + a >= b:
    print("safe")
else:
    print("dangerous")
# Judge status: Accepted
n=int(input())
ans=0
for i in range(1,n+1):
    for j in range(1,n//i+1):
        if n-i*j>0:
            ans+=1
print(ans)
# Judge status: Wrong Answer
import math


AB = list(map(float, input().split()))
A = int(AB[0])
B = AB[1]

result = A * B
print(math.floor(result))
# Judge status: Accepted
N, K=map(int, input().split())
min=min(N%K, abs((N%K)-K))
print(min)
# Judge status: Accepted
N = int(input())
ans = []

for A in range(1,1+int(N/2)):
  tmp = 0
  B = N - A
  A = str(A)
  B = str(B)
  for i in range(0,len(A)):
    tmp += int(A[i])
  for i in range(0,len(B)):
    tmp += int(B[i])
  ans.append(tmp)

print(min(ans))
# Judge status: Wrong Answer
C = {'25': 'Christmas', '24': 'Christmas Eve',
     '23': 'Christmas Eve Eve', '22': 'Chistmas Eve Eve Eve'}
D = input()
print(C.get(D, ''))
# Judge status: Accepted
n,a,b = map(int,input().split())
s = input()
kokunai = 0
kaigai = 0

for i in range(n):
    if s[i] == "a" and a + b > kokunai + kaigai:
        print("Yes")
        kokunai += 1
    elif s[i] == "b" and a + b > kokunai + kaigai and b > kaigai:
        print("Yes")
        kaigai += 1
    else:
        print("No")
# Judge status: Accepted
# coding: utf-8

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

ids = list(range(1, N+1))

L_max = 0
R_min = 10000000000000000000
for _ in range(M):
    (L, R) = map(int, input().split(" "))
    if L > L_max:
        L_max = L
    if R < R_min:
        R_min = R

ids = [i for i in ids if L_max <= i <= R_min]
print(len(ids))
# Judge status: Accepted
N = int(input())
AB = []
low = []
up = []
for i in range(N):
    A, B = map(int, input().split())
    AB.append([A, B])
    low.append(A)
    up.append(B)
    
low = sorted(low)
up = sorted(up)
    
if N%2 == 1:
    m_up = up[N//2]
    m_low = low[N//2]
    ans = m_up-m_low+1
    print(ans)
else:
    m_up = up[N//2] + up[N//2-1]
    m_low = low[N//2-1] + low[N//2]
    ans = m_up-m_low+1
    print(ans)
# Judge status: Wrong Answer
def not_op(x):
  x = int(input())
  if x != 0:
    x = 1
  elif x != 1:
    x = 0
  return x
# Judge status: Wrong Answer
def main():
  from collections import deque
  import sys
  
  n,s=int(input()),list(input())
  c=s[1:].count(".")
  print(c)
  
if __name__=="__main__":
  main()
# Judge status: Accepted
#93 B - Iron Bar Cutting WA (hint)
N = int(input())
A = list(map(int,input().split()))

# 差が最小の切れ目を見つける
length = sum(A)
left = 0
dist = 0
mdist = length
midx = 0
for i,a in enumerate(A):
    left += a
    right = length - left
    dist = abs(left - right)
    if dist < mdist:
        mdist = dist
        midx = i
ans = mdist
print(ans)
# Judge status: Wrong Answer
import math
N = int(input())
A = [int(num) for num in input().split()]

sumA = sum(A)
ans = 0
for i in range(len(A)):
    sumA = sumA - A[i]
    ans += A[i] * sumA
    ans = int(ans % (math.pow(10,9)+7))


ans = int(ans % (math.pow(10,9)+7))
print(ans)
# Judge status: Wrong Answer
S = input()
if S=="RRR":
    print(3)
elif S=="RRS":
    print(3)
elif S=="RSS":
    print(1)
elif S=="SSS":
    print(0)
elif S=="RSR":
    print(1)
elif S=="SRR":
    print(2)
elif S=="SSR":
    print(1)
elif S=="SRS":
    print(1)
# Judge status: Wrong Answer
input_num = input("Enter a number between 100 and 999: " )
input_int = int(input_num)

if  input_int > 999 or input_int < 100:
    print("error")

elif str(input_int)[-1] == '7':
  print("Yes")
elif str(input_int)[-2] == '7':
  print("Yes")
elif str(input_int)[-3] == '7':
  print('Yes')
else:
  print('No')
# Judge status: Accepted
n = int(input())
a = [int(input()) for _ in range(n)]
ans = 1
p = a[0]
while True:
    if p == 2:
        print(ans)
        break
    elif (p == a[p-1]) | (ans > n):
        print(-1)
        break
    else:
        p = a[p-1]
        ans += 1
# Judge status: Accepted
import math
n,k=map(int,input().split())
"""
1～6で場合わけ
"""
log2k = math.log(k, 2)
ans = 0
for i in range(1, n+1):
	target = math.ceil(log2k - math.log(i, 2))
	if target >= 1:
		ans += 1/(2**target)
	else:
		ans += 1
print(ans/n)
# Judge status: Accepted
n,m = map(int,input().split())
xyl = [list(map(int,input().split())) for nesya in range(m)]
red = [0]*n
ball = [1]*n
red[0] = 1
for xy in xyl:
  x = xy[0]-1
  y = xy[1]-1
  if red[x] > 0:
    red[y] = 1
    if ball[x] == 1:
      red[x] = 0
  ball[x] -= 1
  ball[y] += 1
print(sum(red))
# Judge status: Accepted
N,H=map(int,input().split())
a=[]
b=[]
for i in range(N):
    c,d=map(int,input().split())
    a.append(c)
    b.append(d)

a.sort(reverse=True)
at=a[0]
b.sort(reverse=True)
ans=0
for i in range(N):
    if at<b[i]:
        H-=b[i]
        ans+=1
    if H<=0:
        break
if H<=0:
    print(ans)
    exit()
ans+=(H+at-1)//at
print(max(ans,1))
# Judge status: Wrong Answer
import sys 
N, M = map(int, input().split())
X = list(map(int, input().split()))

X = sorted(X)

anslis = []


if M <= N:
    print(0)
    sys.exit()


    
for i in range(M-1):
    ans = abs(X[i+1] - X[i])
    anslis.append(ans)
    ans = 0

anslis = sorted(anslis)

print(sum(anslis[0:N+1]))
# Judge status: Wrong Answer
import sys
from collections import deque
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

if __name__=='__main__':
    n = I()
    v = list(IL())
    v.sort(reverse=True)
    while 1<len(v):
        tmp = v.pop()+v.pop()
        v.append(tmp/2)
        v.sort()
    print(v.pop())
    exit()
# Judge status: Wrong Answer
A, B, C, K = map(int, input().split())

if abs(A-B) > 10*18:
    print("Unfair")
elif K%2 == 0:
    print(A-B)
else:
    print(B-A)
# Judge status: Accepted
n = int(input())
L = list(map(int,input().split()))
i = 0
num = 1
cnt = 0
while i <=n-1:
    if L[i] == num:
        num +=1 
    else:
        cnt +=1
    i+= 1
if num == 1:
    print(-1)
else:
    print(cnt)
# Judge status: Accepted
X, N = map(int,input().split())
if N == 0:
  print(X)
  exit()
p = list(map(int,input().split()))
pset = set(p)

for i in range(200):
  MIN = X-i
  MAX = X+i
  if MIN not in pset:
    print(MIN)
    exit()
  elif MAX not in pset:
    print(MAX)
    exit()
# Judge status: Accepted
A,B,C=map(int,input().split())
print(min(A*B*(C%2),B*C*(A%2),C*A*(B%2)))
# Judge status: Accepted
N=int(input())
A=sorted(list(map(int,input().split(' '))),reverse=True)
print(sum(A[1:2*N:2]))
# Judge status: Wrong Answer
n = int(input())
pl = list(map(int, input().split()))

dic = {}
for i in range(1, n+1):
    dic.setdefault(i, 0)

for i in range(n-2):
    tmp = sorted(pl[i:i+3])[1]
    dic[tmp] += 1

count = 0
for v in dic.values():
    if v > 0:
        count += 1

print(count)
# Judge status: Accepted
L = int(input())


V = L/3 * L/3 * L/3
print(V)
# Judge status: Wrong Answer
import numpy as np

# K,N=list(map(int, input().split()))

# A=list(map(int, input().split()))
K,N=[20, 4]

A=[5, 10, 15]

A=np.array(A)

lin=np.array(A[:-1])
le=np.array(A[1:])

length=lin-le

rem=abs(K-A[-1]+A[0])

A=np.append(length,rem)

M=np.max(A)

print(K-M)
# Judge status: Accepted
n = int(input())
x = n // 4
for i in range(x+1):
    for j in range(x+1):
        if n == 4*i + 7*j:
            print('Yes')
            exit()

print('No')
# Judge status: Accepted
n, m, x, y = map(int, input().split())
xn = list(map(int, input().split()))
ym = list(map(int, input().split()))

xn.append(x)
ym.append(y)

xn.sort()
ym.sort()

if xn[-1] >= ym[0]:
    print("War")
else:
    print("No War")
# Judge status: Accepted
n,k=map(int,input().split())
H=list(map(int,input().split()))

H.sort()
H.reverse()
del H[:k]
a=sum(H)
print(a)
# Judge status: Wrong Answer
from collections import Counter
import sys
n = int(sys.stdin.readline())
sn = sys.stdin.read().split()
c = Counter(sn)
c = sorted(c.items(), key=lambda x: (x[1], x[0]))
num = c[0][1]
for i, j in c:
  if j == num:
    print(i)
  else:
    quit()
# Judge status: Accepted
s = input()
odds = [s[i] for i in range(len(s)) if i % 2 == 0]
evens = [s[i] for i in range(len(s)) if  i % 2 == 1]
if odds.count('L') > 0:
  print('No')
elif evens.count('R') > 0:
  print('No')
else:
  print('Yes')
# Judge status: Wrong Answer
N=int(input())
S=input()
N=len(S)
i=0
hidari=str()
migi=str()
a=0
while i<N:
  if S[i]==")":
    hidari+="("
    i+=1
  else:
    break
while i<N:
  if S[i]=="(":
    if a<0:
      a=0
    a+=1
    mina=0
  else:
    a-=1
    if a<0:
      if mina>a:
        hidari+="("
  i+=1
if a>0:
  migi+=a*")"
if hidari==migi==str():
  print("("+S+")")
  exit()
print(hidari+S+migi)
# Judge status: Wrong Answer
S = list(map(int, input().split()))
S.sort()
if S.sort()==[5,5,7]:
  print("YES")
else:
  print("NO")
# Judge status: Accepted
R=int(input())
C=2*3.14*R
print(C)
# Judge status: Accepted
N,A,B = map(int, input().split())
S = input()

for i in range(N):
  if S[i] == 'c':
    print('No')
  elif S[i] == 'a' and (A+B) > 0:
    print('Yes')
    A -= 1
  elif S[i] == 'b' and (A+B) > 0 and B > 0:
    print('Yes')
    B -= 1
  else:
    print('No')
# Judge status: Accepted
S=list(input())
line=[]
A=["A","C","G","T"]
num_list=[]
flag=False
for s in S:
    if s in A:
        line.append(s)
        flag=True
    elif flag:
        num_list.append(len(line))
        line=[]
        flag=False
num_list.append(len(line))
if len(num_list)==0:print(0)
else:
    print(max(num_list))
# Judge status: Accepted
n = int(input())
p_list = list(map(int, input().split()))
ans = 0
for i in range(1, n - 1):
    if p_list[i - 1] < p_list[i] < p_list[i + 1] or p_list[i - 1] > p_list[i] > p_list[i + 1]:
        ans += 1
print((ans))
# Judge status: Accepted
s = str(input())
L = [s.count('a'), s.count('b'), s.count('c')]
if max(L) - min(L) <= 1:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
N, M = map(int, input().split())

ans=[0]*N
for i in range(M):
    a,b = map(int, input().split())
    ans[a-1]+=1
    ans[b-1]+=1

for i in range(N):
    print(ans[i])
# Judge status: Accepted
import math
N, K = map(int, input().split())
A = list(map(int, input().split()))

def lamp(A):
  B = [0] * N
  for i in range(N):
    l = max(0, i - A[i])
    r = min(N - 1, i + A[i])
    #print(l, r)
    B[l] += 1
    if r + 1 < N:
      B[r + 1] -= 1
  
  A[0] = B[0]
  for i in range(1, N):
    A[i] = A[i - 1] + B[i]
  return A

r = min(41, K)
for i in range(r):
  A = lamp(A)
  
for i in range(N):
  print(A[i], end = " ")
print("")
# Judge status: Accepted
N,K=map(int,input().split())
H=list(map(int,input().split()))
dp=[0]*N

for i in range(N-1):
  A=[]
  for j in range(K):
    if i-j>=0:
      A.append(dp[i-j]+abs(H[i-j]-H[i+1]))
  dp[i+1]=min(A)

print(dp[N-1])
# Judge status: Accepted
N = int(input())
a = sorted(list(map(int, input().split())), reverse=True)[:2 * N]
print(sum(a[1::2]))
# Judge status: Accepted
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if a - e > k or a - e < -k:
    print(":(")
else:
    print("Yay!")
# Judge status: Accepted
a,b,c = map(int, input().split())

if (a == b and b == c):
    print(1)
elif (a == b and a!=c):
    print(2)
elif (a == b and b!=c):
    print(2)
elif (a == c and a!=b):
    print(2)
elif (a == c and c!=b):
    print(2)
elif (b == c and b!=a):
    print(2)
elif (b == c and c!=a):
    print(2)
else:
    print(3)
# Judge status: Wrong Answer
s = input()
t = input()
s = ''.join(sorted(s))
t = ''.join(sorted(t, reverse=True))
print(s, t)
print('Yes') if s < t else print('No')
# Judge status: Accepted
# coding: utf-8


def get_ans(num: int):
    if num < 105:
        return 0
    ans = 0
    for i in range(105, num + 1):
        if i % 2 == 0:
            continue
        if cnt_yaku(i):
            ans += 1
    return ans


def cnt_yaku(num: int):
    ans = 0
    for i in range(1, num + 1):
        if num % i == 0:
            ans += 1
    return ans == 8


num = int(input())
ans = get_ans(num)
print(ans)
# Judge status: Accepted
from sys import stdin
data = stdin.read().splitlines()

n = int(list(data[0].split())[0])
a = int(list(data[0].split())[1])
b = int(list(data[0].split())[2])

i = 0
count = 0
while i <= n:
    s = sum(list(map(int, str(i))))
    if a <= s and s <= b:
        count = count + i
    i += 1
print(count)
# Judge status: Accepted
N = int(input())
a = []
 
for _ in range(N):
    a.append(int(input()) - 1)

i, count = 0, 0
success = False
for _ in range(N):
    i = a[i]
    count += 1

    if i == 1:
        success = True
        break
 
if not success:
    count = -1
 
print(count)
# Judge status: Accepted
N = int(input())
H = list(map(int,input().split()))
m = 0
c = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    c+=1
  else:
    m = max(m,c)
    c = 0
m = max(m,c)
print(m)
# Judge status: Accepted
n, m = map(int,input().split())
l = list(map(int,input().split()))

def gcd(x, y):
    return x if y == 0 else gcd(y, x % y)
def lcm(x, y):
    return (x * y) // gcd(x, y)

ans = 1
tf = True

for i in l:
    i //= 2
    ans = lcm(ans, i)
    if (ans // i) % 2 == 0 or ans > m:
        print(0)
        tf = False
        break

if tf == True:
    print(m // ans - m // (ans * 2))
# Judge status: Accepted
n,m=map(int,input().split())
a = list(map(int,input().split()))
if n<sum(a):
    print(-1)
    exit()
print(n-sum(a))