import Control.Monad

main :: IO ()
main = do
  cs <- replicateM 3 $ map read . words <$> getLine
  let a1 = 0
  let b1 = (cs !! 0) !! 0 - a1
  let a2 = (cs !! 1) !! 0 - b1
  let b2 = (cs !! 0) !! 1 - a1
  let a3 = (cs !! 2) !! 0 - b1
  let b3 = (cs !! 0) !! 2 - a1
  let as = [a1, a2, a3]
  let bs = [b1, b2, b3]
  let res = all (==True) [(cs !! i) !! j == as !! i + bs !! j | i <- [0..2], j <- [0..2]]
  putStrLn $ if res then "Yes" else "No"