fun main(args: Array<String>){
    val inputList = readLine()!!.split("")
    if (inputList[3] == inputList[4] && inputList[5] == inputList[6]){
        println("Yes")
    }else{
        println("No")
    }
}