fun main(args: Array<String>) {
    val a = readLine()!!
    if (isLikeCoffee(a)) {
        println("Yes")
    } else {
        println("No")
    }
}

fun isLikeCoffee(str: String): Boolean {
    if (str.length < 6) return false

    return str[2] == str[3] && str[4] == str[5]
}
