{-# LANGUAGE OverloadedStrings #-}

import Data.ByteString as B
import Data.ByteString.Char8 as BC

main = do
  s <- BC.getLine
  if check s
    then BC.putStrLn "Yes"
    else BC.putStrLn "No"

check :: B.ByteString -> Bool
check str = c3 == c4 && c5 == c6
  where
    c3 = str `BC.index` 2
    c4 = str `BC.index` 3
    c5 = str `BC.index` 4
    c6 = str `BC.index` 5
