let rec routable (pTxy: int [], txy: int []) =
    let [|pt; px; py|] = pTxy
    let [|t; x; y|] = txy

    if pt = t then
        (px, py) = (x, y)
    else if t - pt < x - px + y - py then
        false
    else
        routable ([|pt + 1; px + 1; py|], txy)
        || routable ([|pt + 1; px - 1; py|], txy)
        || routable ([|pt + 1; px; py + 1|], txy)
        || routable ([|pt + 1; px; py - 1|], txy)

let n = stdin.ReadLine() |> int
let txys = Seq.append [[|0; 0; 0|]] [for i in 1..n do yield stdin.ReadLine().Split(' ') |> Array.map int]
txys
|> Seq.pairwise
|> Seq.forall routable
|> fun r -> if r then "Yes" else "No"
|> printfn "%s"
