let css = Array.init 3 @@ fun _ -> Array.init 3 @@ fun _ -> Scanf.scanf " %d" (+) 0
let bs = Array.init 3 @@ fun i -> css.(0).(i)
let a_s = Array.init 3 @@ fun i -> css.(i).(0) - css.(0).(0)
let _ =
  for i = 0 to 2 do
    for j = 0 to 2 do if css.(i).(j) <> a_s.(i) + bs.(j) then (print_endline "No"; exit 0) done done;
  print_endline "Yes"