Problem:


Score : 100 points

Problem Statement

A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.

Given a string S, determine whether it is coffee-like.

Constraints

S is a string of length 6 consisting of lowercase English letters.

Input

Input is given from Standard Input in the following format:

S

Output

If S is coffee-like, print Yes; otherwise, print No.

Sample Input 1

sippuu

Sample Output 1

Yes

In sippuu, the 3-rd and 4-th characters are equal, and the 5-th and 6-th characters are also equal.

Sample Input 2

iphone

Sample Output 2

No

Sample Input 3

coffee

Sample Output 3

Yes



Sample input:
sippuu


Sample output:
Yes

Submission status: Runtime Error

Solution code:
s = input()
str3=inputs[2]
str4=inputs[3]
str5=inputs[4]
str6=inputs[5]

iscoffee=False
if str3==str4 and str5==str6:
    iscoffee=True
print(str(iscoffee))

Submission status: Runtime Error

Solution code:

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

diff = K + A[0] - A[-1]

for i in range(N-1):
    diff = max(diff , A[i+1]-A[i])

print(K-diff)

Submission status: Runtime Error

Solution code:
a=input()
for i in range(0,int(len(a))):
  if(a[2]==a[3]):
	if(a[4]==a[5]):
      print("YES")
    else:
      print("NO")
  else:
    print("NO)

Submission status: Runtime Error

Solution code:
a,b=divmod(int(input()),500)
print(a*1000+(b//5)*5)

Submission status: Runtime Error

Solution code:
S=int(input())
a=S//500
b=S%500
c=b//5
print(a*1000+c*5)

Submission status: Runtime Error

Solution code:
S=input()
If S[2]==S[3] and S[4]==S[5]:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
S = input()
If S[2]=S[3] and S[4]=S[5]:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
def main():
  word = input()
  if (word[2]==word[3]) and (word[4]==word[5]):
    print("Yes")
  else:
    print("No")
    
 main()

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# get a integer
a = input()
# output
if len(a) == 6 and a[2] == a[3] and a[4] == a[5]:
	print('Yes')
else
	print('No')

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# get a integer
a = raw_input()
# output
print(len(a) == 6 and a[2] == a[3] and a[4] == a[5])

Submission status: Runtime Error

Solution code:
money = int(input())
 
happy = 0
 
happy += int((money / 500) * 1000)
 
money -= (money / 500) * 500
 
happy += int((money / 5) * 5)
 
print(happy)

Submission status: Runtime Error

Solution code:
string = input()

if string[2] == string[3] and string[4] == string[5]:
  print 'Yes'
else:
  print 'No'

Submission status: Runtime Error

Solution code:
x = input()
 
happyPoints = 0
 
y = x - (x % 500)
 
if x % 500 !== x:
  happyPoints += (x/500)*1000
  	if y % 5 !== y:
      z = y - (y % 5)
      happyPoints += y
elif x % 5 !== x:
  w = x - (x % 5)
  happyPoints += w
 
  print(happyPoints)

Submission status: Runtime Error

Solution code:
s = input()

if s[2] == s[3] & s[4] == s[5]:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
if s[2] == s[3] & s[4] == s[5]:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
S = input()
if S[2] == S[3] and S[4] == S[5]: 
  print("yes")
else: 
  print("No)

Submission status: Runtime Error

Solution code:
S[] = input()
if S[2] == S[3]:
    if S[4] == S[5]:
        print(Yes)
    else:
        print(No)
else:
    print(No)

Submission status: Runtime Error

Solution code:
input_words = input()
if input_words == s:
  print("Yes")
else :
  print("No")

Submission status: Runtime Error

Solution code:
k,n = map(int,input().split())
A = list(map(int,input().split()))
A.append(k)
A.sort()
m = max(y-x for x,y in zip(A,A[1:]))
ans = k-m
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np
k,n = map(int,input().split())
A = list(map(int,input().split()))
A.append(k)
A.sort()
dist = np.diff(A)
ans = k-max(dist)
print(ans)

Submission status: Runtime Error

Solution code:
S = input('Enter something: ')
if S[2] == S[3] and S[4] == s[5]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
if S[2]==S[3]:
    if S[4]==S[5]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:
from functools import *
from collections import *
import sys
sys.setrecursionlimit(10**6)
input = sys.stdin.buffer.readline
 
M = 10**9+7

@lru_cache(maxsize=None)
def mod_inv(x):
  if x == 1:
    return 1
  return M // x * -mod_inv(M%x) % M

@lru_cache(maxsize=None)
def calc_subtree(v):
  ret = 1
  size = 1
  for child in Edge[v]:
    Edge[child].remove(v)
    r, s = calc_subtree(child)
    ret = ret * r % M
    size += s
  ret = ret * size % M
  return ret, size

ans = {}
def set_ans(v, a):
  ans[v] = a
  for child in Edge[v]:
    n = calc_subtree(child)[1]
    set_ans(child, ans[v] * n * mod_inv(N-n) % M)

N = int(input())
Edge = defaultdict(set)
fact = N
for i in range(1, N):
  fact = fact * i % M
  a, b = map(int, input().split())
  Edge[a].add(b)
  Edge[b].add(a)

set_ans(1, mod_inv(calc_subtree(1)[0]) * fact % M)
for i in range(1, N+1):
  print(ans[i])

Submission status: Runtime Error

Solution code:
if s[2] == s[3] and s[4] == s[5]:
    print('Yes')

Submission status: Runtime Error

Solution code:
l = input("Enter: ")
if len(l)<= 6 and l==[a-z]:
	print("Yes" if (l[2]==l[3] and l[4]==l[5]) else "No")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import queue

n, x, y = map(int, input().split())
x -= 1
y -= 1
INF = 10010101010101
ans = [0]*n
def put(v, d):
    if dist[v] != INF:
        return
    dist[v] = d
    q.put(v)
for sv in range(n):
    q = queue.Queue()
    dist = [INF for _ in range(n)]
    put(sv, 0)
    while not q.empty():
        v = q.get()
        d = dist[v]
        if v-1 >= 0:
            put(v-1, d+1)
        if v+1 < n:
            put(v+1, d+1)
        if v == x:
            put(y, d+1)
        if v == y:
            put(x, d+1)
    for i in range(n):
        ans[dist[i]] += 1
for i in range(n):
    ans[i] = int(ans[i] / 2)

print(*ans[1:], sep='\n')

Submission status: Runtime Error

Solution code:
l = input("Enter: ")
print("Yes" if (l[2]==l[3] and l[4]==l[5] else "No"))

Submission status: Runtime Error

Solution code:
S=input()
if S[2]==s[3] and S[4]==s[5]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
s=int(input())
if s[2]==s[3] and s[4]==s[5]:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
S = input()
if S[2] == S[3] && S[4] == S[5]:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
A = input().strip()
if(A[2] == A[3] and A[4] == A[5])
    print("Yes")
else
    print ("no")

Submission status: Runtime Error

Solution code:
A = input().strip()
if(A[3] == A[4] and A[5] == A[6])
    print("Yes")
else
    print ("no")

Submission status: Runtime Error

Solution code:
s = input()
return s[2]==s[3] and s[4] == s[5]

Submission status: Runtime Error

Solution code:
s=input()
if s[3]==s[4] or s[5]==s[6]:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
S = input()
if S[2] == S[3] and S[4] == S[5]:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
S = input()
if S[2] = S[3] and S[4] = S[5]:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
S = input()
if S[2] = S[3] and S[4] = S[5]:
  print(Yes)
else if:
  print(No)

Submission status: Runtime Error

Solution code:
s = input()

s.split()
    if s[2] == s[3] and s[4] == s[5]:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

Solution code:
X = int(input())
 
ans = (X//500)*1000
ans += ((X % 500)//5) * 5
 
print(ans)

Submission status: Runtime Error

Solution code:
S = input()
SS = S/500
SSS = (S%500)/5
print(1000*SS + 5*SSS)

Submission status: Runtime Error

Solution code:
S = int(input())
SS = S//500
SSS = (S%500)//5
print(1000*SS + 5*SSS)

Submission status: Runtime Error

Solution code:
S = int(input())
S500 = S/500
S5 = (S%500)/5
print(1000*S500 + 5*S5)

Submission status: Runtime Error

Solution code:
S = int(input())

S500 = S/500

S_nokori = S%500

S5 = S_nokori/5

print(1000*S500 + 5*S5)

Submission status: Runtime Error

Solution code:
# maintain overall min 
# iterate over two loops 
# find the absolute distance and before exiting the first maintain overall min
# also check the distance of last and first house
def findDistBetween(i,j):
    return abs(i - j)

def minDistfindDistBetweenLastAndFirstHouse(i,j):
    dist = findDistBetween(i, j)
    return K - dist 

K, N = input().split()
As = input().split()

K = int(K)
N = int(N)

# print ("As is")
# print (As)
# print (As.split())
A = [0] * len(As)
for i in range(len(As)):
    A[i] = int(As[i])
    
# A = list(map(lambda x: int(x), As))
# print (A)
# overAllMin = float('inf')
# minDist = 0 
# for i in range(N):
#     minDist = 0
#     for j in range(N):
#         # print (i, j)
#         minDist += findDistBetween(A[i], A[j])
#     # find the dist b/w last and first house
#     # minDist2 = minDistfindDistBetweenLastAndFirstHouse(A[0], A[-1])
#     # minDist = min(minDist, minDist2)
#     print ("Min dist", minDist)
#     # print ("min dist2", minDist2)
#     overAllMin = min(overAllMin, minDist)

# print (overAllMin)
overAllMin = float('inf')
Arev = list(reversed(A))
dist1 = 0 
dist2 = 0
prevHouse = -1
for i in range(N):
    # print ("PRev house", prevHouse)
    # print ("Next house", A[i])

    dist1 = max(findDistBetween(A[i], prevHouse), dist1)
    prevHouse = A[i]
    

ma = max(dist1, minDistfindDistBetweenLastAndFirstHouse(A[0], A[-1]))
print (K - ma)
# for i in range(N):
#     count = 0
#     curHouse = A[i]
#     j = i
#     flag0 = 0 
#     flag1 = 0
#     dist1 = 0 
#     dist2 = 0
#     while count < N:
#         if flag0 is 0:
#             dist1 += findDistBetween(curHouse, A[j])
#         curHouse = A[j]
#         j += 1
#         flag0 = 0
#         count += 1

#         if j == N and count < N: 
#             print ("in condition")
#             j = 0
#             dist1 += minDistfindDistBetweenLastAndFirstHouse(A[0], A[-1])
#             flag0 = 1
        
        # count += 1

        # print ("dist1", dist1)

    # count = 0
    # curHouse = A[i]
    # j = i
    # while count < N:
    #     if flag1 is 0:
    #         dist2 += findDistBetween(curHouse, A[j])
    #     curHouse = A[j]
    #     j -= 1
    #     count += 1
    #     flag1 = 0
    #     if j == -1 and count < N: 
    #         j = N - 1 
    #         dist2 += minDistfindDistBetweenLastAndFirstHouse(A[0], A[-1])
    #         flag1 = 1
    #     # count += 1 
# overAllMin = min(dist1, K - findDistBetween(A[0], A[-1]), overAllMin)
# print (dist1,  K - findDistBetween(A[0], A[-1]), overAllMin)
        
# print (overAllMin)

Submission status: Runtime Error

Solution code:
# maintain overall min 
# iterate over two loops 
# find the absolute distance and before exiting the first maintain overall min
# also check the distance of last and first house
def findDistBetween(i,j):
    return abs(i - j)

def minDistfindDistBetweenLastAndFirstHouse(i,j):
    dist = findDistBetween(i, j)
    return K - dist 

K, N = input().split()
As = input().split()

K = int(K)
N = int(N)

print ("As is")
print (As)
# print (As.split())
A = [0] * len(As)
for i in range(len(As)):
    A[i] = int(As[i])
    
# A = list(map(lambda x: int(x), As))
# print (A)
# overAllMin = float('inf')
# minDist = 0 
# for i in range(N):
#     minDist = 0
#     for j in range(N):
#         # print (i, j)
#         minDist += findDistBetween(A[i], A[j])
#     # find the dist b/w last and first house
#     # minDist2 = minDistfindDistBetweenLastAndFirstHouse(A[0], A[-1])
#     # minDist = min(minDist, minDist2)
#     print ("Min dist", minDist)
#     # print ("min dist2", minDist2)
#     overAllMin = min(overAllMin, minDist)

# print (overAllMin)
overAllMin = float('inf')
Arev = list(reversed(A))
dist1 = 0 
dist2 = 0
prevHouse = -1
for i in range(N):
    #print ("PRev house", prevHouse)
    #print ("Next house", A[i])

    dist1 = max(findDistBetween(A[i], prevHouse), dist1)
    prevHouse = A[i]
    

ma = max(dist1, minDistfindDistBetweenLastAndFirstHouse(A[0], A[-1]))
print (K - ma)
# for i in range(N):
#     count = 0
#     curHouse = A[i]
#     j = i
#     flag0 = 0 
#     flag1 = 0
#     dist1 = 0 
#     dist2 = 0
#     while count < N:
#         if flag0 is 0:
#             dist1 += findDistBetween(curHouse, A[j])
#         curHouse = A[j]
#         j += 1
#         flag0 = 0
#         count += 1

#         if j == N and count < N: 
#             print ("in condition")
#             j = 0
#             dist1 += minDistfindDistBetweenLastAndFirstHouse(A[0], A[-1])
#             flag0 = 1
        
        # count += 1

        # print ("dist1", dist1)

    # count = 0
    # curHouse = A[i]
    # j = i
    # while count < N:
    #     if flag1 is 0:
    #         dist2 += findDistBetween(curHouse, A[j])
    #     curHouse = A[j]
    #     j -= 1
    #     count += 1
    #     flag1 = 0
    #     if j == -1 and count < N: 
    #         j = N - 1 
    #         dist2 += minDistfindDistBetweenLastAndFirstHouse(A[0], A[-1])
    #         flag1 = 1
    #     # count += 1 
# overAllMin = min(dist1, K - findDistBetween(A[0], A[-1]), overAllMin)
# print (dist1,  K - findDistBetween(A[0], A[-1]), overAllMin)
        
# print (overAllMin)

Submission status: Runtime Error

Solution code:
K, N = map(int,input().split())
A = list(map(int, input().split()))
List = []

for i in range(1, N):
  List.append(A[i] - A[i-1])
  
d = K - A[-1] + A[0]
List.append(d)
List.sort()
print(sum(List[:-1]))

Submission status: Runtime Error

Solution code:
X,Y,A,B,C=map(int,input().split())
p=sorted(list(map(int,input().split())))
q=sorted(list(map(int,input().split())))
r=sorted(list(map(int,input().split())))
for i in range(min(X,Y)):
  if p[A-X+i] > q[B-Y+i]:
    if r[-1] >= q[B-Y+i]:
      del q[B-Y+i]
      q.insert(B-Y+i,r[-1])
      del r[-1]
      r.insert(0,0)
      if r[-1] > p[A-X+i]:
        del p[A-X+i]
        p.insert(A-X+i,r[-1])
        del r[-1]
        r.insert(0,0)
  else:
    if r[-1] > p[A-X+i]:
      del p[A-X+i]
      p.insert(A-X+i,r[-1])
      del r[-1]
      r.insert(0,0)
      if r[-1] > q[B-Y+i]:
        del q[B-Y+i]
        q.insert(B-Y+i,r[-1])
        del r[-1]
        r.insert(0,0)
if X>Y:
  for j in range(X-Y):
    if p[A-X+Y+j] < r[-1]:
      del p[A-X+Y+j]
      p.insert(A-X+Y+j,r[-1])
      del r[-1]
      r.insert(0,0)
if X<Y:
  for j in range(Y-X):
    if q[B-Y+X+j] < r[-1]:
      del q[B-Y+X+j]
      q.insert(B-Y+X+j,r[-1])
      del r[-1]
      r.insert(0,0)
P=sorted(p)
Q=sorted(q)
sc=0
for k in range(X):
  sc+=P[A-X+k]
for l in range(Y):
  sc+=Q[B-Y+l]
print(sc)

Submission status: Runtime Error

Solution code:
import numpy as np


from collections import deque
class Graph:
    edges = {}

    def append_edge(self, sv, ev, weight = 1):
        if sv in self.edges:
            self.edges[sv].append((ev, weight))
        else:
            self.edges[sv] = [(ev, weight)]

    def bfs(self, sv):
        dist = np.full(len(self.edges.keys()), -1)
        q = deque([])   # キュー
        q.append(sv)
        dist[sv] = 0
        connect_vtxs = []
        while len(q) > 0:
            p = q.popleft()     # キュー取りだし（先頭）
            connect_vtxs.append(p)
            for (ev, w) in self.edges[p]:
                if dist[ev] != -1:
                    continue
                q.append(ev)    # キュー追加
                dist[ev] = dist[p] + 1
        return dist, connect_vtxs

N, X, Y = list(map(int, input().split()))
g = Graph()
for i in range(N - 1):
    g.append_edge(i, i + 1)
    g.append_edge(i + 1, i)
g.append_edge(X - 1, Y - 1)
g.append_edge(Y - 1, X - 1)
dist_cnt = np.zeros(N)
for sv in range(N):
    dist, connect_vtxs = g.bfs(sv)
    for j in range(dist.shape[0]):
        if dist[j] == -1: continue
        dist_cnt[dist[j]] += 1

for i in range(N-1):
    print(int(dist_cnt[i+1]/2))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys

MAX_INT = 2**62-1
sys.setrecursionlimit(10**6)

input = sys.stdin.readline


def solve(g, f, fi, m):
    def dfs(pre, cur, memo, m):
        if (pre, cur) in memo:
            return memo[pre, cur]

        num, ways = 1, 1

        for nxt in g[cur]:
            if nxt == pre:
                continue
            n, w = dfs(cur, nxt, memo, m)
            num += n
            ways = ways * w % m * fi[n] % m

        ways = ways * f[num-1] % m
        memo[pre, cur] = num, ways
        return num, ways

    memo = {}
    print(*[dfs(None, i, memo, m)[1] for i in range(1, len(g))], sep='\n')


def main():
    n = int(input())
    g = [[] for _ in range(n+1)]
    mod = 10**9 + 7

    fact = [1] * (n+1)
    fact_inv = [1] * (n+1)

    for i in range(1, n+1):
        fact[i] = fact[i-1] * i % mod

    fact_inv[-1] = pow(fact[-1], mod-2, mod)

    for i in range(1, n)[::-1]:
        fact_inv[i] = fact_inv[i+1] * (i+1) % mod

    for _ in range(n-1):
        a, b = map(int, input().split())
        g[a].append(b)
        g[b].append(a)

    solve(g, fact, fact_inv, mod)


if __name__ == "__main__":

    main()

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys
from collections import defaultdict


MAX_INT = 2**62-1
sys.setrecursionlimit(10**6)

input = sys.stdin.readline


N = 2 * (10**5) + 1
MOD = 10**9 + 7

fact = [1] * N
fact_inv = [0] * N

for i in range(1, 2 * (10**5)+1):
    fact[i] = fact[i-1] * i % MOD
    fact_inv[i] = pow(fact[i], MOD-2, MOD)


def solve(g):
    def dfs(pre, cur):
        if pre in memo and cur in memo[pre]:
            return memo[pre][cur]

        num, ways = 1, 1

        for nxt in g[cur]:
            if nxt == pre:
                continue
            n, w = dfs(cur, nxt)
            num += n
            ways = ways * w % m * fi[n] % m

        ways = ways * f[num-1] % m
        memo[pre][cur] = num, ways
        return num, ways

    m = MOD
    memo = defaultdict(dict)
    f, fi = fact, fact_inv

    for i in range(1, len(g)):
        print(dfs(None, i)[1])


def main():
    n = int(input())
    g = [[] for _ in range(n+1)]

    for _ in range(n-1):
        a, b = map(int, input().split())
        g[a].append(b)
        g[b].append(a)

    solve(g)


if __name__ == "__main__":

    main()

Submission status: Runtime Error

Solution code:
K,N=map(int,input().split())
A=list(map(int,input().split()))
List=[]
for i in range(N):
  b=abs(A[i]-A[i-1])
  List.append(b)
SL=sorted(List)
print(K-SL[-1])

Submission status: Runtime Error

Solution code:
import sys
import queue
def main():
    input=sys.stdin.readline
    n,x,y=map(int,input().split())
    edge=[]
    for i in range(int(n)):
        tmp=[0 if i==j else 1 if abs(i-j)==1 else -1 for j in range(n)]
        edge.append(tmp)
    edge[x-1][y-1]=1
    edge[y-1][x-1]=1
    step=[0]*n#ある歩数の点の選び方をカウントする
    def bfs(start,graph,step):
        kyori={}#スタートからある点までの距離をある点をキーとして入れる
        que_check=[0]*n#queueに入ったかを記録する
        Tovis=queue.Queue()#探索待ちの点を入れるキュー
        Tovis.put(start)
        que_check[start]=1
        kyori[start]=0        
        while Tovis.empty()==False:            
            nex=Tovis.get()            
            for v in range(n):                
                tmp=graph[nex][v]
                if tmp!=-1:                    
                    if que_check[v]==1:
                        continue
                    Tovis.put(v)
                    que_check[v]=1
                    res=kyori[nex]+1
                    kyori[v]=res#点ｖまでの距離はその前に通った点までの距離+1
                    step[res]+=0.5#i->j j->iの二回数えてしまうので
    for i in range(n):
        bfs(i,edge,step)
    for i in range(1,len(step)):
        print(int(step[i]))
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
K,N=map(int,input().split())
A=list(map(int,input().split()))
d=0
for i in range(N-1):
  if d == 0 and A[i+1]-A[0] >= K/2:
    d=d+A[i]-A[0]+K-A[i+1]
if d == 0:
  d=d+A[N-1]-A[N-2]
print(d)

Submission status: Runtime Error

Solution code:
K,N=map(int,input().split())
A=list(map(int,input().split()))
d=0
for i in range(N-1):
  b=A[i+1]-A[i]
  if d == 0 and A[i+1]-A[0] >= K/2:
    d=d+A[i]-A[0]+K-A[i+1]
if d == 0:
  d=d+A[N-1]
print(d)

Submission status: Runtime Error

Solution code:
K,N=map(int,input().split())
A=list(map(int,input().split()))
d=0
for i in range(N-1):
  b=A[i+1]-A[i]
  if A[i+1]-A[0] >= K/2:
    d=d+A[i]-A[0]+K-A[i+1]
print(d)

Submission status: Runtime Error

Solution code:
if S[2] == S[3] and S[4] == S[5]:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
N, x, y = [int(i) for i in input().split()]

cnt = [0] * N
for i in range(1, N+1):
  for j in range(i+1, N+1):
    temp = min(abs(j-i), abs(x-i) + 1 + abs(j-y), abs(y-i) + 1 + abs(j-x))
    cnt[temp] += 1

for i in range(1, N):
  print(cnt[i])

Submission status: Runtime Error

Solution code:
S = coffee
if S is coffee-like
    return("Yes")
    else
    print("No")

Submission status: Runtime Error

Solution code:
s = str(input())
if (s[3]==s[4]) and (s[5]==s[6]):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
s = str(input())
if s[3]==s[4] and s[5]==s[6]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
k, n = map(int, input().split())

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

node = [An[i+1] - An[i]  for i in range(len(An) - 1)]

node = node[:] + [k - An[n-1] + An[0]]

print(k - max(node))

Submission status: Runtime Error

Solution code:
S = list(input())
S =[2:5:1]
coffee = ["f","f","e","e"]
  
if S == coffee:
    print("Yes")
else:
    print("no")

Submission status: Runtime Error

Solution code:
S = list(input())
coffee = ["c","o","f","f","e","e"]
if S == coffee:
    print("Yes")
  else:
    print("no")

Submission status: Runtime Error

Solution code:
n,x,y=map(int,input().split())
edge=[]
for i in range(int(n)):
    tmp=[0 if i==j else 1 if abs(i-j)==1 else -1 for j in range(n)]
    edge.append(tmp)
edge[x-1][y-1]=1
edge[y-1][x-1]=1
step=[0 for i in range(n)]#ある歩数の点の選び方をカウントする
def bfs(start,graph,step):
    kyori={}#スタートからある点までの距離をある点をキーとして入れる
    num=0
    Tovis=[start]
    kyori[start]=0
    visited=[]
    while Tovis:
        nex=Tovis.pop(0)
        visited.append(nex)
        for v in range(len(graph[nex])):
            tmp=graph[nex][v]
            if tmp!=-1:
                if v in visited:
                    continue
                if  v in Tovis:
                    continue
                Tovis.append(v)
                kyori[v]=kyori[nex]+1#点ｖまでの距離はその前に通った点までの距離+1
                step[kyori[v]]+=0.5#i->j j->iの二回数えてしまうので
for i in range(n):
    bfs(i,edge,step)
for i in range(1,len(step)):
    print(int(st

Submission status: Runtime Error

Solution code:
x = input()

if x[2] == x[3] && x[4] == x[5]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S = input()
if S[3]==S[4] and S[5]==S[6]:
  print "Yes"
else:
  print "No"

Submission status: Runtime Error

Solution code:
n = int(input())
cnt = (n // 1000) * 2000
n -= (n // 1000) * 1000
cnt += (n // 5) * 5
print(cnt)

Submission status: Runtime Error

Solution code:
S = input()
S = S.split()
if ((S[2]==S[3])&(S[4]==S[5])):
	print("Yes")
else: 
    print("No")

Submission status: Runtime Error

Solution code:
S = S.split()
if S[2]==S[3]:
  if S[4]==S[5]:
    return "Yes"
  else: return "No"
else: return "No"

Submission status: Runtime Error

Solution code:
S = S.split()
if (S[2]=="f")&(S[3]=="f"):
  if (S[4]=="e")&(S[5]=="e"):
    return Yes
  else: return No
else: return No

Submission status: Runtime Error

Solution code:
s = input()
if s[2] == s[3] and s[4] == s[5]:
  print("Yes")
elif
  print("No")

Submission status: Runtime Error

Solution code:
s = input()
if s[3] == s[4] and s[5] == s[6]:
  print("Yes")
elif
  print("No

Submission status: Runtime Error

Solution code:
# coding: UTF-8
import os

def remove_empty(target_list: list):
    empty_removed_list = [x for x in target_list if x]
    return empty_removed_list

def get_stdin_str_list():
    input_str = input().strip()
    input_str_list = input_str.split()
    return input_str_list

def get_stdin_int_list():
    input_str_list = get_stdin_str_list()
    input_int_list = list(map(input_str_list, int))
    return input_int_list


S = get_stdin_str_list()
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
s=input()
if s[2]==s[3] and s[4]==s[5]:
    print("Yes")
elif
    print("No")

Submission status: Runtime Error

Solution code:
                                                                                                                           
s = input()                                                                                                                
                                                                                                                           
if s[2] == s[3] and s[4] == s[5]:                                                                                          
    print("Yes")                                                                                                           
else:                                                                                                                      
    print("No")                                                                                                            
abc160_a.py (END)

Submission status: Runtime Error

Solution code:
test = input()
for test in 6
 print(test)

Submission status: Runtime Error

Solution code:
a=list(input())
if a[2]==a[3] and a[4]==a[5]:
  print('Yes')
else:
  prin('No')

Submission status: Runtime Error

Solution code:
S = input()
if S[3] == S[4] and S[5] == S[6]:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
S = input()
if S[3] == S[4] and S[5] == S[6]:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
s = input()
if  s[3] == s[4] and s[5] == s[6]:
  print('yes')
else:
  print('no')

Submission status: Runtime Error

Solution code:
input_value = input()

return (input_value[2] == input_value[3]) and (input_value[4] == input_value[5])

Submission status: Runtime Error

Solution code:
s = input()
if  s[3] == s[4] and s[5] == s[6]:
  print(yes)
else:
  print(no)

Submission status: Runtime Error

Solution code:
input()
s = [input()]
if s[3] == [4] and s[5] == s[6]:
  print('yes')
else:
  print('no')

Submission status: Runtime Error

Solution code:
s = input()
if (s[3] == s[4]) and (s[5] == s[6]):
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
S = str(input())
if S[3] == S[4] and S[5] == S[6]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a = input()
if (a[2] == a[3]) and (a45] == a[5]):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a = input()
if (a[3] == a[4]) and (a[5] == a[6]):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a,b,c,d,e,f=input().split()
if c==d and e==f:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
coffee = input()

if coffee[2] = coffee[3] and coffee[4] = coffee[5]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
# 入力
N, X, Y = map(int, input().split())
Graph = [[] for _ in range(N)]
for i in range(N):
    if i < N - 1:
        Graph[i].append(i + 1)
        Graph[i + 1].append(i)
    if X == i:
        Graph[X - 1].append(Y - 1)
        Graph[Y - 1].append(X - 1)
# print(Graph)
ans = [0] * (N - 1)
from collections import deque
# 全ての点からDFSを行い、最短距離を求める
for i in range(N):
    dist = [-1]*N
    que = deque([i])
    dist[i] = 0
    while que:
        v = que.popleft()
        d = dist[v]
        for w in Graph[v]:
            if dist[w] > -1:
                continue
            dist[w] = d + 1
            que.append(w)
    # print(dist)
    # 最短距離の個数をansに格納する
    for d in dist:
        if d > 0:
            ans[d - 1] += 1
# 全ての点からの最短距離を格納した。
# 条件1 <= i < j <= Nより、1 => 2はカウントするが、2 => 1はカウントしない。
# そのため、2で割って帳尻合わせを行う。
for a in ans:
    print(a // 2)

Submission status: Runtime Error

Solution code:
K,N = map(int,input().split())
li = list(map(int,input().split()))
maxd=(K-li[N-1])+li[0]
for i in range(N-1):#i番目の家を出発地にした時の最小距離を順に求めていく
  maxd=max(maxd, li[i+1]-li[i]) 
print(K-maxd)

Submission status: Runtime Error

Solution code:
S = input()

if S[3] == S[4] and S [5] == S[6]:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
N, x, y = map(int, input().split())

out = [0] * (N)

for i in range(1,N):
    for j in range(i+1,N+1):
        # i,jの距離を求める ３パーターンのうち一番短いパターン
        # i→jパターン abs(j-i)
        # i→x→y→jパターン abs(i-x)+1+abs(j-y)
        # i→y→x→jパターン abs(i-y)+1+abs(j-x)
        dist = min(abs(j-i), abs(i-x)+1+abs(j-y), abs(i-y)+1+abs(j-x))
        out[dist] += 1

for i in range(1,N):
    print(out[i])

Submission status: Runtime Error

Solution code:
# Problem D - Line++

# input
N, X, Y = map(int, input().split())

# initialization
INF = N
kyori_graph = [[INF]*N for i in range(N)]
kosu_list = [0]*(N-1)

# graph search
for i in range(N):
    for j in range(i+1, N):
        # グラフの更新
        kyori_graph[i][j] = min(abs(j-i), abs(X-1-i)+1+abs(j-(Y-1)))
        # abs((Y-1)-i)+1+abs(j-(X-1))

# 個数の数え上げ
for i in range(N):
    for j in range(i+1, N):
        kyori = kyori_graph[i][j]
        kosu_list[kyori-1] += 1

# output
for k in kosu_list:
    print(k)

Submission status: Runtime Error

Solution code:
def solve():
  val = str(input())
  return val[2] == val[3] && val[4] == val[5]
solve();

Submission status: Runtime Error

Solution code:
s = input()
if len(s) != 6 or not s.islower() or s[3] != s[4] or s[5] != s[6]:
  print("NO")
else:
  print("YES")

Submission status: Runtime Error

Solution code:
k,n=map(int,input().split())
a=[]
a=list(map(int,input().split()))
dis=[]
dis.append(a[0]+(k-a[n-1]))
for i in range(n-1):
    dis.append(a[i+1]-a[i])
print(k-min(dis))

Submission status: Runtime Error

Solution code:
s=[]
s=list(srt(input().split()))
if s[2]==s[3] and s[4]==s[5]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit=10**12

def modinv(a,m=10**9+7):
    if a==0: return 1
    else:
        b=m
        (x, lastx) = (0, 1)
        (y, lasty) = (1, 0)
        while b != 0:
            q = a // b
            (a, b) = (b, a % b)
            (x, lastx) = (lastx - q * x, x)
            (y, lasty) = (lasty - q * y, y)
        return lastx % m

def cur(p):
    if neighbor[p]==[]: return
    for x in neighbor[p]:
        par[x]=p
        neighbor[x].remove(p)
        cur(x)
    descend[par[p]]+=descend[p]

def cur2(p):
    for x in neighbor[p]:
        ans[x]=ans[p]*descend[x]*modinv(n-descend[x])
        ans[x]%=mod
        cur2(x)

mod=10**9+7
n=int(input())
neighbor=[set()  for _ in range(n+2)]
descend=[1 for i in range(n+1)]
par=[0]+[0]*(n+1)

for _ in range(n-1):
    a,b=map(int,input().split())
    neighbor[a].add(b)
    neighbor[b].add(a)

cur(1)


ans=[1]*(n+1)
ans1=1
for i in range(1,n+1):
    ans1=ans1*i*modinv(descend[i])
    ans1%=mod
ans[1]=ans1

cur2(1)

for i in range(1,n+1):
    print(ans[i])