fun main(args : Array<String>) {
    val cc = Array(3) { readLine()!!.split(" ").map { it.toInt() } }
    val ansA = mutableListOf(0, 0, 0)
    val ansB = mutableListOf(0, 0, 0)

    ansB[0] = cc[0][0]
    ansB[1] = cc[0][1]
    ansB[2] = cc[0][2]

    ansA[1] = cc[1][0] - ansB[0]
    ansA[2] = cc[2][0] - ansB[0]

    cc.forEachIndexed { idx, row ->
        repeat(3) {
            if (row[it] != ansA[idx] + ansB[it]) {
                println("No")
                return
            }
        }
    }

    println("Yes")
}