let step (t1, x1, y1) (t2, x2, y2) =
  if t2-t1 >= Pervasives.abs(x1-x2) + Pervasives.abs(y1-y2) && (t1+t2+x1+x2+y1+y2)mod 2 = 0
  then (t1, x1, y1)
  else -1000000, 0, 0

let () =
  Scanf.scanf "%d\n" @@ fun n ->
  Array.init n (fun _ -> Scanf.scanf "%d %d %d\n" (fun t x y -> t,x,y)) 
  |> Array.fold_left step (0,0,0)
  |> function | -1000000,_,_ -> Printf.printf "No" | _ -> "Yes"
  |> Printf.printf "%s\n"