import scala.io.{StdIn => in}

object Main extends App {
  val c = Iterator.continually(in.readLine)
    .take(3)
    .map(_.split(" ").map(_.toInt))
    .toArray

  val b1 = 0
  val b2 = c(0)(1) - c(0)(0)
  val b3 = c(0)(2) - c(0)(0)
  val a1 = c(0)(0)
  val a2 = c(1)(0)
  val a3 = c(2)(0)
  
  debug(a1,a2,a3,b1,b2,b3)

  val a = Array(a1, a2, a3)
  val b = Array(b1, b2, b3)
  val res = for {
    i <- 0 until 3
    j <- 0 until 3
  } yield {
    a(i) + b(j) == c(i)(j)
  }

  val ans = if(res.forall(_ == true)) "Yes" else "No"
  println(ans)

  def debug(any:Any*):Unit = {
    if(this.getClass.toString == "class Main$") return
    println(any.mkString(" "))
  }
}