peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
S = input()

max_length = 0
length = 0
for s in S:
    if s in ["A", "C", "G", "T"]:
        length += 1
    else:
        if length > max_length:
            max_length = length
        length = 0
if length > max_length:
        max_length = length
print(max_length)
# Judge status: Accepted
A = list(map(int,input().split()))

#print(A)

for i in range(len(A)):
    if A[i]==int(0):
        print(i+1)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

n2 = 0
n4 = 0

for ai in a:
  if ai % 4 == 2:
    n2 += 1
  if ai % 4 == 0:
    n4 += 1

if n2 == 0 and n4:
  n2 += 1
if n2 + n4 * 2 >= n:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    l=list(map(int,input().split()))
    for i in range(len(l)):
        if l[i]==0:
            print(i+1)
            break
resolve()
# Judge status: Accepted
import math

a,b,c = (int(x) for x in input().split())

if (c - a - b)**2 > 4 * a * b and c - a - b > 0:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
n=int(input())
s=input()
count=0
for i in range(n):
  str_1=s[0:i]
  str_2=s[i+1:n]
  if count<len(set(str_1)&set(str_2)):
    count=len(set(str_1)&set(str_2))
print(count)
# Judge status: Wrong Answer
n=int(input())
for i in range(1, n):
  x=360*i%n
  if x==0:
    print(360*i//n)
    break;
  else:
    continue;
# Judge status: Wrong Answer
import sys
def input(): return sys.stdin.readline().strip()


def main():
    D = int(input())
    print("Christma" + " Eve" * (25 - D))





if __name__ == "__main__":
    main()
# Judge status: Accepted
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline

n = int(input())

ls = []; rs = []
for _ in range(n):
    a,b = [int(i) for i in readline().split()]
    ls.append(a)
    rs.append(b)

ls.sort()
rs.sort()

ans = 0

if n%2 == 1:
    l = ls[n//2]
    r = rs[n//2]
    ans = r-l+1
else:
    l2 = ls[n//2-1]+ls[n//2]
    r2 = rs[n//2-1]+rs[n//2]
    ans = r2-l2+1

print(ans)
# Judge status: Wrong Answer
from itertools import combinations_with_replacement

N, M, Q = map(int, input().split())
list = [list(map(int,input().split())) for _ in range(Q)]
seq = [i for i in range(1,M+1)]
C = combinations_with_replacement(seq, N)
max_score = 0

for A in C:
    A = sorted(A)
    score = 0
    for q in list:
        if A[q[1]-1] - A[q[0]-1] == q[2]:
            score += q[3]
        print(score)
    max_score = max(score, max_score)
print(max_score)
# Judge status: Wrong Answer
n = int(input())
cnt = 0
for i in range(26):
    for j in range(16):
        if 4 *i + 7 *j == n:
            cnt += 1
            print(i, j)
if cnt >= 1:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
from sys import stdin

S = stdin.readline().rstrip()
days  = ["MON","TUE","WED","THU","FRI","SAT","SUN"]

if S == "SUN":
    print(days[6])
else:
    i = days.index(S)
    print(days[6 - i])
# Judge status: Accepted
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    a, b, c = map(int, input().split())
    if a - b >= c:
        print(0)
    else:
        print(c - (a - b))

if __name__ == '__main__':
    main()
# Judge status: Accepted
from collections import deque

N, M = map(int, input().split())
rooms = [0] + [[] for _ in range(N)] 
ans = [0] * (N+1)
for _ in range(M):
    A, B = map(int, input().split())
    rooms[A].append(B)
    rooms[B].append(A)

que = deque([1])

while len(que) > 0:
    x = que.popleft()
    for r in rooms[x]:
        if ans[r] == 0:
            ans[r] = x
            que.append(r)

print('Yes')
for i in range(2, N+1):
    print(ans[i])
# Judge status: Accepted
a,b,c = map(int,input().split())

p = c - a - b

if p <= 0:
  print("No")

else:
  if p**2 - 4*a*b > 0:
    print('Yes')
  
  else:
    print('No')
# Judge status: Wrong Answer
n = int(input())
s=input()
bc = [0 for i in range(n)]
wc = [0 for i in range(n)]
for i in range(n):
    if s[i] == '#':
        bc[i] =1
    else:
        wc[i] = 1
for i in range(n-1):
    bc[i+1] += bc[i]
for i in range(n-1,0,-1):
    wc[i-1] += wc[i]
bc.insert(0,0)
wc.insert(0,0)
bc.append(0)
wc.append(0)
ans = n
for i in range(n-1):
    ans = min(ans,bc[i]+wc[i+1])
print(ans)
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
l=[]
for i in range(1,n+1):
  if a.count(i)>0:
    print(a.count(i))
    exit()
    l.append(a.count(i))
x=n-len(l)
y='0'*x
m=list(str(y))
n='\n'.join(m)
print(n)
# Judge status: Accepted
s = [c for c in str(input())]
t = [c for c in str(input())]
from collections import Counter
s_cntr = sorted(Counter(s).values())
t_cntr = sorted(Counter(t).values())
if s_cntr == t_cntr: print('Yes')
else: print('No')
# Judge status: Accepted
s = int(input())
a1 = s
a = set()
while not (a1 in a):
    a.add(a1)
    if a1%2 == 0:
        a1 = int(a1/2)
    else:
        a1 = a1*3+1
print(len(a)+1)
# Judge status: Accepted
w,h,x,y = [int(x) for x in input().split()]

if x * 2 == w and y * 2 == h:
    print((w*h)/2, 1)
else:
    print((w*h)/2, 0)
# Judge status: Wrong Answer
import sys #追加
from collections import deque
sys.setrecursionlimit(10**9) #追加

n = int(input())
A = list(map(int, input().split()))
ans = 0

if n == 0:
    print(-1)
    exit()
elif A[0] == 1:
    print(-1)
    exit()



start = 1
way = sum(A)

for i in range(1,n+1):
    start *= 2

    if start < A[i]:
        print(-1)
        exit()
    if start > way:
        start = way

    ans += start
    #print(start, start-A[i])
    start -= A[i]
    way -= A[i]
#print()
print(ans+1)
# Judge status: Accepted
N,L=map(int, input().split())
List=[]
i=1
while i<=N:
    List.append(L+i-1)
    i+=1
MIN=abs(List[0])
HIKU=List[0]
j=1
while j<N:
    if abs(List[j])<MIN:
        HIKU=List[j]
        MIN=abs(List[j])
    j+=1
del List[List.index(HIKU)]
print(sum(List))
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))

#左から丹頂非増加、単調非減少を試して行って長い方を採用すれば良いO(N)
#値の増減の反転するポイントを探索する

ans = 1
tmp = 0
for i in range(1, n):
    if (A[i] - A[i-1]) * tmp < 0:
        ans += 1
        tmp = 0
    elif A[i] - A[i-1] != 0:
        tmp = A[i] - A[i-1]

print(ans)
# Judge status: Wrong Answer
k, n = map(int, input().split())
list_a = list(map(int, input().split()))

x = 0
longest = 0
for a in list_a:
  if a - x > longest:
    longest = a - x
    x = a - x
print(k-longest)
# Judge status: Accepted
N,A,B=map(int,input().split())

if (B-A)%2==0:
    ans =(B-A)//2
else:
    ans = min(A-1,N-B) + (B-A + 1)//2

print(ans)
# Judge status: Accepted
def main():
    # player = {"a": [], "b": [], "c": []}
    # for k in player:
    #     player[k] = list(input())
    player = {i:list(input()) for i in 'abc'}
    p = 'a'
    while player[p]:
        p = player[p].pop(0)
    print(p.upper())

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
N,M=map(int,input().split())
a=[[int(b) for b in input().split()] for i in range(N)]
c=[[int(d) for d in input().split()] for i in range(M)]
for i in range(N):
  p=a[i]
  tmp=10000
  pos=-1
  for j in range(M):
    cp=c[j]
    dist=abs(cp[0]-p[0])+abs(cp[1]-p[1])
    if dist < tmp:
      tmp=dist
      pos=j+1
      #print(pos)
  print(pos)
# Judge status: Accepted
n = int(input())
w = [input()]
for i in range(1,n):
  w.append(input())
if len(set(w)) != n:
  print("No")
else:
  for i in range(1,n):
    if w[i-1][-1] != w[i][0]:
      print("No")
      break
  else:
      print("Yes")
# Judge status: Accepted
n = int(input())
lst = [input() for _ in range(n)]

print(len(set(lst)))
# Judge status: Accepted
n,m=map(int,input().split())
flg=[False for i in range(n)]
flg[0]=True
t=[1 for i in range(n)]
tmp=1
for i in range(m):
    x,y=map(int,input().split())
    x,y=x-1,y-1
    t[x]-=1
    t[y]+=1
    if flg[x]:
        flg[y]=True
        if t[x]==1 and len(flg)==1:
            flg[x]=False

    if t[x]==0:
        flg[x]=False
ans=0
for i in range(n):
    if flg[i]:
        ans+=1
print(ans)
# Judge status: Accepted
a,b,c = map(int,input().split())
if a < c < b or a == b == c :
  print("Yes")
else : 
  print("No")
# Judge status: Accepted
import math
n,d=list(map(int,input().split()))
x=[list(map(int,input().split())) for i in range(n)]
count=0
tmp=0
for i in range(n):
    for j in range(i+1,n):
        for k in range(d):
            tmp+=pow(x[i][k]-x[j][k],2)
        distance=math.sqrt(tmp)
        if distance.is_integer()==True:
            count+=1
        tmp=0
print(count)
# Judge status: Accepted
a, b, c = input().split()
n = int(a+b+c)

print('NO') if n % 4 else print('YES')
# Judge status: Accepted
#078_B
x,y,z=map(int,input().split())
print((x-z)//(y+z))
# Judge status: Accepted
n=int(input())
mul=1
limit=1000000000000000000
x=input().split()
for i in range (n):
    p=int(x[i])
    if(p==0):
        mul=0
        break
if(mul==0):
    print(mul)
else:
    for i in range (n):
        p=int(x[i])
        mul*=p
        if(mul>limit):
            break
    if(mul>limit):
      print(-1)
    else:
      print(mul)
# Judge status: Accepted

n = int(input())

for i in range(n, 1000):
    s = str(i)
    if (s[0] == s[1] == s[2]):
        print(s)
        break
# Judge status: Accepted
num = input().split(" ")


sum = int(num[0]) * int(num[1])

if sum % 2 == 0:
    print("Even")
else:
    print("Odd")
# Judge status: Wrong Answer
def resolve():
	n, m = map(int, input().split())
	A = []
	B = []
	ans = False
	for _ in range(n):
		A.append(list(input()))
	for _ in range(m):
		B.append(list(input()))
	for i in range(n):
		for j in range(n):
			if i + m - 1 >= n or j + m - 1 >= n:
				continue
			tmp_ans = True
			for k in range(m):
				for l in range(m):
					if A[i+k][j+l] != B[k][l]:
						tmp_ans = False
						break
			ans = tmp_ans


	if ans:
		print('Yes')
	else:
		print('No')
resolve()
# Judge status: Accepted
import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    N = int(readline())
    A = list(map(int, readline().split()))

    ans = 0
    for i in range(0,N,2):
        if A[i]%2==1:
            ans += 1

    print(ans)
if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
a,b=map(int,input().split())
if a+b%2==0:
    print(a+b//2)
else:
    print("IMPOSSIBLE")
# Judge status: Accepted
S = input()
flag = False
start = 0
for i in range(len(S)):
    s = S[i]
    if s == 'A' and not flag:
        flag = True
        start = i
    if flag and s == 'Z':
        end = i
ans = end - start + 1
print(ans)
# Judge status: Accepted
n,k=map(int,input().split( ))
price=list(map(int,input().split( )))
price.sort(key=int)
ans=0
for i in range(k):
  ans+=price[i]
print(ans)
# Judge status: Accepted
N = int(input())
A = [int(input()) for i in range(N)]
import collections
c = collections.Counter(A)
#print(c)
ans = 0
for i in c:
  if c[i] % 2 != 0:
    ans += 1
print(ans)
# Judge status: Wrong Answer
from collections import Counter
import copy
from itertools import combinations


def A(x):
  return 'Yes' if x >= 30 else 'No'


def B(N, D, X, Y):
  ans = 0
  for i in range(N):
    Di = X[i]**2 + Y[i]**2
    if Di < D**2:
      ans += 1
  return ans


def main():
  N, D = map(int, input().split())
  X = []
  Y = []
  for i in range(N):
    Xi, Yi = map(int, input().split())
    X.append(Xi)
    Y.append(Yi)
  print(B(N, D, X, Y))


if __name__ == '__main__':
  main()
# Judge status: Accepted

N=int(input())

ok=False
count=0
for i in range(N):
    d1,d2=map(int, input().split())
    if d1==d2:
        count+=1
    else:
        count=0

    if count==3:
        ok=True
        break

if ok:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import sys
from itertools import permutations
def input(): return sys.stdin.readline().rstrip()
def main():
    n=int(input())
    P=tuple([int(_) for _ in input().split()])
    Q=tuple([int(_) for _ in input().split()])
    p_list=list(permutations(list(range(1,n+1))))
    print(abs(p_list.index(Q)-p_list.index(P)))

if __name__=='__main__':
    main()
# Judge status: Accepted
A, B, C = input().split()
A = int(A)
B = int(B)
C = int(C)
K = input()
K = int(K)
z = 0
while B <= A:
    B = B * 2
    z = z + 1
while C <= B:
    C = C * 2
    z = z + 1
if K < z:
    print('No')
else:
    print('Yes')
# Judge status: Accepted
#14:50
n = int(input())
a = list(map(int,input().split()))
ans = 0
now = 1
for i in range(n):
  if a[i] == now:
    now += 1
    ans += 1
if ans == 0:
  print(-1)
else:
  print(n-ans)
# Judge status: Wrong Answer
a = []
a = input().split(' ')

if 5 in a:
    a.remove(5)
    if 7 in a:
        a.remove(7)
        if 5 in a:
                print('YES')
        else:
            print('NO')
    else:
        print('NO')
else:
    print('NO')
# Judge status: Accepted
s = input()
n = len(s)
a = "10" * (n // 2) + "1" * (n % 2)
b = "01" * (n // 2) + "0" * (n % 2)

print(min(bin(int(s,2) ^ int(a, 2)).count("1") , bin(int(s, 2) ^ int(b, 2)).count("1")))
# Judge status: Wrong Answer
from collections import Counter
n=int(input())
s=[ input() for i in range(n)]
alf=list("abcdefghijklmnopqrstuvwxyz")
ans=dict()
for i in alf:
  ans[i]=1000
for i in s:
  sl=list(i)
  sl=Counter(sl)
  for j in alf:
    if not sl[j]:
      ans[j]=0
    elif ans[j]>sl[j]:
      ans[j]=sl[j]
s=""
for i in ans:
  if ans[i]!=0:
    s+=(i*ans[i])
print(s)
# Judge status: Wrong Answer
import sys
input=sys.stdin.readline

d=int(input())
C=list(map(int,input().split()))
S=[list(map(int,input().split())) for _ in range(d)]
A=[sorted([[j,S[i][j]] for j in range(26)],key=lambda x:x[1],reverse=True) for i in range(d)]


DP=[0]*26
for i in range(d):
    num,index=0,0
    for j in range(26):
        if A[i][j][1]-C[j]*(i-DP[j])>num:
            num=A[i][j][1]-C[j]*(i-DP[j])
            index=i
    print(index)
# Judge status: Wrong Answer
#!/usr/bin/env python3
import sys
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return map(int,input().split())
def LI(): return list(map(int,input().split()))

import numpy as np
def main():
    S,T = input().split()
    A,B = MAP()
    U = input()

    if S == U:
        print(A-1,B)
    else:
        print(A,B-1)

    return

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
import fractions
def myAnswer(N:int,A:list) -> int:
   A.sort()
   target = A.pop(0)
   for a in A:
      if(fractions.gcd(target,a)==1):
         return 1
   return target

def modelAnswer():
   return
def main():
   N = int(input())
   A = list(map(int,input().split()))
   print(myAnswer(N,A[:]))
if __name__ == '__main__':
   main()
# Judge status: Wrong Answer
import math
A,B=input().split()
ans=int(A)*float(B)
print(math.floor(ans))
# Judge status: Accepted
import math
n = int(input())
if n%2==1:
    print(0)
else:
    print(sum([n//(2*pow(5,i)) for i in range(1,math.ceil(math.log(n+1,5)))]))
# Judge status: Accepted
import math
n, x = map(int,input().split())
p = list(map(int,input().split()))
if n == 1:
    print(abs(p[0]-x))
else:
    g = math.gcd(p[0]-x,p[1]-x)
    for i in range(2,n):
        g = math.gcd(g,p[i]-x)
    print(g)
# Judge status: Wrong Answer
s = str(input())
t = str(input())
s = sorted(s)
t = sorted(t)
if(''.join(s) <= ''.join(t)):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import sys
# import math
# import decimal
# import queue
# import bisect
# import heapq
# import time
# import itertools
from fractions import Fraction

mod = int(1e9+7)
INF = 1<<29

def main():
    w = input()
    if len(w)%2!=0:
        print('No')
        return
    s = sorted(w)
    for i in range(0,len(s),2):
        if s[i]!=s[i+1]:
            print('No')
            return
    print('Yes')
    return

if __name__=='__main__':
    main()
# Judge status: Wrong Answer
N, M = map(int, input().split())
city = [input().split() for i in range(M)]
city_sorted = sorted(city, key=lambda x: (x[0],x[1]))

for i in range(M):
    A = city_sorted.index(city[i]) + 1
    pre = ['0', '0', '0', '0', '0', '0']
    C = ['0', '0', '0', '0', '0', '0']
    print(''.join((pre+list(city[i][0]))[-6:]+ (C+list(str(A)))[-6:]))
# Judge status: Wrong Answer
n,m = map(int,input().split())
a = n-m
ans = 0
if abs(a) > 1:
    ans = 0
elif abs(a) == 1:
    x = 1
    if a < 0:
        s = n
    else:
        s = m
    for i in range(1,m+1):
        x *= i % (10**9+7)
    ans = x * (x *(i+1)) %(10**9+7)
else:
    x = 1
    for i in range(1,n+1):
        x *= i % (10**9+7)
    ans = 2*x **2  %(10**9+7)
print(ans)
# Judge status: Wrong Answer
n = int(input())
A = list(map(int, input().split()))
mini = 40000*100
for n in range(-100,100):
    cost = 0
    for item in A:
        cost += (item-n)**2
    if cost < mini:
        mini = cost
print(mini)
# Judge status: Accepted
from collections import deque
n, m = map(int, input().split())
ab = [[] for i in range(n+1)]

for i in range(m):
  a, b = map(int,input().split())
  ab[a].append(b)
  ab[b].append(a)

ans = [-1]*(n+1)
que = deque([1])

while que:
  q = que.popleft()
  for i in ab[q]:
    if ans[i] == -1:
      que.append(i)
      ans[i] = q

print("Yes")

for i in range(2,n+1):
  print(ans[i])
# Judge status: Accepted
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

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

L = [0]*(N+1)
R = [0]*(N+1)

for i in range(N):
    L[i+1] = gcd(L[i], A[i])
    R[N-i-1] = gcd(R[N-i], A[N-i-1])
    
M = []
for i in range(N):
    M.append(gcd(L[i],R[i+1]))

print(max(M))
# Judge status: Accepted
n=int(input())
P=list(map(int,input().split()))
ans=0
minp=n+1
for i in range(n):
    minp=min(minp,P[i])
    if minp==P[i]:
        ans+=1
print(ans)
# Judge status: Wrong Answer
from math import floor, ceil
h, w = map(int, input().split())

ans = 0

ans += floor(h / 2) * floor(w / 2)
ans += ceil(h / 2) * ceil(w / 2)

print(ans)
# Judge status: Accepted
d,t,s=map(int,input().split())
x=s*t-d
if x>=0:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
q,h,s,d = map(int,input().split())
n = int(input())
a = 0
if n%2 == 1:
  n -= 1
  a += 1
ans = n//2*min(8*q,4*h,2*s,d)+a*min(4*q,2*h,s,d)
print(ans)
# Judge status: Accepted
import random

name = input()
start = random.randint(0, len(name) - 3)
nickname = name[start:start + 3]
print(nickname)
# Judge status: Wrong Answer
N,M=map(int,input().split())
if N==M:
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
a,b=map(int,input().split())
print("No") if a*b%2>0 else print("Yes")
# Judge status: Accepted
from fractions import gcd

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

def lcm(x, y):
    return (x * y) // gcd(x, y)

print(lcm(A, B))
# Judge status: Wrong Answer
n = int(input())
x = list(map(int, input().split()))

total = sum(x)
for i in range(n):
  avg = (total - x[i])/(n-1)
  ans = 10**9
  for j in range(n):
    if i == j: continue
    if abs(avg - x[j]) < abs(avg - ans): ans = x[j]
  print(ans)
# Judge status: Wrong Answer
n = int(input())

count = 0

for a in range(1, n):
  for b in range(1, n):
    if(a == b):
      break
    ah = str(a)[0]
    al = str(a)[-1]
    bh = str(b)[0]
    bl = str(b)[-1]
    if ah == bl and bh == al:
      count += 1
    
print(count)
# Judge status: Wrong Answer
N, M = map(int, input().split())
A = []
for i in range(N):
    A.append(list(map(int, input().split())))
    
s = set(list(A[0]))
for i in range(N):
    _s = set(A[i])
    s &= _s

print(len(s))
# Judge status: Wrong Answer
n = int(input())
list = [input() for _ in range(n)]
a = 'Yes'
if len(set(list))!=n:
    ans = 'No'
for i in range(n-1):
    if list[i][-1]!=list[i+1][0]:
        a = 'No'
print(a)
# Judge status: Accepted
n = int(input())
s = input() #sys.stdin.readlineは最後が改行

rcount = 0
rmargin = 0
lcount = 0
lmargin = 0
for i in range(n):
    if s[i] == ')':
        if rmargin ==0: rcount +=1
        else: rmargin -= 1
    else: rmargin +=1

    if s[-1-i] == '(':
        if lmargin ==0: lcount +=1
        else: lmargin -= 1
    else: lmargin +=1

ans = '('*rcount + s + ')'*lcount
print(ans)
# Judge status: Wrong Answer
N, M = map(int, input().split())
if N > M:
    print(0)
    exit()
X = list(map(int, input().split()))
X.sort()
leng = []
for i in range(1, M):
    leng.append(X[i] - X[i-1])
leng.sort()
print(sum(leng[:M-3]))
# Judge status: Wrong Answer
import numpy
a = input().split()
b = input().split()
c = input().split()


A = numpy.array((a,b,c), dtype=int)
A.shape = (3, 3)

N = int(input())
counter = 0
while N > 0:
    B = int(input())
    for i in range(3):
        for j in range(3):
            if B == A[i][j]: 
                counter += 1
    N -= 1
if counter > 0:
    print("Yes")
else: 
    print("No")
# Judge status: Accepted
N = int(input())
D = [None] * N
for i in range(N):
    D[i] = list(map(int, input().split()))
for i in range(N-2):
    for j in range(3):
        if D[i+j][0] != D[i+j][1]:
            break
    else:
        print('Yes')
        exit()
print('No')
# Judge status: Accepted
S=input()
T=input()

a=T.find(S)

if (S in T) and a==0:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-


# 整数の入力
n = int(input())
# スペース区切りの整数の入力
zzz = list(map(int, input().split()))
b=sum(zzz)**2
a=0
for i in range(n):
  # print(i)
  x=zzz[i]**2
  print(x)
  a +=x
# print(b)
# for a in zzz:
#   print(a)

# print(b)
# print(a)

ans = (b-a)//2%(10**9+7)
print(ans)
# Judge status: Accepted
N, M = map(int, input().split())

if N >= 2:
  N -= 2
  
if M >= 2:
  M -= 2

print(N*M)
# Judge status: Wrong Answer
A = list(map(int, input().split()))
print(A[0] % A[1])
# Judge status: Accepted
import sys
N = int(sys.stdin.readline().rstrip())
S = list(map(str, sys.stdin.readline().rstrip()))

left = [None] * N
right = [None] * N
tmp_white,tmp_black = 0,0
for i in range(N):
	if S[i] == '#':
		tmp_black += 1
	left[i] = tmp_black

for i in range(N):
	if S[-(i+1)] == '.':
		tmp_white += 1
	right[-(i+1)] = tmp_white

ans = min(left[-1], right[0])

for i in range(1,N):
	ans = min(ans, left[i-1] + right[i])

print(ans)
# Judge status: Accepted
N = int(input())
A = sorted(a-i-1 for i,a in enumerate(map(int,input().split())))
print(sum(abs(a-A[N//2]) for a in A))
# Judge status: Accepted
a,b=map(int,input().split())
ct=0
c=list(map(int,input().split()))
point=[0]*(len(c)+1)
for i in range(b):
    l,s=map(int,input().split())
    l-=1
    s-=1
    if c[l]>c[s]:
        point[s]+=1
    elif c[l]<c[s]:
        point[l]+=1
    else:
        point[s]+=1
        point[l]+=1
print(point.count(0)-1)
# Judge status: Wrong Answer
N = int(input())
cnt = 0
for i in range(1, N + 1):
    k = 0
    for j in range(1, N + 1):
        if i % j == 0:
            k += 1
    if k == 8:
        cnt += 1
# Judge status: Accepted
import math
N = int(input())
if N == 1:
  print(0)
  exit()
con = 0
for i in range(1,N):
  if N % i == 0:
    con += N // i - 1
  else:
    con += N // i
print(con)
# Judge status: Wrong Answer
import os

def main():
    count = int(input())
    int_list = list(map(int, input().split()))
    int_min,int_max = min(int_list),max(int_list)
    score = 0

    int_avg = int(sum(int_list) / len(int_list)) + 1
    print(int_avg)
    for i in int_list:
        score += (i - int_avg)**2
    print(score)

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
N,K=map(int,input().split())
h=list(map(int,input().split()))
dp=[10000]*N
dp[0]=0

#配るDP作戦 dp[i]の値が分かっている場合にdp[i]を用いてdp[i+1],dp[i+2]...を更新
for i in range(N):
    for k in range(1,min(K+1,N-i)):
        dp[i+k]=min(dp[i+k],dp[i]+abs(h[i]-h[i+k]))
        # print("i=",i,"  dp=",dp)
print(dp[-1])
# Judge status: Accepted
N = int(input())
l = list(map(int,input().split()))
l_ans = [[] for _ in range(201)]

for i in range(-100,101):
    sum = 0

    for j in range(N):
        sum = sum + (i-l[j])**2

    l_ans[i+100] = sum

print(min(l_ans))
# Judge status: Accepted
k,x = map(int, input().split())
print(*[i for i in range(x-(k-1), x+k)], sep=' ')
# Judge status: Wrong Answer
x=int(input())

while True:
    cnt=0
    if x%2==0:
        x+=1
        continue
    for i in range(2,x):
        if x%i==0:
            cnt=1
            continue
    if cnt==1:
        x+=1
    else:
        print(x)
        break
# Judge status: Accepted
A, B, M = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
xyc = [list(map(int, input().split())) for _ in range(M)]
ans_kouho = [min(a)+min(b)] + [a[x-1]+b[y-1]-c for x, y, c in xyc]
print(min(ans_kouho))