
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int[][] A = new int[N+1][3];
		for(int i = 1 ; i <= N ; i++){
			for(int j = 0 ; j < 3 ; j++){
				A[i][j] = sc.nextInt();
			}
		}

		A[0][0] = 0;
		A[0][1] = 0;
		A[0][2] = 0;

		sc.close();
		int count = 0;
		for(int i = 1 ; i <= N ; i++){
			int tmp = Math.abs(A[i][1]-A[i-1][1]) + Math.abs(A[i][2] - A[i-1][2]);
			int tmp2 = Math.abs(A[i][0]-A[i-1][0]);

			//System.out.println("tmp : " +tmp);
			//System.out.println("tmp2 : " +tmp2);

			if((tmp2%2 == tmp%2) && tmp2 >= tmp){
				count++;
			}
		}

		if(count == N){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}
	}
} 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[][] A = new int[N+1][3];
		for(int i = 1 ; i <= N ; i++){
			for(int j = 0 ; j < 3 ; j++){
				A[i][j] = sc.nextInt();
			}
		}

		A[0][0] = 0;
		A[0][1] = 0;
		A[0][2] = 0;

		sc.close();
		int count = 0;
		for(int i = 1 ; i <= N ; i++){
			int tmp = Math.abs(A[i][1]-A[i-1][1]) + Math.abs(A[i][2] - A[i-1][2]);
			int tmp2 = Math.abs(A[i][0]-A[i-1][0]);

			//System.out.println("tmp : " +tmp);
			//System.out.println("tmp2 : " +tmp2);

			if((tmp2%2 == tmp%2) && tmp2 >= tmp){
				count++;
			}
		}

		if(count == N){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int[][] A = new int[N+1][3];
		for(int i = 1 ; i <= N ; i++){
			for(int j = 0 ; j < 3 ; j++){
				A[i][j] = sc.nextInt();
			}
		}

		A[0][0] = 0;
		A[0][1] = 0;
		A[0][2] = 0;

		sc.close();
		int count = 0;
		for(int i = 1 ; i <= N ; i++){
			int tmp = Math.abs(A[i][1]-A[i-1][1]) + Math.abs(A[i][2] - A[i-1][2]);
			int tmp2 = Math.abs(A[i][0]-A[i-1][0]);

			//System.out.println("tmp : " +tmp);
			//System.out.println("tmp2 : " +tmp2);

			if((tmp2%2 == tmp%2) && tmp2 >= tmp){
				count++;
			}
		}

		if(count == N){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int[][] A = new int[N+1][3];
		for(int i = 1 ; i <= N ; i++){
			for(int j = 0 ; j < 3 ; j++){
				A[i][j] = sc.nextInt();
			}
		}

		A[0][0] = 0;
		A[0][1] = 0;
		A[0][2] = 0;

		sc.close();
		int count = 0;
		for(int i = 1 ; i <= N ; i++){
			int tmp = Math.abs(A[i][1]-A[i-1][1]) + Math.abs(A[i][2] - A[i-1][2]);
			int tmp2 = Math.abs(A[i][0]-A[i-1][0]);

			//System.out.println("tmp : " +tmp);
			//System.out.println("tmp2 : " +tmp2);

			if((tmp2%2 == tmp%2) && tmp2 >= tmp){
				count++;
			}
		}

		if(count == N){
			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[][] A = new int[N+1][3]; A new int[N+1][3] N+1 N 1 3 for(int i = 1 ; i <= N ; i++){
			for(int j = 0 ; j < 3 ; j++){
				A[i][j] = sc.nextInt();
			}
		} int i = 1 ; int i = 1 ; i 1 i <= N i N i++ i++ i {
			for(int j = 0 ; j < 3 ; j++){
				A[i][j] = sc.nextInt();
			}
		} {
			for(int j = 0 ; j < 3 ; j++){
				A[i][j] = sc.nextInt();
			}
		} for(int j = 0 ; j < 3 ; j++){
				A[i][j] = sc.nextInt();
			} int j = 0 ; int j = 0 ; j 0 j < 3 j 3 j++ j++ j {
				A[i][j] = sc.nextInt();
			} {
				A[i][j] = sc.nextInt();
			} A[i][j] = sc.nextInt() A[i][j] A[i] A i j sc.nextInt() sc.nextInt sc A[0][0] = 0 A[0][0] A[0] A 0 0 0 A[0][1] = 0 A[0][1] A[0] A 0 1 0 A[0][2] = 0 A[0][2] A[0] A 0 2 0 sc.close() sc.close sc int count = 0; count 0 for(int i = 1 ; i <= N ; i++){
			int tmp = Math.abs(A[i][1]-A[i-1][1]) + Math.abs(A[i][2] - A[i-1][2]);
			int tmp2 = Math.abs(A[i][0]-A[i-1][0]);

			//System.out.println("tmp : " +tmp);
			//System.out.println("tmp2 : " +tmp2);

			if((tmp2%2 == tmp%2) && tmp2 >= tmp){
				count++;
			}
		} int i = 1 ; int i = 1 ; i 1 i <= N i N i++ i++ i {
			int tmp = Math.abs(A[i][1]-A[i-1][1]) + Math.abs(A[i][2] - A[i-1][2]);
			int tmp2 = Math.abs(A[i][0]-A[i-1][0]);

			//System.out.println("tmp : " +tmp);
			//System.out.println("tmp2 : " +tmp2);

			if((tmp2%2 == tmp%2) && tmp2 >= tmp){
				count++;
			}
		} {
			int tmp = Math.abs(A[i][1]-A[i-1][1]) + Math.abs(A[i][2] - A[i-1][2]);
			int tmp2 = Math.abs(A[i][0]-A[i-1][0]);

			//System.out.println("tmp : " +tmp);
			//System.out.println("tmp2 : " +tmp2);

			if((tmp2%2 == tmp%2) && tmp2 >= tmp){
				count++;
			}
		} int tmp = Math.abs(A[i][1]-A[i-1][1]) + Math.abs(A[i][2] - A[i-1][2]); tmp Math.abs(A[i][1]-A[i-1][1]) + Math.abs(A[i][2] - A[i-1][2]) Math.abs(A[i][1]-A[i-1][1]) Math.abs Math A[i][1]-A[i-1][1] A[i][1] A[i] A i 1 A[i-1][1] A[i-1] A i-1 i 1 1 Math.abs(A[i][2] - A[i-1][2]) Math.abs Math A[i][2] - A[i-1][2] A[i][2] A[i] A i 2 A[i-1][2] A[i-1] A i-1 i 1 2 int tmp2 = Math.abs(A[i][0]-A[i-1][0]); tmp2 Math.abs(A[i][0]-A[i-1][0]) Math.abs Math A[i][0]-A[i-1][0] A[i][0] A[i] A i 0 A[i-1][0] A[i-1] A i-1 i 1 0 if((tmp2%2 == tmp%2) && tmp2 >= tmp){
				count++;
			} (tmp2%2 == tmp%2) && tmp2 >= tmp (tmp2%2 == tmp%2) tmp2%2 tmp2 2 tmp%2 tmp 2 tmp2 >= tmp tmp2 tmp {
				count++;
			} count++ count if(count == N){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		} count == N count N {
			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 public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int[][] A = new int[N+1][3];
		for(int i = 1 ; i <= N ; i++){
			for(int j = 0 ; j < 3 ; j++){
				A[i][j] = sc.nextInt();
			}
		}

		A[0][0] = 0;
		A[0][1] = 0;
		A[0][2] = 0;

		sc.close();
		int count = 0;
		for(int i = 1 ; i <= N ; i++){
			int tmp = Math.abs(A[i][1]-A[i-1][1]) + Math.abs(A[i][2] - A[i-1][2]);
			int tmp2 = Math.abs(A[i][0]-A[i-1][0]);

			//System.out.println("tmp : " +tmp);
			//System.out.println("tmp2 : " +tmp2);

			if((tmp2%2 == tmp%2) && tmp2 >= tmp){
				count++;
			}
		}

		if(count == N){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int[][] A = new int[N+1][3];
		for(int i = 1 ; i <= N ; i++){
			for(int j = 0 ; j < 3 ; j++){
				A[i][j] = sc.nextInt();
			}
		}

		A[0][0] = 0;
		A[0][1] = 0;
		A[0][2] = 0;

		sc.close();
		int count = 0;
		for(int i = 1 ; i <= N ; i++){
			int tmp = Math.abs(A[i][1]-A[i-1][1]) + Math.abs(A[i][2] - A[i-1][2]);
			int tmp2 = Math.abs(A[i][0]-A[i-1][0]);

			//System.out.println("tmp : " +tmp);
			//System.out.println("tmp2 : " +tmp2);

			if((tmp2%2 == tmp%2) && tmp2 >= tmp){
				count++;
			}
		}

		if(count == N){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}
	}
} 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[][] A = new int[N+1][3];
		for(int i = 1 ; i <= N ; i++){
			for(int j = 0 ; j < 3 ; j++){
				A[i][j] = sc.nextInt();
			}
		}

		A[0][0] = 0;
		A[0][1] = 0;
		A[0][2] = 0;

		sc.close();
		int count = 0;
		for(int i = 1 ; i <= N ; i++){
			int tmp = Math.abs(A[i][1]-A[i-1][1]) + Math.abs(A[i][2] - A[i-1][2]);
			int tmp2 = Math.abs(A[i][0]-A[i-1][0]);

			//System.out.println("tmp : " +tmp);
			//System.out.println("tmp2 : " +tmp2);

			if((tmp2%2 == tmp%2) && tmp2 >= tmp){
				count++;
			}
		}

		if(count == N){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}
	}
}