fun main (args : Array<String>) {
    val s = readLine()!!
    var sList : MutableList<String> = mutableListOf()

    for (i in s) {
        sList.add(i.toString())
    }

    if (sList[2] == sList[3] && sList[4] == sList[5]) {
        return println("Yes")
    } else {
        return println("No")
    }

}
