main = do
    c <-  map (map read . words) <$> (sequence $ take 3 $ repeat getLine)
    let test = [c!!0!!0+c!!i!!j == c!!i!!0+c!!0!!j | i<-[1,2],j<-[1,2]]
    putStrLn $ if all id test then "Yes" else "No"
