import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        int[] t=new int[N];
        int[] x=new int[N];
        int[] y=new int[N];
        for(int i=0;i<N;i++){
            t[i]=sc.nextInt();
            x[i]=sc.nextInt();
            y[i]=sc.nextInt();
        }
        int dx=0;
        int dy=0;
        int dt=0;
        for(int i=0;i<N;i++){
            if(i==0){
                dx=Math.abs(x[i]);
                dy=Math.abs(y[i]);
                dt=t[i];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }else{
                dx=Math.abs(x[i]-x[i-1]);
                dy=Math.abs(y[i]-y[i-1]);
                dt=t[i]-t[i-1];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        int[] t=new int[N];
        int[] x=new int[N];
        int[] y=new int[N];
        for(int i=0;i<N;i++){
            t[i]=sc.nextInt();
            x[i]=sc.nextInt();
            y[i]=sc.nextInt();
        }
        int dx=0;
        int dy=0;
        int dt=0;
        for(int i=0;i<N;i++){
            if(i==0){
                dx=Math.abs(x[i]);
                dy=Math.abs(y[i]);
                dt=t[i];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }else{
                dx=Math.abs(x[i]-x[i-1]);
                dy=Math.abs(y[i]-y[i-1]);
                dt=t[i]-t[i-1];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        int[] t=new int[N];
        int[] x=new int[N];
        int[] y=new int[N];
        for(int i=0;i<N;i++){
            t[i]=sc.nextInt();
            x[i]=sc.nextInt();
            y[i]=sc.nextInt();
        }
        int dx=0;
        int dy=0;
        int dt=0;
        for(int i=0;i<N;i++){
            if(i==0){
                dx=Math.abs(x[i]);
                dy=Math.abs(y[i]);
                dt=t[i];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }else{
                dx=Math.abs(x[i]-x[i-1]);
                dy=Math.abs(y[i]-y[i-1]);
                dt=t[i]-t[i-1];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    } main {
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        int[] t=new int[N];
        int[] x=new int[N];
        int[] y=new int[N];
        for(int i=0;i<N;i++){
            t[i]=sc.nextInt();
            x[i]=sc.nextInt();
            y[i]=sc.nextInt();
        }
        int dx=0;
        int dy=0;
        int dt=0;
        for(int i=0;i<N;i++){
            if(i==0){
                dx=Math.abs(x[i]);
                dy=Math.abs(y[i]);
                dt=t[i];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }else{
                dx=Math.abs(x[i]-x[i-1]);
                dy=Math.abs(y[i]-y[i-1]);
                dt=t[i]-t[i-1];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int N=sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] t=new int[N]; t new int[N] N int[] x=new int[N]; x new int[N] N int[] y=new int[N]; y new int[N] N for(int i=0;i<N;i++){
            t[i]=sc.nextInt();
            x[i]=sc.nextInt();
            y[i]=sc.nextInt();
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            t[i]=sc.nextInt();
            x[i]=sc.nextInt();
            y[i]=sc.nextInt();
        } {
            t[i]=sc.nextInt();
            x[i]=sc.nextInt();
            y[i]=sc.nextInt();
        } t[i]=sc.nextInt() t[i] t i sc.nextInt() sc.nextInt sc x[i]=sc.nextInt() x[i] x i sc.nextInt() sc.nextInt sc y[i]=sc.nextInt() y[i] y i sc.nextInt() sc.nextInt sc int dx=0; dx 0 int dy=0; dy 0 int dt=0; dt 0 for(int i=0;i<N;i++){
            if(i==0){
                dx=Math.abs(x[i]);
                dy=Math.abs(y[i]);
                dt=t[i];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }else{
                dx=Math.abs(x[i]-x[i-1]);
                dy=Math.abs(y[i]-y[i-1]);
                dt=t[i]-t[i-1];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            if(i==0){
                dx=Math.abs(x[i]);
                dy=Math.abs(y[i]);
                dt=t[i];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }else{
                dx=Math.abs(x[i]-x[i-1]);
                dy=Math.abs(y[i]-y[i-1]);
                dt=t[i]-t[i-1];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        } {
            if(i==0){
                dx=Math.abs(x[i]);
                dy=Math.abs(y[i]);
                dt=t[i];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }else{
                dx=Math.abs(x[i]-x[i-1]);
                dy=Math.abs(y[i]-y[i-1]);
                dt=t[i]-t[i-1];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        } if(i==0){
                dx=Math.abs(x[i]);
                dy=Math.abs(y[i]);
                dt=t[i];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }else{
                dx=Math.abs(x[i]-x[i-1]);
                dy=Math.abs(y[i]-y[i-1]);
                dt=t[i]-t[i-1];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            } i==0 i 0 {
                dx=Math.abs(x[i]);
                dy=Math.abs(y[i]);
                dt=t[i];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            } dx=Math.abs(x[i]) dx Math.abs(x[i]) Math.abs Math x[i] x i dy=Math.abs(y[i]) dy Math.abs(y[i]) Math.abs Math y[i] y i dt=t[i] dt t[i] t i if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                } !(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0))) (dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0))) dx+dy<=dt dx+dy dx dy dt (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)) ((dx+dy)%2==0 && (dt%2)==0) (dx+dy)%2==0 (dx+dy)%2 (dx+dy) dx dy 2 0 (dt%2)==0 (dt%2) dt 2 0 ((dx+dy)%2!=0 && (dt%2)!=0) (dx+dy)%2!=0 (dx+dy)%2 (dx+dy) dx dy 2 0 (dt%2)!=0 (dt%2) dt 2 0 {
                    System.out.println("No");
                    System.exit(0);
                } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 {
                dx=Math.abs(x[i]-x[i-1]);
                dy=Math.abs(y[i]-y[i-1]);
                dt=t[i]-t[i-1];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            } dx=Math.abs(x[i]-x[i-1]) dx Math.abs(x[i]-x[i-1]) Math.abs Math x[i]-x[i-1] x[i] x i x[i-1] x i-1 i 1 dy=Math.abs(y[i]-y[i-1]) dy Math.abs(y[i]-y[i-1]) Math.abs Math y[i]-y[i-1] y[i] y i y[i-1] y i-1 i 1 dt=t[i]-t[i-1] dt t[i]-t[i-1] t[i] t i t[i-1] t i-1 i 1 if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                } !(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0))) (dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0))) dx+dy<=dt dx+dy dx dy dt (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)) ((dx+dy)%2==0 && (dt%2)==0) (dx+dy)%2==0 (dx+dy)%2 (dx+dy) dx dy 2 0 (dt%2)==0 (dt%2) dt 2 0 ((dx+dy)%2!=0 && (dt%2)!=0) (dx+dy)%2!=0 (dx+dy)%2 (dx+dy) dx dy 2 0 (dt%2)!=0 (dt%2) dt 2 0 {
                    System.out.println("No");
                    System.exit(0);
                } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args
import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        int[] t=new int[N];
        int[] x=new int[N];
        int[] y=new int[N];
        for(int i=0;i<N;i++){
            t[i]=sc.nextInt();
            x[i]=sc.nextInt();
            y[i]=sc.nextInt();
        }
        int dx=0;
        int dy=0;
        int dt=0;
        for(int i=0;i<N;i++){
            if(i==0){
                dx=Math.abs(x[i]);
                dy=Math.abs(y[i]);
                dt=t[i];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }else{
                dx=Math.abs(x[i]-x[i-1]);
                dy=Math.abs(y[i]-y[i-1]);
                dt=t[i]-t[i-1];
                if(!(dx+dy<=dt && (((dx+dy)%2==0 && (dt%2)==0) || ((dx+dy)%2!=0 && (dt%2)!=0)))){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    }
}