coffee :: String -> String
coffee s = if (s !! 2) == (s !! 3) && (s !! 4) == (s !! 5) then "Yes"
                                                           else "No"

                                                           

main = do
    s <- getLine
    putStrLn $ coffee s