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