fun main(args: Array<String>) {
    var word = readLine()
    if (word != null) {
        if(word.length != 6){
            return
        }
    }
    if(word?.get(2) ==word?.get(3) && word?.get(4) ==word?.get(5)){
        println("Yes")
    }else{
        println("No")
    }
}

