open System

let read()   = Console.ReadLine().Split()
               |> Array.map(int)

let l1 = read()
let l2 = read()
let l3 = read()

let isValid arr = arr
                    |> Array.map2 (-) l1
                    |> Array.distinct 
                    |> Array.length = 1

(isValid l2 && isValid l3)
|> (function | true -> "Yes" | false -> "No")
|> printfn "%s"
