import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[][] way= new int[n][3];

		for(int i =0;i<3*n;i++){
			int b=i%3;
			int a=(i-b)/3;
			int m = sc.nextInt();
			way[a][b]= m;
		}

		boolean koike = true;
		for(int i = 0;i<n-1;i++){
			koike &= judge(way[i][0],way[i][1],way[i][2],way[i+1][0],way[i+1][1],way[i+1][2]);
		}
		koike &= judge(0,0,0,way[0][0],way[0][1],way[0][2]);
		if(koike){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
	private static boolean judge(int a,int b, int c, int d, int e, int f){
		int t = d-a;
		int distance = Math.abs(e-b)+Math.abs(f-c);
		return t>=distance && (t-distance)%2==0;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[][] way= new int[n][3];

		for(int i =0;i<3*n;i++){
			int b=i%3;
			int a=(i-b)/3;
			int m = sc.nextInt();
			way[a][b]= m;
		}

		boolean koike = true;
		for(int i = 0;i<n-1;i++){
			koike &= judge(way[i][0],way[i][1],way[i][2],way[i+1][0],way[i+1][1],way[i+1][2]);
		}
		koike &= judge(0,0,0,way[0][0],way[0][1],way[0][2]);
		if(koike){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
	private static boolean judge(int a,int b, int c, int d, int e, int f){
		int t = d-a;
		int distance = Math.abs(e-b)+Math.abs(f-c);
		return t>=distance && (t-distance)%2==0;
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[][] way= new int[n][3];

		for(int i =0;i<3*n;i++){
			int b=i%3;
			int a=(i-b)/3;
			int m = sc.nextInt();
			way[a][b]= m;
		}

		boolean koike = true;
		for(int i = 0;i<n-1;i++){
			koike &= judge(way[i][0],way[i][1],way[i][2],way[i+1][0],way[i+1][1],way[i+1][2]);
		}
		koike &= judge(0,0,0,way[0][0],way[0][1],way[0][2]);
		if(koike){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[][] way= new int[n][3];

		for(int i =0;i<3*n;i++){
			int b=i%3;
			int a=(i-b)/3;
			int m = sc.nextInt();
			way[a][b]= m;
		}

		boolean koike = true;
		for(int i = 0;i<n-1;i++){
			koike &= judge(way[i][0],way[i][1],way[i][2],way[i+1][0],way[i+1][1],way[i+1][2]);
		}
		koike &= judge(0,0,0,way[0][0],way[0][1],way[0][2]);
		if(koike){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[][] way= new int[n][3]; way new int[n][3] n 3 for(int i =0;i<3*n;i++){
			int b=i%3;
			int a=(i-b)/3;
			int m = sc.nextInt();
			way[a][b]= m;
		} int i =0; int i =0; i 0 i<3*n i 3*n 3 n i++ i++ i {
			int b=i%3;
			int a=(i-b)/3;
			int m = sc.nextInt();
			way[a][b]= m;
		} {
			int b=i%3;
			int a=(i-b)/3;
			int m = sc.nextInt();
			way[a][b]= m;
		} int b=i%3; b i%3 i 3 int a=(i-b)/3; a (i-b)/3 (i-b) i b 3 int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc way[a][b]= m way[a][b] way[a] way a b m boolean koike = true; koike true for(int i = 0;i<n-1;i++){
			koike &= judge(way[i][0],way[i][1],way[i][2],way[i+1][0],way[i+1][1],way[i+1][2]);
		} int i = 0; int i = 0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
			koike &= judge(way[i][0],way[i][1],way[i][2],way[i+1][0],way[i+1][1],way[i+1][2]);
		} {
			koike &= judge(way[i][0],way[i][1],way[i][2],way[i+1][0],way[i+1][1],way[i+1][2]);
		} koike &= judge(way[i][0],way[i][1],way[i][2],way[i+1][0],way[i+1][1],way[i+1][2]) koike judge(way[i][0],way[i][1],way[i][2],way[i+1][0],way[i+1][1],way[i+1][2]) judge way[i][0] way[i] way i 0 way[i][1] way[i] way i 1 way[i][2] way[i] way i 2 way[i+1][0] way[i+1] way i+1 i 1 0 way[i+1][1] way[i+1] way i+1 i 1 1 way[i+1][2] way[i+1] way i+1 i 1 2 koike &= judge(0,0,0,way[0][0],way[0][1],way[0][2]) koike judge(0,0,0,way[0][0],way[0][1],way[0][2]) judge 0 0 0 way[0][0] way[0] way 0 0 way[0][1] way[0] way 0 1 way[0][2] way[0] way 0 2 if(koike){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		} koike {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args private static boolean judge(int a,int b, int c, int d, int e, int f){
		int t = d-a;
		int distance = Math.abs(e-b)+Math.abs(f-c);
		return t>=distance && (t-distance)%2==0;
	} judge {
		int t = d-a;
		int distance = Math.abs(e-b)+Math.abs(f-c);
		return t>=distance && (t-distance)%2==0;
	} int t = d-a; t d-a d a int distance = Math.abs(e-b)+Math.abs(f-c); distance Math.abs(e-b)+Math.abs(f-c) Math.abs(e-b) Math.abs Math e-b e b Math.abs(f-c) Math.abs Math f-c f c return t>=distance && (t-distance)%2==0; t>=distance && (t-distance)%2==0 t>=distance t distance (t-distance)%2==0 (t-distance)%2 (t-distance) t distance 2 0 int a a int b b int c c int d d int e e int f f public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[][] way= new int[n][3];

		for(int i =0;i<3*n;i++){
			int b=i%3;
			int a=(i-b)/3;
			int m = sc.nextInt();
			way[a][b]= m;
		}

		boolean koike = true;
		for(int i = 0;i<n-1;i++){
			koike &= judge(way[i][0],way[i][1],way[i][2],way[i+1][0],way[i+1][1],way[i+1][2]);
		}
		koike &= judge(0,0,0,way[0][0],way[0][1],way[0][2]);
		if(koike){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
	private static boolean judge(int a,int b, int c, int d, int e, int f){
		int t = d-a;
		int distance = Math.abs(e-b)+Math.abs(f-c);
		return t>=distance && (t-distance)%2==0;
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[][] way= new int[n][3];

		for(int i =0;i<3*n;i++){
			int b=i%3;
			int a=(i-b)/3;
			int m = sc.nextInt();
			way[a][b]= m;
		}

		boolean koike = true;
		for(int i = 0;i<n-1;i++){
			koike &= judge(way[i][0],way[i][1],way[i][2],way[i+1][0],way[i+1][1],way[i+1][2]);
		}
		koike &= judge(0,0,0,way[0][0],way[0][1],way[0][2]);
		if(koike){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
	private static boolean judge(int a,int b, int c, int d, int e, int f){
		int t = d-a;
		int distance = Math.abs(e-b)+Math.abs(f-c);
		return t>=distance && (t-distance)%2==0;
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[][] way= new int[n][3];

		for(int i =0;i<3*n;i++){
			int b=i%3;
			int a=(i-b)/3;
			int m = sc.nextInt();
			way[a][b]= m;
		}

		boolean koike = true;
		for(int i = 0;i<n-1;i++){
			koike &= judge(way[i][0],way[i][1],way[i][2],way[i+1][0],way[i+1][1],way[i+1][2]);
		}
		koike &= judge(0,0,0,way[0][0],way[0][1],way[0][2]);
		if(koike){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
	private static boolean judge(int a,int b, int c, int d, int e, int f){
		int t = d-a;
		int distance = Math.abs(e-b)+Math.abs(f-c);
		return t>=distance && (t-distance)%2==0;
	}
}
