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()

if s[2] == s[3] and s[4]== s[5]:
	print(‘Yes’)
else:
	print(‘No’)

Submission status: Runtime Error

Solution code:
k,n=map(int,input().split())
houses=list(map(int,input().split()))
houses.sort()
maxx=-float('INF')
for i in range(n-1):
    if houses[i+1]-houses[i]>maxx:
        maxx=houses[i+1]-houses[i]

maxx=max([maxx,k-(houses[-1]-houses[0])])
print(maxx)

Submission status: Runtime Error

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import lru_cache, reduce
from math import gcd
from operator import add, itemgetter, mul, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353

S = sys.stdin.buffer.readline().decode().rstrip()
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:
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[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:
if S[2]==S[3] and S[4]==S[5]:
  return "Yes"

return "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:
#! /usr/bin/env python3

from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement

S = input()

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

Submission status: Runtime Error

Solution code:
#! /usr/bin/env python3

# from fractions import gcd
from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement

S = input()

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

Submission status: Runtime Error

Solution code:
n=list(input())

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

Submission status: Runtime Error

Solution code:
n=list(input())

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

Submission status: Runtime Error

Solution code:
n=list(input())

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

Submission status: Runtime Error

Solution code:
n=list(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()

if n[2] == 'f' and n[3] == 'f' and n[4] == 'e' and n[5] = 'e':
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
T = input()
hit = 0
for i in range(3):
    if S[i] == T[i]:
        hit = hit + 1
print(hit)

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
if A == B == C:
    print(0 if A%2 else -1)
else:
    cnt = 0
    while A%2==0 and B%2==0 and C%2==0:
        A, B, C = (B+C)//2, (C+A)//2, (A+B)//2
        cnt += 1
    print(cnt)

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:
s = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input().split()
if S[2]==S[3] and S[4]==[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]ands[4]=s[5]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
#! env/bin/local python3
# -*- coding: utf-8 -*-

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,x,y = map(int,input().split())
ans = [0]*(n-1)
for i in range(n-1):
    for j in range(i+1,n):
        dis = min(j-i, abs(j-(x-1))+1+abs((y-1)-i), abs(j-(y-1))+1+abs((x-1)-i))
        ans[dis-1] += 1
for i in range(n-1):
    print(ans[i])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(1,n):
	ans = 0
	for j in range(1,n-i+1):
		if i+j <= x:
			ans += 1
			continue
		elif j >= y and i+j < n:
			ans += 1
			continue
		else:
			# x-j+1 = jからyまでの距離
			# y-i-j = yからi+j(目的地)までの距離
			#print(abs(x-j)+1+abs(y-i-j))
			if min(abs(x-j)+1+abs(y-i-j),i) == i:
				ans += 1
		num = i-(abs(x-j)+1)
		if num >= 0:
			d1 = y+num
			d2 = y-num
			if i+j < d1 and d1 <= n:
				ans += 1
			if i+j < d2 and d1 != d2:
				ans += 1
		#print(i,j,ans)
	print(ans)

Submission status: Runtime Error

Solution code:
S = list(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:
s = input()
for i in s:
  if s[2] == s[3] and s[5] == s[6]:
    print("Yes")
  else:
    print("No")

Submission status: Runtime Error

Solution code:
s = input()
for i in s:
  if s[i] == s[i+1]:
    print("Yes")
  else:
    print("No")

Submission status: Runtime Error

Solution code:
s = input()
sr = set(s)
if s[i]==sr[i]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
x = int(input())

num_500 = x / 500

amari = x - num_500

num_5 = int(amari / 5)

print(1000 * num_500 + 5 * num_5)

Submission status: Runtime Error

Solution code:
S = list(input())

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

Submission status: Runtime Error

Solution code:

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=list(map(str,input().split()))
if s[2]==s[3] and s[4]==s[5]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N, X, Y = map(int,input().split())
l = [0]*(N-1)
for i in range(1,N):
    for j in range(i+1,N+1):
        d=min(j-i,abs(X-i)+1+abs(Y-j),abs(Y-i)+1+abs(X-j))
        l[d-1] += 1
for k in range(N-1):
    print(l[k])

Submission status: Runtime Error

Solution code:
n,x,y = map(int,input().split())
m = {}
for i in range(1,n):
    m[i] = 0
for i in range(1,n):
    for j in range(i+1,n+1):
        dif = min(abs(j-i),(abs(x-i)+1+abs(j-y)),(abs(y-i)+1+abs(j-x)))
        m[dif]+=1
[print(m[i]) for i in range(1,n)]

Submission status: Runtime Error

Solution code:
N, X, Y = map(int,input().split())
l = [0]*(N-1)
for i in range(1,N):
    for j in range(i+1,N+1):
        d=min(j-i,abs(X-i)+1+abs(Y-j),abs(Y-i)+1+abs(X-j))
        l[d-1] += 1
for k in range(N-1):
    print(l[k])

Submission status: Runtime Error

Solution code:
N, X, Y = map(int,input().split())
l = [0]*(N-1)
for i in range(1,N):
    for j in range(i+1,N+1):
        d=min(j-i,abs(X-i)+1+abs(Y-j),abs(Y-i)+1+abs(X-j))
        l[d-1] += 1
for a in l:
    print(a)

Submission status: Runtime Error

Solution code:
X,Y,A,B,C=map(int, input().split())
plist=list(map(int, input().split())) 
qlist=list(map(int, input().split())) 
rlist=list(map(int, input().split())) 
plist.sort(reverse=True)
qlist.sort(reverse=True)

redlist = plist[:X]
greenlist = qlist[:Y]
RandG = redlist+greenlist+rlist
RandG.sort(reverse=True)
print(sum(RandG[:X+Y]))

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 = list(input())
if s[2] == s[3] and s[4] == s[5]:
  print("Yes")
  
else:
  print"No")

Submission status: Runtime Error

Solution code:
s = list(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:
    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:
from collections import defaultdict
N,X,Y = map(int,input().split())

k = defaultdict(lambda: 0)

for i in range(N-1):
    for j in range(i+1,N):
        dist = min( j-i , abs(X-1-i)+1+abs(Y-1-j) , abs(Y-1-i)+1+abs(X-1-j) )
        k[dist] += 1

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

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:4] == 'ff' and s[5:6] == 'ee'
    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()
s=str(S)
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,b,c,d,e,f=input()
if c=d,e=f:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
if s[2] == s[3] and s[4] == s[5]:
  return "Yes"
else:
  return "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:
https://atcoder.jp/contests/abc160/tasks/abc160_a

Submission status: Runtime Error

Solution code:
N, X, Y = map(int,input().split())
a = [0 for _ in range(N - 1)]

for lt in range(1, N+1):
    for rt in range(lt+1, N+1):
        a[min(rt-lt-1, abs(X-lt) + abs(Y-rt))] += 1

print(*a, sep="\n")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
letters = input()
if letters[2] == letters[3] && letters[4] == letters[5] :
    print('Yes')

else :
    print('No')

Submission status: Runtime Error

Solution code:
list=input().rstrip
if list[2]==list[3] and list[4]==list[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:
S=input().split()
if S[3]==S[4] and S[5]==S[6]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
X ,Y ,A ,B ,C = map(int,input().split())
p = list(map(int,input().split()))
q = list(map(int,input().split()))
r = list(map(int,input().split()))
p.sort(reverse = True)
q.sort(reverse = True)
r.sort(reverse = True)
p = p[:X]
q = q[:Y]
p.extend(q)
p.extend(r)
p. sort(reverse = True)
p = p[:A+B]
print(sum(p))

Submission status: Runtime Error

Solution code:
K, N = map(int,input().split())
A = list(map(int, input().split()))
a = A[0]
sub = []
for _ in range(N):
    p = A.pop()
    sub.append(K-p)
    K = p
sub[0] += a
sub.remove(max(sub))
print(sum(sub))

Submission status: Runtime Error

Solution code:
K, N = map(int,input().split())
A = list(map(int, input().split()))
sub = [A[0]+K-A[N-1]]
for _ in range(N-1):
    p = A.pop()
    sub.append(K-p)
    K = p
sub.remove(max(sub))
print(sum(sub))

Submission status: Runtime Error

Solution code:
s = str(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:
K,N=int(map(int,input().split()))
A=list(map(int,input().split()))
m=K
for j in range(len(a)):
  m=min(m,min(K-abs(A[j]-A[j-1]),K-abs(A[j]-A[j+1])))
print(m)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
print("Yes" if S[4] == S[5] and S[6] == S[7] 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=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:
if S[2]==S[3] and S[4]=S[5]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
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())
home_positions = list(map(int, input().split()))


def max_distance_homes(homes):
    max_distance = 0
    for i in range(len(homes) - 1):
        distance = homes[i + 1] - homes[i]
        if max_distance < distance:
            max_distance = distance
    distance = k + homes[0] - homes[-1]
    if max_distance < distance:
        max_distance = distance
    return max_distance


print(k - max_distance_homes(home_positions))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

space = []
for i in range(N-1):
    space.append(A[i+1] - A[i])
space.append(K - A[N-1] + A[0])
# print(space)

print(K - max(space))

Submission status: Runtime Error

Solution code:
str = input()

str[2] == str[3] and str[4] == str[5] ? 'Yes' : 'No'

Submission status: Runtime Error

Solution code:
str = input()

str[2] == str[3] and str[4] == str[5] ? 'Yes' : 'No';

Submission status: Runtime Error

Solution code:
str = input()

str[2] == str[3] && str[4] == str[5] ? 'Yes' : 'No';

Submission status: Runtime Error

Solution code:
S=input()
if

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
inp = input()
print('Yes' if inp[3] == inp[4] and inp[5] == inp[6] else '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 = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S=str(input())

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

Submission status: Runtime Error

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

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[2]=s[3] and s[4]=s[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 = input()
if (N[2] == N[3]) and (N[4] == N[5]):
  return True
else:
  return False

Submission status: Runtime Error

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

B = [K]*N
for i in range(N):
    B[i] += A[i]
    
C = A+B

for i in range(2*N):
    ans = 2*K
    l = 0
    if i<N:
        for j in range(N-1):
            l += C[i+j+1]-C[i+j]
        if l<ans:
            ans = l
    else:
        for j in range(N-1):
            l += C[i-j]-C[i-j-1]
        if l<ans:
            ans = l
            
print(ans)

Submission status: Runtime Error

Solution code:
word = map(str, input())

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

Submission status: Runtime Error

Solution code:
K, N = map(int, input().split())
lst = list(map(int, input().split()))

dist = lst[-1]-lst[0]
for i in range(N-1):
    dist = min(dist, K-lst[i+1]+lst[i])
print(dist)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(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[2] and s[5]==s[4]:
print('Yes')
else:
print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=list(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:
import queue

def push(n, dist, dist_list):
	if dist_list[n] > dist:
		dist_list[n] = dist
		q.put(n)



q = queue.Queue()
n, x, y = [int(i) for i in input().split()]
result = [0] * (n-1)

for p in range(n):
	dist_list = [111111] * n
	dist = 0
	q.put(p)
	dist_list[p] = dist 
	while not q.empty():
		p = q.get()
		dist = dist_list[p]
		if p+1 < n: push(p+1, dist+1, dist_list)
		if p-1 >= 0: push(p-1, dist+1, dist_list)
		if p == (x-1): push(y-1, dist+1, dist_list)
		if p == (y-1): push(x-1, dist+1, dist_list)
	
	for i in dist_list:
		if i != 0:
			result[i-1] += 1

for ans in result:
	print(ans//2)

Submission status: Runtime Error

Solution code:
x, y, a, b, c = map(int, input().split())
pn = list(map(int, input().split()))
qn = list(map(int, input().split()))
rn = list(map(int, input().split()))

pn.sort(reverse=True)
qn.sort(reverse=True)

pqr = pn[:x] + qn[:y] + rn
pqr.sort(reverse=True)
  
print(sum(pqr[:x+y]))

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[2] == s[3] and s[4] == s[5]:
    print("Yes")
else:
    pritn("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:
x, y, a, b, c = list(map(int, input().split(' ')))
p_list = sorted(list(map(int, input().split(' '))), reverse=True)
q_list = sorted(list(map(int, input().split(' '))), reverse=True)
r_list = sorted(list(map(int, input().split(' '))), reverse=True)

xy_list = sorted(p_list[:x] + q_list[:y])

i = 0
for r in range(c):
    if r_list[r] > xy_list[0]:
        i += 1
    else:
        break

if i == 0:
    print(sum(xy_list))
else:
    print(sum(xy_list[i:] + r_list[:i]))

Submission status: Runtime Error

Solution code:
import itertools as it
import collections
 
n, x, y = list(map(int, input().split(' ')))
 
dist_list = []
dist_a = dist_list.append
for i, j in it.combinations(list(range(n)), 2):
    warp_dist = abs(i - (x - 1)) + 1 + abs(j - (y - 1))
    if abs(j - i) < warp_dist:
        dist_a(abs(j - i))
    else:
        dist_a(warp_dist)
 
dist_c = collections.Counter(dist_list)
 
for i in range(1, n):
    print(dist_c[i])

Submission status: Runtime Error

Solution code:
import itertools as it
import collections

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

dist_list = []
dist_a = dist_list.append
for i, j in it.combinations(list(range(n)), 2):
    warp_dist = abs(i - (x - 1)) + 1 + abs(j - (y - 1))
    if abs(j - i) < warp_dist:
        dist_a(abs(j - i))
    else:
        dist_a(warp_dist)

dist_c = collections.Counter(dist_list)

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

Submission status: Runtime Error

Solution code:
cf =list(input())

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

Submission status: Runtime Error

Solution code:
s = gets.rstrip
if s[2] == s[3] and s[4] == s[5]
  	puts "Yes"
else
  	puts "No"
end

Submission status: Runtime Error

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

#posの隣同士の差を格納
#最も差が大きいポジションに対して、CCWとCWを考えて、小さいほうを採用

#差を格納
subtract = []
for i in range(n-1):
    subtract.append(pos[i+1]-pos[i])

#差を格納(posの終点～posの始点)
subtract.append(k-pos[n-1]+pos[0])

#差の配列から、最大差のインデックス番号を取得
idx = subtract.index(max(subtract))

if idx == 0:
    rsl = k-pos[idx-1]+pos[0]
else:
    rsl = pos[n-1]-pos[0]

print(rsl)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = str(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():
  k, N = (int(x) for x in input().split())
  min_LIST = []
  LIST = []
  LIST = list(map(int,input().split()))

  for i in range(len(LIST) - 1):
    min_LIST.append(LIST[i + 1] - LIST[i])
    if(min_LIST[i] <= (LIST[i + 1] - LIST[i])):
      x = (LIST[i + 1] - LIST[i])

  min_LIST.append(LIST[0] + (k - LIST[-1]))
  if(x <= (LIST[0] + (k - LIST[-1]))):
    x = (LIST[0] + (k - LIST[-1]))

  sum_list = sum(min_LIST) - x

  print(sum_list)
if __name__ == "__main__":
  main()

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:
S = input();
 
if S[3]==S[4] & S[5]==S[6]:
  print("Yes");
else:
  print("No");

Submission status: Runtime Error

Solution code:
S = input();

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,X,Y=map(int,input().split())


def count(k):
    count=0
    for i in range(1,N):
        for j in range(i+1,N+1):
            if min(abs(j-i),abs(X-i)+abs(Y-j)+1)==k:
                count+=1
                if count >= 4:
                    break
    return count

for k in range(1,N):
    print(count(k))

Submission status: Runtime Error

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

middle = K // 2

i=0
while A[i] <= middle:
  i += 1

d0 = A[i] - A[i-1]
d1 = K - A[-1] + A[0]

if d0 >= d1: print(K - d0)
else: print(K-d1)

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=map(int, input().split())
if S[2]==S[3] and S[4]==S[5]:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
s = list(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[2] == a[3] and s[4] == s[5]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
abcdef=input()
if c==d and e==f:
  print(yes)
  else:
    print(no)

Submission status: Runtime Error

Solution code:
s = input()
s_list = list(s)
temp = 0
if s_list[2] == s_list[3]:
  temp += 1
if s_list[4] == s_list[5]:
  temp += 1
if temp == 2:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
print("Yes") if list(input().split())[3-1] == list(input().split())[4-1] else print("No")

Submission status: Runtime Error

Solution code:
print("Yes") if list(input().split())[3] == list(input().split())[4] else print("No")

Submission status: Runtime Error

Solution code:
x,y,a,b,c = map(int,input().split())
print(sum(sorted(sorted(list(map(int,input().split())),reverse=True)[:x]+sorted(list(map(int,input().split())),reverse=True)[:y]+list(map(int,input().split())),reverse=True)[:(x+y)]))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from collections import Counter
[N, X, Y] = [int(item) for item in input().split()]
X -= 1
Y -= 1
gyoretu=[]
for i in range(N):
    row=[]
    for j in range(N):
        if i == j:
            row.append(0)
        elif abs(i - j) == 1 or i == X and j == Y or i == Y and j == X:
            row.append(1)
        else:
            row.append(2000)
    gyoretu.append(row)
for k in range(N):
    for i in range(N):
        for j in range(N):
            gyoretu[i][j] = min([gyoretu[i][j], gyoretu[i][k] + gyoretu[k][j]])
array=[]
for i in range(N):
        array+=gyoretu[i][i:]
c=Counter(array)
for i in range(1, N):
    print(c[i])

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:
li=list(input())
a=li[2]
b=li[3]
c=li[4]
d=li[5]
if a=b:
    if c=d:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Runtime Error

Solution code:
li=list(inoput())
a=li[2]
b=li[3]
c=li[4]
d=li[5]
if a=b:
    if c=d:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Runtime Error

Solution code:
s = input().split()
s = [i for i in s]

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

Submission status: Runtime Error

Solution code:
coin = int(input())
siawase = 0
if coin >= 500:
    siawase = siawase + int(coin / 500) * 1000
    amari = coin % 500
    siawase = siawase + int(amari / 5) *5
elif coin >= 5:
    siawase = siawase + int(coin / 5) * 5
    
print(int(siawase))

Submission status: Runtime Error

Solution code:
coin = int(input())
siawase = 0
if coin >= 500:
    siawase = siawase + int(coin / 500) * 1000
    amari = int(coin % 500)
    siawase = siawase + int(amari / 5) *5
elif coin >= 5:
    siawase = siawase + int(coin / 5) * 5
    
print(int(siawase))

Submission status: Runtime Error

Solution code:
# 文字列の読み込み
s = input()
a = list(s)
    if a[2] == a[3] and a[4] == a[5]:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
# 文字列の読み込み
s = input()
a = list(s)
if a[2] == a[3] || a[4] == a[5]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
X=int(input())
tot=int(X/500)
y=X-tot*500
tot=tot*1000 + int(y/5)*5
print(tot)

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:
#500-1000, 5-5

x = int(input())
fiveHundred = x//500
x -= fiveHundred*500
fives = x//5
print(fiveHundred*1000+fives*5)