object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val c = Array.fill(3, 3)(sc.nextInt())
  val b = c(0)
  val a = Array.fill(3)(0)
  a(1) = c(1)(0) - c(0)(0)
  a(2) = c(2)(0) - c(0)(0)

  var ok = true
  for {
    i <- 0 until 3
    j <- 0 until 3
    if c(i)(j) != a(i) + b(j)
  } {
    ok = false
  }
  println(if (ok) "Yes" else "No")
}
