Module Module1

    Sub Main()
        Dim sInput As String
        sInput = Console.ReadLine()
        If sInput(2) = sInput(3) And sInput(4) = sInput(5) Then
            Console.WriteLine("Yes")
        Else
            Console.WriteLine("No")
        End If
    End Sub

End Module
