import scala.io.StdIn

object Main extends App {

   val a = (0 until 3).map{ i => StdIn.readLine().split(' ').map(_.toInt)}.toArray
   
   // c11 - c21 - (c12 - c22)
   val b1 = a(0)(0) - a(1)(0) - (a(0)(1) - a(1)(1))

   // c12 - c22 - (c13 - c23)
   val b2 = a(0)(1) - a(1)(1) - (a(0)(2) - a(1)(2))
   
   // c21 - c31 - (c22 - c32)
   val b3 = a(1)(0) - a(2)(0) - (a(1)(1) - a(2)(1))

   // c22 - c32 - (c23 - c33)
   val b4 = a(1)(1) - a(2)(1) - (a(1)(2) - a(2)(2))

   println(if(b1 == 0 && b2 == 0 && b3 == 0 && b4 == 0) "Yes" else "No")
}
