main = do
  n <- read <$> getLine
  ps <- sequence $ replicate n getPos
  putStrLn $ if (all id (zipWith travel ((Pos 0 0 0):ps) ps))
  then "Yes"
  else "No"

data Pos = Pos Int Int Int
getPos = do
  t:x:y:_ <- (map read.words) <$> getLine
  return $ Pos t x y
travel (Pos t x y) (Pos t' x' y') = dt >= dd && mod (dt-dd) 2 == 0
  where
    dt = t' - t
    dd = abs (x'-x) + abs (y'-y)
