#include<iostream>
#include<stdio.h>
#include<string.h>
#include<cmath>
using namespace std;

struct _point
{
    int x;
    int y;
    int t;
}p[100010];
int main()
{
    int n;
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
    {
        scanf("%d%d%d",&p[i].t,&p[i].x,&p[i].y);
    }
    int ret=1;
    for(int i=1;i<=n;i++)
    {
        int len=abs(p[i].x-p[i-1].x)+abs(p[i].y-p[i-1].y);
        int now=p[i].t-p[i-1].t;
        if(now>=len&&(now-len)%2==0)
            ret=1;
        else
        {
            ret=0;
            break;
        }
    }

    if(ret)
    printf("YES\n");
    else
    printf("NO\n");
    return 0;
}
