import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val c = (1..3).map { (1..3).map { sc.nextInt() } }
    for (a0 in 0..100) {
        for (a1 in 0..100) {
            for (a2 in 0..100) {
                val a = arrayOf(a0, a1, a2)
                val set = mutableSetOf<Triple<Int,Int,Int>>()
                for (i in 0 until 3) {
                    val b0 = c[i][0] - a[i]
                    val b1 = c[i][1] - a[i]
                    val b2 = c[i][2] - a[i]
                    set.add(Triple(b0, b1, b2))
                }
                if (set.size == 1) {
//                    println("$a0 $a1 $a2")
//                    val b = set.first()
//                    println("${b.first} ${b.second} ${b.third}")
                    println("Yes")
                    return
                }
            }
        }
    }
    println("No")
}