import Foundation

let rdArr = [[Int]]()

let cRow1 = readLine()!.split(separator: " ").map({Int($0)!})//.sorted(by: {$0>$1})//[c11,c12,c13]をソート
let cRow2 = readLine()!.split(separator: " ").map({Int($0)!})//.sorted(by: {$0>$1})//[c21,c22,c31]
let cRow3 = readLine()!.split(separator: " ").map({Int($0)!})//.sorted(by: {$0>$1})//[c31,c32,c33]

var aRowS = [Int]()
var aRowT = [Int]()
var aRowU = [Int]()

// print(cRow1)
// print(cRow2)
// print(cRow3)

aRowS.append(abs(cRow1[0] - cRow1[1]))
aRowS.append(abs(cRow2[0] - cRow2[1]))
aRowS.append(abs(cRow3[0] - cRow3[1]))


aRowT.append(abs(cRow1[2] - cRow1[1]))
aRowT.append(abs(cRow2[2] - cRow2[1]))
aRowT.append(abs(cRow3[2] - cRow3[1]))

aRowU.append(abs(cRow1[2] - cRow1[0]))
aRowU.append(abs(cRow2[2] - cRow2[0]))
aRowU.append(abs(cRow3[2] - cRow3[0]))


// print(aRowS)
// print(aRowT)

if aRowS == aRowT || aRowS == aRowU || aRowT == aRowU {
    print("Yes")
} else {
    print("No")
}