import Control.Monad.State
import Control.Arrow
import Data.Maybe
import Data.List

getInts = map read . words <$> getLine :: IO [Int]

data Point = Point {_x::Int, _y::Int}
data Travel = Travel {_time::Int, _p::Point}

toTravel (s:x:y:_) = Travel s (Point x y)

reachable (Travel t (Point x y)) ret@(Travel t2 (Point x2 y2)) = 
    if distance <= time && (t2 - t) `mod` 2 == distance `mod` 2 then Just ret else Nothing
    where
        time = t2 - t
        distance = abs(x2 - x) + abs(y2 - y)

main = do
    time <- readLn
    inp <- replicateM time getLine
    let travels = map (words >>> map read >>> toTravel) inp
    let res = foldl' doTravel (Just $ Travel 0 (Point 0 0)) travels
    putStrLn $ if isJust res then "Yes" else "No"
    where
        doTravel x y = join $ (flip reachable y) <$> x
