import java.util.Scanner;

public class Main {

   	public static void main(String[] args) {
   		Scanner sc = new Scanner(System.in);
   		int n = Integer.parseInt(sc.next());
   		int[][] plan = new int [n][3];
   		int[] planlog = new int [3];

   		for(int i=0;i<n;i++) {
   			plan[i][0] = Integer.parseInt(sc.next());
   			plan[i][1]=Integer.parseInt(sc.next());
   			plan[i][2]=Integer.parseInt(sc.next());
   		}
   		sc.close();
    
   		for(int i=0;i<n;i++) {
   			//time,X,Y差分
   			int absT = plan[i][0] - planlog[0];
   			int absX = Math.abs(plan[i][1] - planlog[1]);
   			int absY = Math.abs(plan[i][2] - planlog[2]);
   			//時間内に移動できるか && とどまることができるか
   			if(absT>=absX+absY&&absT%2==(absX+absY)%2) {
   				//System.out.println(absT+" "+absX+" "+absY);
   				planlog[0]=absT;
   				planlog[1]=absX;
   				planlog[2]=absY;
   			}else{
   				System.out.println("No");
   				return;
   			}
   		}
   		System.out.println("Yes");
   	}
    
} import java.util.Scanner; Scanner java.util public class Main {

   	public static void main(String[] args) {
   		Scanner sc = new Scanner(System.in);
   		int n = Integer.parseInt(sc.next());
   		int[][] plan = new int [n][3];
   		int[] planlog = new int [3];

   		for(int i=0;i<n;i++) {
   			plan[i][0] = Integer.parseInt(sc.next());
   			plan[i][1]=Integer.parseInt(sc.next());
   			plan[i][2]=Integer.parseInt(sc.next());
   		}
   		sc.close();
    
   		for(int i=0;i<n;i++) {
   			//time,X,Y差分
   			int absT = plan[i][0] - planlog[0];
   			int absX = Math.abs(plan[i][1] - planlog[1]);
   			int absY = Math.abs(plan[i][2] - planlog[2]);
   			//時間内に移動できるか && とどまることができるか
   			if(absT>=absX+absY&&absT%2==(absX+absY)%2) {
   				//System.out.println(absT+" "+absX+" "+absY);
   				planlog[0]=absT;
   				planlog[1]=absX;
   				planlog[2]=absY;
   			}else{
   				System.out.println("No");
   				return;
   			}
   		}
   		System.out.println("Yes");
   	}
    
} Main public static void main(String[] args) {
   		Scanner sc = new Scanner(System.in);
   		int n = Integer.parseInt(sc.next());
   		int[][] plan = new int [n][3];
   		int[] planlog = new int [3];

   		for(int i=0;i<n;i++) {
   			plan[i][0] = Integer.parseInt(sc.next());
   			plan[i][1]=Integer.parseInt(sc.next());
   			plan[i][2]=Integer.parseInt(sc.next());
   		}
   		sc.close();
    
   		for(int i=0;i<n;i++) {
   			//time,X,Y差分
   			int absT = plan[i][0] - planlog[0];
   			int absX = Math.abs(plan[i][1] - planlog[1]);
   			int absY = Math.abs(plan[i][2] - planlog[2]);
   			//時間内に移動できるか && とどまることができるか
   			if(absT>=absX+absY&&absT%2==(absX+absY)%2) {
   				//System.out.println(absT+" "+absX+" "+absY);
   				planlog[0]=absT;
   				planlog[1]=absX;
   				planlog[2]=absY;
   			}else{
   				System.out.println("No");
   				return;
   			}
   		}
   		System.out.println("Yes");
   	} main {
   		Scanner sc = new Scanner(System.in);
   		int n = Integer.parseInt(sc.next());
   		int[][] plan = new int [n][3];
   		int[] planlog = new int [3];

   		for(int i=0;i<n;i++) {
   			plan[i][0] = Integer.parseInt(sc.next());
   			plan[i][1]=Integer.parseInt(sc.next());
   			plan[i][2]=Integer.parseInt(sc.next());
   		}
   		sc.close();
    
   		for(int i=0;i<n;i++) {
   			//time,X,Y差分
   			int absT = plan[i][0] - planlog[0];
   			int absX = Math.abs(plan[i][1] - planlog[1]);
   			int absY = Math.abs(plan[i][2] - planlog[2]);
   			//時間内に移動できるか && とどまることができるか
   			if(absT>=absX+absY&&absT%2==(absX+absY)%2) {
   				//System.out.println(absT+" "+absX+" "+absY);
   				planlog[0]=absT;
   				planlog[1]=absX;
   				planlog[2]=absY;
   			}else{
   				System.out.println("No");
   				return;
   			}
   		}
   		System.out.println("Yes");
   	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[][] plan = new int [n][3]; plan new int [n][3] n 3 int[] planlog = new int [3]; planlog new int [3] 3 for(int i=0;i<n;i++) {
   			plan[i][0] = Integer.parseInt(sc.next());
   			plan[i][1]=Integer.parseInt(sc.next());
   			plan[i][2]=Integer.parseInt(sc.next());
   		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
   			plan[i][0] = Integer.parseInt(sc.next());
   			plan[i][1]=Integer.parseInt(sc.next());
   			plan[i][2]=Integer.parseInt(sc.next());
   		} {
   			plan[i][0] = Integer.parseInt(sc.next());
   			plan[i][1]=Integer.parseInt(sc.next());
   			plan[i][2]=Integer.parseInt(sc.next());
   		} plan[i][0] = Integer.parseInt(sc.next()) plan[i][0] plan[i] plan i 0 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc plan[i][1]=Integer.parseInt(sc.next()) plan[i][1] plan[i] plan i 1 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc plan[i][2]=Integer.parseInt(sc.next()) plan[i][2] plan[i] plan i 2 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc for(int i=0;i<n;i++) {
   			//time,X,Y差分
   			int absT = plan[i][0] - planlog[0];
   			int absX = Math.abs(plan[i][1] - planlog[1]);
   			int absY = Math.abs(plan[i][2] - planlog[2]);
   			//時間内に移動できるか && とどまることができるか
   			if(absT>=absX+absY&&absT%2==(absX+absY)%2) {
   				//System.out.println(absT+" "+absX+" "+absY);
   				planlog[0]=absT;
   				planlog[1]=absX;
   				planlog[2]=absY;
   			}else{
   				System.out.println("No");
   				return;
   			}
   		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
   			//time,X,Y差分
   			int absT = plan[i][0] - planlog[0];
   			int absX = Math.abs(plan[i][1] - planlog[1]);
   			int absY = Math.abs(plan[i][2] - planlog[2]);
   			//時間内に移動できるか && とどまることができるか
   			if(absT>=absX+absY&&absT%2==(absX+absY)%2) {
   				//System.out.println(absT+" "+absX+" "+absY);
   				planlog[0]=absT;
   				planlog[1]=absX;
   				planlog[2]=absY;
   			}else{
   				System.out.println("No");
   				return;
   			}
   		} {
   			//time,X,Y差分
   			int absT = plan[i][0] - planlog[0];
   			int absX = Math.abs(plan[i][1] - planlog[1]);
   			int absY = Math.abs(plan[i][2] - planlog[2]);
   			//時間内に移動できるか && とどまることができるか
   			if(absT>=absX+absY&&absT%2==(absX+absY)%2) {
   				//System.out.println(absT+" "+absX+" "+absY);
   				planlog[0]=absT;
   				planlog[1]=absX;
   				planlog[2]=absY;
   			}else{
   				System.out.println("No");
   				return;
   			}
   		} int absT = plan[i][0] - planlog[0]; absT plan[i][0] - planlog[0] plan[i][0] plan[i] plan i 0 planlog[0] planlog 0 int absX = Math.abs(plan[i][1] - planlog[1]); absX Math.abs(plan[i][1] - planlog[1]) Math.abs Math plan[i][1] - planlog[1] plan[i][1] plan[i] plan i 1 planlog[1] planlog 1 int absY = Math.abs(plan[i][2] - planlog[2]); absY Math.abs(plan[i][2] - planlog[2]) Math.abs Math plan[i][2] - planlog[2] plan[i][2] plan[i] plan i 2 planlog[2] planlog 2 if(absT>=absX+absY&&absT%2==(absX+absY)%2) {
   				//System.out.println(absT+" "+absX+" "+absY);
   				planlog[0]=absT;
   				planlog[1]=absX;
   				planlog[2]=absY;
   			}else{
   				System.out.println("No");
   				return;
   			} absT>=absX+absY&&absT%2==(absX+absY)%2 absT>=absX+absY absT absX+absY absX absY absT%2==(absX+absY)%2 absT%2 absT 2 (absX+absY)%2 (absX+absY) absX absY 2 {
   				//System.out.println(absT+" "+absX+" "+absY);
   				planlog[0]=absT;
   				planlog[1]=absX;
   				planlog[2]=absY;
   			} planlog[0]=absT planlog[0] planlog 0 absT planlog[1]=absX planlog[1] planlog 1 absX planlog[2]=absY planlog[2] planlog 2 absY {
   				System.out.println("No");
   				return;
   			} System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {

   	public static void main(String[] args) {
   		Scanner sc = new Scanner(System.in);
   		int n = Integer.parseInt(sc.next());
   		int[][] plan = new int [n][3];
   		int[] planlog = new int [3];

   		for(int i=0;i<n;i++) {
   			plan[i][0] = Integer.parseInt(sc.next());
   			plan[i][1]=Integer.parseInt(sc.next());
   			plan[i][2]=Integer.parseInt(sc.next());
   		}
   		sc.close();
    
   		for(int i=0;i<n;i++) {
   			//time,X,Y差分
   			int absT = plan[i][0] - planlog[0];
   			int absX = Math.abs(plan[i][1] - planlog[1]);
   			int absY = Math.abs(plan[i][2] - planlog[2]);
   			//時間内に移動できるか && とどまることができるか
   			if(absT>=absX+absY&&absT%2==(absX+absY)%2) {
   				//System.out.println(absT+" "+absX+" "+absY);
   				planlog[0]=absT;
   				planlog[1]=absX;
   				planlog[2]=absY;
   			}else{
   				System.out.println("No");
   				return;
   			}
   		}
   		System.out.println("Yes");
   	}
    
} public class Main {

   	public static void main(String[] args) {
   		Scanner sc = new Scanner(System.in);
   		int n = Integer.parseInt(sc.next());
   		int[][] plan = new int [n][3];
   		int[] planlog = new int [3];

   		for(int i=0;i<n;i++) {
   			plan[i][0] = Integer.parseInt(sc.next());
   			plan[i][1]=Integer.parseInt(sc.next());
   			plan[i][2]=Integer.parseInt(sc.next());
   		}
   		sc.close();
    
   		for(int i=0;i<n;i++) {
   			//time,X,Y差分
   			int absT = plan[i][0] - planlog[0];
   			int absX = Math.abs(plan[i][1] - planlog[1]);
   			int absY = Math.abs(plan[i][2] - planlog[2]);
   			//時間内に移動できるか && とどまることができるか
   			if(absT>=absX+absY&&absT%2==(absX+absY)%2) {
   				//System.out.println(absT+" "+absX+" "+absY);
   				planlog[0]=absT;
   				planlog[1]=absX;
   				planlog[2]=absY;
   			}else{
   				System.out.println("No");
   				return;
   			}
   		}
   		System.out.println("Yes");
   	}
    
} Main
import java.util.Scanner;

public class Main {

   	public static void main(String[] args) {
   		Scanner sc = new Scanner(System.in);
   		int n = Integer.parseInt(sc.next());
   		int[][] plan = new int [n][3];
   		int[] planlog = new int [3];

   		for(int i=0;i<n;i++) {
   			plan[i][0] = Integer.parseInt(sc.next());
   			plan[i][1]=Integer.parseInt(sc.next());
   			plan[i][2]=Integer.parseInt(sc.next());
   		}
   		sc.close();
    
   		for(int i=0;i<n;i++) {
   			//time,X,Y差分
   			int absT = plan[i][0] - planlog[0];
   			int absX = Math.abs(plan[i][1] - planlog[1]);
   			int absY = Math.abs(plan[i][2] - planlog[2]);
   			//時間内に移動できるか && とどまることができるか
   			if(absT>=absX+absY&&absT%2==(absX+absY)%2) {
   				//System.out.println(absT+" "+absX+" "+absY);
   				planlog[0]=absT;
   				planlog[1]=absX;
   				planlog[2]=absY;
   			}else{
   				System.out.println("No");
   				return;
   			}
   		}
   		System.out.println("Yes");
   	}
    
}