import Data.List

f :: [Int]->[Int]
f (x:[])=[]
f (x:y:zs)=(x-y):f (y:zs)

f2::String->[Int]
f2 e=f $ map read (words e)::[Int]

main = do
       e1<-getLine
       e2<-getLine
       e3<-getLine
       let m1=f2 e1
           m2=f2 e2
           m3=f2 e3
       putStrLn $ if m1==m2 && m2==m3 then "Yes" else "No"