s = eval(input())

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

    print('Yes')

else:

    print('No')
import sys

input = sys.stdin.readline



def main():

    s = eval(input())

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

        print("Yes")

    else:

        print("No")





if __name__ == '__main__':

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

import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

-s = eval(input()) -if s[2] == s[3] and s[4] == s[5]: -    print("Yes") -else: -    print("No") +import sys + +input = sys.stdin.readline + + +def main(): +    s = eval(input()) +    if s[2] == s[3] and s[4] == s[5]: +        print("Yes") +    else: +        print("No") + + +if __name__ == "__main__": +    main()