fun main(args: Array<String>) = ABC160A.main()

object ABC160A {
    fun main() {
        val s = readString()
        println(s.isCoffeeLike().yesOrNo())
    }

    fun String.isCoffeeLike():Boolean {
        return this[2]==this[3] && this[4]==this[5]
    }

    /*####################################################################################*/

    fun readString() = readLine()!!
    fun Boolean.yesOrNo() = if (this) "Yes" else "No"
}