
main = do
  _ <- getLine
  dat <- getContents >>= return . map ((\(t:x:y:_) -> (t,x,y)) . map read . words) . lines :: IO [(Int,Int,Int)]

  putStrLn $ if func (0,0,0) dat then "Yes" else "No"

  where
    func _ [] = True
    func (t,x,y) ((t2,x2,y2):rest)
      | dt < di = False
      | otherwise = if (dt - di) `mod` 2 == 0 then func (t2,x2,y2) rest else False
      where
        di = abs (x2 - x) + abs (y2 - y)
        dt = (t2 - t)
  
