fun main(args: Array<String>) {
    val array = Array(3) { readLine()!!.split(" ").map(String::toInt) }

    for (a1 in 0..100) {
        val b1 = array[0][0] - a1
        val b2 = array[0][1] - a1
        val b3 = array[0][2] - a1
        for (a2 in 0..100) {
            if (!(b1 == array[1][0] - a2 && b2 == array[1][1] - a2 && b3 == array[1][2] - a2)) {
                continue
            }
            for (a3 in 0..100) {
                if (b1 == array[2][0] - a3 && b2 == array[2][1] - a3 && b3 == array[2][2] - a3) {
                    println("Yes")
                    return
                }
            }
        }
    }
    println("No")
}

