using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    static class CTraveling
    {
        public class Point{
            public int T;
            public int X;
            public int Y;            
            public Point(int t, int x, int y)
            {
                this.T = t;
                this.X = x;
                this.Y = y;
            }
        }

        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var plans = new List<Point>();

            plans.Add(new Point(0, 0, 0));
            for (int i = 0; i < n; i++)
            {
                var s = Console.ReadLine().Split(' ');
                plans.Add(new Point(int.Parse(s[0]), int.Parse(s[1]), int.Parse(s[2])));
            }            

            for (int i = 0; i < n; i++)
            {
                int timeDiff = plans[i + 1].T - plans[i].T;
                int distDiff = Math.Abs(plans[i + 1].X - plans[i].X) + Math.Abs(plans[i + 1].Y - plans[i].Y);

                if (timeDiff < distDiff)
                {
                    // 経過秒数より遠い地点には行けない
                    Console.WriteLine("NO");
                    Console.ReadLine();
                    return;
                }
                if (timeDiff % 2 != distDiff % 2)
                {
                    Console.WriteLine("NO");
                    Console.ReadLine();
                    return;
                }
            }

            Console.WriteLine("YES");
            Console.ReadLine();
        }
    }
}