let () =
  let n = Scanf.scanf "%d\n" (fun n -> n) in
  let rec iter i t_prev x_prev y_prev =
    if i = n then print_string "Yes"
    else
      let (t_next, x_next, y_next) = Scanf.scanf "%d %d %d\n" (fun t x y -> (t, x, y)) in
      let ok =
        let t = t_next - t_prev in
        let d = (abs (x_next - x_prev)) + (abs (y_next - y_prev)) in
        (t >= d) && ((t - d) mod 2 = 0)
      in
      if ok then iter (i + 1) t_next x_next y_next
      else print_string "No"
  in iter 0 0 0 0
