let id x = x in
let n = Scanf.scanf "%d\n" id in
let list =  (0,0,0) :: (Array.to_list @@ Array.init n (fun _ ->
    Scanf.scanf "%d %d %d\n" (fun a b c-> a, b, c))) in
   
let rec check : (int*int*int) list -> string =
  fun list ->
  match list with
  | [] -> "Yes"
  |  _ :: [] -> "Yes"
  | (t, x, y) :: ((t', x', y') as next) :: rest ->
     let dift=t'-t in
     let difd=x'-x+(y'-y) in
     if (dift+difd) mod 2 = 0 && difd<=dift
     then check (next :: rest)
     else "No" in

print_string (check list)
;;
  