import java.util.Scanner

fun main(args: Array<String>){
    val scn = Scanner(System.`in`)
    val str = scn.nextLine()

    if(str[2]==str[3]&&str[4]==str[5]){
        print("Yes")
    }else{
        print("No")
    }



}