import java.io.InputStreamReader
import java.io.BufferedReader

fun main(args: Array<String>) {
  val br = BufferedReader(InputStreamReader(System.`in`))
  val n = 3

  val c = (0 until n).map { i ->
    br.readLine().split(" ").map { it.toInt() }
      .toIntArray()
  }

  val b = c[0]
  val a = IntArray(n, { i -> c[i][0] - b[0] })

  fun evalute() =
    (0 until n).all { i ->
      (0 until n).all { j ->
        c[i][j] == (a[i] + b[j])
      }
    }

  val ans = if(evalute()) "Yes" else "No"

  println(ans)
}