import Control.Monad
 
toTuples :: [[Int]] -> [(Int, Int, Int)]
toTuples ((t:x:y:[]):[]) = [(t, x, y)]
toTuples ((t:x:y:[]):xs) = (t, x, y) : toTuples xs
 
checkPlans :: (Int, Int, Int) -> [(Int, Int, Int)] -> Bool
checkPlans _ [] = True
checkPlans (t1, x1, y1) ((t2, x2, y2):xs) = (time >= delta) && (even delta == even time) && checkPlans (t2, x2, y2) xs
  where
    delta = abs (x2 - x1) + abs (y2 - y1)
    time = t2 - t1
 
main :: IO ()
main = do
    n <- readLn
    list <- replicateM n $ (map read) . words <$> getLine :: IO [[Int]]
    let plans = toTuples list
    putStr $ if checkPlans (0, 0, 0) plans then "Yes" else "No"