
fun main(arr:Array<String>) {
    val ans = getAns((0 until 3).map { readLine()!!.split(" ").map { it.toInt() } })
    println(if(ans) "Yes" else "No")
}

fun getAns(num:List<List<Int>>):Boolean {
    for(i in (0..100)) {
        val a1 = i
        val b1 = num[0][0] - a1
        val b2 = num[0][1] - a1
        val b3 = num[0][2] - a1
        val a2 = num[1][0] - b1
        val a3 = num[2][0] - b1

        val tmp = mutableListOf<List<Int>>()
        tmp.add(listOf(a1+b1,a1+b2,a1+b3))
        tmp.add(listOf(a2+b1,a2+b2,a2+b3))
        tmp.add(listOf(a3+b1,a3+b2,a3+b3))
        var isMatch = true
        for(j in (0 until 3)) {
            for(k in (0 until 3)) {
                if(num[j][k] != tmp[j][k]) {
                    isMatch = false
                    break
                }
            }
            if(!isMatch) {
                break
            }
        }
        if(isMatch) {
            return true
        }
    }
    return false
}
