let checkCoords (((t1, x1, y1), (t2, x2, y2)): (int * int * int) * (int * int * int)) =
    let dt: int = t2 - t1
    let d: int = ((x2 - x1) |> abs) + ((y2 - y1) |> abs)
    d <= dt && (d % 2 = dt % 2)

let main () =
    let n = stdin.ReadLine() |> int
    let targetCoords: (int * int * int) [] = Array.zeroCreate (n + 1)
    targetCoords.[0] <- (0, 0, 0)
    for i in [ 1 .. n ] do
        let [| x; y; z |] =
            stdin.ReadLine().Split(' ') |> Array.map int
        targetCoords.[i] <- (x, y, z)
    targetCoords
    |> Array.pairwise
    |> Array.map checkCoords
    |> Array.fold (&&) true
    |> fun x -> if x then printfn "Yes" else printfn "No"
