module Main where

import Data.List

type Place = (Int, (Int, Int))

main :: IO ()
main = do
  ls <- getContents >>= return . lines
  let n = ((read :: String -> Int) . head) ls
  let ps' = (map (\[t, x, y] -> (t, (x, y))) . map (map read . words)) $ tail ls
  let ps = (0, (0, 0)) : sortOn fst ps'
  putStr $ if (all (== True) . map checkTwo) (zip ps (tail ps)) then "Yes" else "No"

checkTwo :: (Place, Place) -> Bool
checkTwo ((t0, (x0, y0)), (t1, (x1, y1))) = even dt == even dl
  where
    dt = t1 - t0
    dl = (x1 - x0) + (y1 - y0)
