import scala.io.StdIn

object Main extends App {
  val seq = Iterator.continually(StdIn.readLine)
    .takeWhile(_ != null)
    .map(_.split(" ").map(_.toInt))
    .toArray

  val y = (0 until 3).map(i => seq(0)(i)).toArray
  val x = (0 until 3).map(i => seq(i)(0)-y(0)).toArray

  val ans = (
    for{
      i <- 0 until 3
      j <- 0 until 3
    } yield { seq(i)(j) == x(i) + y(j) }
  ).forall(_ == true)

  println(if(ans)"Yes"else"No")
}