from sys import stdin





inp = stdin.readline



t = inp().strip()



if t[2] == t[3] and t[4] == t[5]:

    print("Yes")

else:

    print("No")



s = eval(input())

if s[2] == s[3] and s[4] == s[5]:

  print('Yes')

else:

  print('No')
from sys import stdin

inp = stdin.readline
t = inp().strip()
if t[2] == t[3] and t[4] == t[5]:
    print("Yes")
else:
    print("No")

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

-from sys import stdin - -inp = stdin.readline -t = inp().strip() -if t[2] == t[3] and t[4] == t[5]: +s = eval(input()) +if s[2] == s[3] and s[4] == s[5]: