{-# LANGUAGE ScopedTypeVariables #-}

import Data.List

main :: IO ()
main = do
    c1 :: [Int] <- map read . words <$> getLine
    c2 :: [Int] <- map read . words <$> getLine
    c3 :: [Int] <- map read . words <$> getLine
    let c :: [[Int]] = [c1, c2, c3]
    let a1 :: Int = 10000
    let [b1, b2, b3] :: [Int] = map (subtract a1) c1
    let a2 :: Int = head c2 - b1
    let a3 :: Int = head c3 - b1
    if c2 !! 1 == a2 + b2 && c2 !! 2 == a2 + b3 && c3 !! 1 == a3 + b2 && c3 !! 2 == a3 + b3
        then putStrLn "Yes"
        else putStrLn "No"