object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val rowC1 = readLine.split(" ").map(_.toInt)
    val rowC2 = readLine.split(" ").map(_.toInt)
    val rowC3 = readLine.split(" ").map(_.toInt)

    val maxN = 100

    def checkRow(row:Array[Int], a1: Int, a2: Int, a3:Int): Boolean ={
      ((row(0) - a1) == (row(1) - a2)) && ((row(1) - a2) == (row(2) - a3))
    }
    val checklist =
      for(a1 <- 0 to maxN; a2 <- 0 to maxN; a3 <- 0 to maxN) yield {
        val a = checkRow(rowC1, a1, a2, a3) && checkRow(rowC2, a1, a2, a3) && checkRow(rowC3, a1, a2, a3)
        //println("DEBUG" + a)
        a
      }
    val ans = checklist.exists(x => x)

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

}
