
open Scanf
open Printf

exception Error

let flip f x y = f y x

let rec range a b = if a >= b then [] else a :: range (a+1) b

let read_int () = scanf " %d" (fun x -> x)
let rec read_ints n = if n = 0 then [] else let i = read_int () in i :: read_ints (n-1)

let rec rep n f = if n <= 0 then [] else let x = f () in x :: rep (n-1) f

let rec itv f xs =
  match xs with
  | [] -> raise Error
  | (_::[]) -> []
  | (x::y::ys) -> f x y :: itv f (y::ys)

let () =
  let n = read_int () in
  let result = (0, 0, 0) :: rep n (fun () -> let [t; x; y] = read_ints 3 in (t, x, y))
  |> itv (fun (t0, x0, y0) (t1, x1, y1) -> (t1-t0, x1-x0, y1-y0))
  |> List.for_all (fun (dt, dx, dy) ->
      let rest = dt - abs dx - abs dy in rest >= 0 && rest mod 2 = 0) in
  printf "%s\n" (if result then "Yes" else "No")
