import Control.Applicative ((<$>))
import Control.Monad (replicateM)

main :: IO ()
main = do
  solve <$> replicateM 3 (map read . words <$> getLine) >>= putStrLn

solve :: [[Int]] -> String
solve [[c11, c12, c13],[c21, c22, c23], [c31, c32, c33]]
  | tsm `mod` 3 /= 0 = "No"
  | s0 == s1 && s1 == s2 && s2 == s3 = "Yes"
  | otherwise = "No"
  where
    tsm = c11 + c12 + c13 + c21 + c22 + c23 + c31 + c32 + c33
    s0 = tsm `div` 3
    s1 = c11 + c22 + c33
    s2 = c12 + c23 + c31
    s3 = c13 + c21 + c32
