import           Control.Monad (replicateM)

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

getInts :: IO [Int]
getInts = map read . words <$> getLine

solve css = let h = head . head $ css
                cs = flip map [0..h]
                     $ \i -> make i (h - i) in
                filter (uncurry f) cs
    where
      make :: Int -> Int -> ([Int], [Int])
      make a b = let as' = map head css
                     bs' = head css in
                     (map (subtract b) as', map (subtract a) bs')
      f as bs = checkSign as bs && checkVal as bs
      checkSign as bs = all (>= 0) as && all (>= 0) bs
      checkVal as bs = map (\i -> map (+ i) bs) as == css
