import Control.Monad (replicateM)

main = do
    n <- read <$> getLine
    table <- ([0, 0, 0]:) <$> replicateM n (map read . words <$> getLine)
    putStrLn $ if let
        f ([t, x, y], [t', x', y']) = let
            u = abs (t' - t)
            z = abs (x' -x) + abs (y' - y)
            p = u >= z
            q = even u == even z
            in p && q
        in all f $ zip (take n table) (drop 1 table)
        then "Yes"
        else "No"
