import Data.Array

main :: IO ()
main = do
  cs <- listArray ((1,1),(3,3)) . map read . words <$> getContents
  putStrLn $ if solve cs then "Yes" else "No"

solve :: Array (Int, Int) Int -> Bool
solve cs
  | cs ! (2,2) /= a2 + b2 = False
  | cs ! (2,3) /= a2 + b3 = False
  | cs ! (3,2) /= a3 + b2 = False
  | cs ! (3,3) /= a3 + b3 = False
  | otherwise             = True
 where
  a1 = 0
  b1 = cs ! (1,1)
  b2 = cs ! (1,2)
  b3 = cs ! (1,3)
  a2 = cs ! (2,1) - b1
  a3 = cs ! (3,1) - b1