import java.util.*

fun main(args: Array<String>) {
  val sc = Scanner(System.`in`)
  val c = Array(3) { Array(3) { sc.nextInt() } }

  val c11 = c[0][0]
  val c21 = c[1][0]
  val c31 = c[2][0]
  val c22 = c[1][1]
  val c33 = c[2][2]

  val a1 = 0
  val b1 = c11
  val a2 = c21 - b1
  val a3 = c31 - b1
  val b2 = c22 - a2
  val b3 = c33 - a3

  val c12 = c[0][1]
  val c13 = c[0][2]
  val c23 = c[1][2]
  val c32 = c[2][1]

  var ok = false
  if (a1 + b2 == c12 && a1 + b3 == c13 && a2 + b3 == c23 && a3 + b2 == c32) {
    ok = true
  }

  if (ok) {
    println("Yes")
    return
  }
  println("No")
}
