object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val (l, r) = List.fill(3)((sc.nextInt(), sc.nextInt(), sc.nextInt()))
    .map { case (a, b, c) => (a - b, b - c) }.unzip
  println(if (l.forall(_ == l.head) && r.forall(_ == r.head)) "Yes" else "No")
}
