import java.util.Scanner


import scala.io.StdIn._

object Main extends App {

  val s = readLine()

  def solve() = {
    if(s(2) == s(3) && s(4) == s(5)) "Yes" else "No"
  }

  println(solve())

}

