import Control.Monad
import qualified Data.ByteString.Char8 as BC
import Data.Maybe (fromJust)

(|>) :: a -> (a -> b) -> b
infixl 1 |>
x |> f = f x

($>) :: (Functor m) => m a -> (a -> b) -> m b
infixl 1 $>
x $> f = fmap f x

bsToInt :: BC.ByteString -> Int
bsToInt bs = bs |> BC.readInt |> fromJust |> fst

getInt :: IO Int
getInt = BC.getLine $> bsToInt

getInts :: IO [Int]
getInts = BC.getLine $> BC.words $> map bsToInt

solve [t1, x1, y1] [t2, x2, y2]
    | t < d        = False
    | even (t - d) = True
    | otherwise    = False
    where d = abs (x1 - x2) + abs (y1 - y2)
          t = t2 - t1

main = do 
    n <- getInt
    c <- replicateM n getInts
    let x = [0, 0, 0] : c 
    let ans = and $ zipWith solve x (tail x)
    putStrLn $ if ans then "Yes" else "No"
    
