import Control.Applicative
import Control.Monad

data YesNo = Yes | No deriving(Show)
type Pos = (Int, Int)
type Time = Int

myRead :: String -> (Time, Pos)
myRead s = (a, (b, c))
    where (a:b:c:_) = ((map read) . words) s

solver :: (Time, Pos) -> [(Time, Pos)] -> YesNo
solver _ [] = Yes
solver (t, (x, y)) (z:zs) =
    let d      = fst z
        (a, b) = snd z
        dt     = d - t
        dist   = abs (a - x) + abs (b - y)
        in if dist > dt then No
            else if (dist `mod` 2) /= (dt `mod` 2) then No
                else solver z zs

main :: IO ()
main = do
    n    <- read <$> getLine
    line <- map myRead <$> replicateM n getLine
    print $ solver (0, (0, 0)) line
