fun main(args: Array<String>) {
    val input = readLine() ?: return
    when {
        input[2] != input[3] -> {
            println("No")
        }
        input[4] != input[5] -> {
            println("No")
        }
        else -> {
            println("Yes")
        }
    }
}
