import Data.Array.IO
import Control.Applicative
import Data.List
import Control.Monad

main = do
    n <- read <$> getLine
    xs <- map (map read.words) <$> getLineN n :: IO [[Int]]
    putStrLn.(\v -> if v then "Yes" else "No").forth $ foldl f (0,0,0,True) xs

forth (_,_,_,v) = v


f (t1,x1,y1,flag) [t2,x2,y2] = if judge then (t2,x2,y2,flag && True) else (x2,y2,t2,False) where
    distance = abs(x1-x2) + abs(y1-y2)
    judge = t2-t1 >= distance && (t2-t1) `mod` 2 == distance `mod` 2 
    
getLineN :: Int -> IO [String]
getLineN n = replicateM n getLine