let n = Scanf.scanf " %d" @@ (+) 0
let txys = Array.init n @@ fun _ -> Scanf.scanf " %d %d %d" @@ fun a b c -> a, b, c
let f (t0, x0, y0) (t, x, y) =
  let d = abs (x - x0) + abs(y - y0) in
  if t - t0 < d || (t - t0 - d) mod 2 = 1 then (print_endline "No"; exit 0);
  t, x, y
let _ =
  Array.fold_left f (0, 0, 0) txys |> ignore;
  print_endline "Yes"