fun main(args: Array<String>) {
  val c = Array(3) { listOfInt() }
  val y = c[0]
  val x = IntArray(3) { c[it][0] - y[0] }
  val good =
    (0 until 3).all { i ->
      (0 until 3).all { j ->
        c[i][j] == (x[i] + y[j])
      }
    }
  val ans = if(good) "Yes" else "No"
  println(ans)
}

fun next() = readLine()!!
fun nextInt() = Integer.parseInt(next())
fun nextInt(offset: Int = 0) = nextInt() + offset
fun nextLong() = java.lang.Long.parseLong(next())
fun nextLong(offset: Long = 0L) = nextLong() + offset
fun nextDouble() = next().toDouble()
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map { Integer.parseInt(it) }