using System;
using System.Linq;

class Program
{
    static void Main(string[] args)
    {
        var N = int.Parse(Console.ReadLine());

        var ans = "YES";
        var t = 0;
        var x = 0;
        var y = 0;
        for (int i = 0; i < N; i++)
        {
            var inputs = Console.ReadLine().Split(' ').Select(s => int.Parse(s.ToString())).ToArray();

            var dt = inputs[0] - t;
            var dx = Math.Abs(inputs[1] - x);
            var dy = Math.Abs(inputs[2] - y);

            if (dx + dy > dt)
            {
                ans = "NO";
            }

            if (dt % 2 != (dx + dy) % 2)
            {
                ans = "NO";
            }

            t = inputs[0];
            x = inputs[1];
            y = inputs[2];
        }

        Console.WriteLine(ans);
    }
}