fun main(args :Array<String>){
  var input : String? = readLine()
  var view :String = "No"
  if(input!![2] == input!![3]){
    if(input!![4] == input!![5]){
      view = "Yes"
    }
  }
  println(view)
}