fun main(args: Array<String>) {
    var X = (0..2).map{
                readLine()!!.split(" ").map(String::toInt)
            }
    var col = X[0].map{it-0}
    var row = (0..2).map{
                    X[it][0]
                }.map{ it - col[0]}
    var flag = true

    (0..2).map{i->
        if(col.map{it+row[i]} != X[i]) flag = false
    }
    if(flag) println("Yes")
    else println("No")
}
