object Main extends App {
  val c = Array(1,2,3).map{i => readLine.split(" ").map{_.toInt}}
  
  var check = true
  
  check &&= (0 until 3).map{j => c(0)(j) - c(1)(j)}.forall{_ == c(0)(0) - c(1)(0)}
  check &&= (0 until 3).map{j => c(1)(j) - c(2)(j)}.forall{_ == c(1)(0) - c(2)(0)}
  check &&= (0 until 3).map{i => c(i)(0) - c(i)(1)}.forall{_ == c(0)(0) - c(0)(1)}
  check &&= (0 until 3).map{i => c(i)(1) - c(i)(2)}.forall{_ == c(0)(1) - c(0)(2)}
  
  println(if (check) "Yes" else "No")
}