solve :: [Int] -> String
solve [c11,c12,c13,c21,c22,c23,c31,c32,c33]
  | c11-c12-c21+c22 == 0 && c12-c13-c32+c33 == 0 && c11-c13-c22+c23-c31+c32 == 0 = "Yes"
  | otherwise =	"No"

main = getContents >>= putStrLn . solve . concat . map (map read . words) . lines