import qualified Data.ByteString.Char8 as B

main :: IO ()
main = do
  s <- B.getLine
  putStrLn $ if solve s then "Yes" else "No"

solve :: B.ByteString -> Bool
solve s = B.index s 2 == B.index s 3 && B.index s 4 == B.index s 5
