{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import           Control.Monad.State.Strict
import           Data.Bits
import qualified Data.ByteString.Char8      as B
import qualified Data.ByteString.Unsafe     as B
import           Data.Char                  (isSpace)
import qualified Data.Vector.Unboxed        as V

main :: IO ()
main = do
  n <- readLn
  txys <- V.unfoldrN n parseInt3 <$> B.getContents
  putStrLn $ if solve n txys then "Yes" else "No"

solve :: Int -> V.Vector (Int, Int, Int) -> Bool
solve _ txys = V.all travelable $ V.zip ((0, 0, 0) `V.cons` txys) txys

travelable :: ((Int, Int, Int), (Int, Int, Int)) -> Bool
travelable ((t, x, y), (t', x', y')) = dx + dy <= dt && even' (dt - dx - dy) where
  dx = x' - x
  dy = y' - y
  dt = t' - t

even' :: Int -> Bool
even' x = not $ testBit x 1

type Parser a = B.ByteString -> Maybe (a, B.ByteString)

parseInt3 :: Parser (Int, Int, Int)
parseInt3 = runStateT $
  (,,) <$> StateT (B.readInt . B.dropWhile isSpace)
  <*> StateT (B.readInt . B.unsafeTail)
  <*> StateT (B.readInt . B.unsafeTail)
