{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import           Control.Monad         (replicateM)
import qualified Data.ByteString.Char8 as BS
import           Data.List             (transpose)
import           Data.Maybe            (fromJust)

main :: IO ()
main = do
  css <- replicateM 3 getIntsLn
  putStrLn $ if solve css then "Yes" else "No"

solve :: [[Int]] -> Bool
solve css = css == [[a1 + b1, a1 + b2, a1 + b3]
                   ,[a2 + b1, a2 + b2, a2 + b3]
                   ,[a3 + b1, a3 + b2, a3 + b3]] where
  a1 = 0
  a2 = c21 - c11
  a3 = c31 - c11
  b1 = c11
  b2 = c12
  b3 = c13
  [c11, c12, c13] = css !! 0
  [_, c21, c31] = transpose css !! 0

readInt :: BS.ByteString -> Int
readInt = fst . fromJust . BS.readInt

getIntsLn :: IO [Int]
getIntsLn = map readInt . BS.words <$> BS.getLine
