Imports System.Text
Imports System.String
Imports System
Imports System.Math

Module Module1

    Sub Main()
        Dim ans As String = ""
        'Dim valuelength = CInt(Console.ReadLine)
        Dim input As String = Console.ReadLine

        If input(2) = input(3) AndAlso input(4) = input(5) Then
            Console.WriteLine("Yes")
        Else
            Console.WriteLine("No")
        End If


        Console.ReadKey()
    End Sub


End Module