import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[][] array = new int[n][3];
		for(int i=0;i<n;i++) {
			array[i][0] = sc.nextInt();
			array[i][1] = sc.nextInt();
			array[i][2] = sc.nextInt();
		}
		int x=0,y=0,t=0,i;
		for(i=0;i<n;i++) {
			int sub = array[i][0]-t;
			if((x+y)%2==0 ) {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2!=0) break;
				}else {
					if((array[i][1]+array[i][2])%2==0) break;
				}
			}else {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2==0) break;
				}else {
					if((array[i][1]+array[i][2])%2!=0) break;
				}
			}
			if(MHD(x,y,array[i][1],array[i][2])>sub) break;
			x=array[i][1];
			y=array[i][2];
			t=array[i][0];
		}
		if(i==n) System.out.println("Yes");
		else System.out.println("No");
	}

	public static int MHD(int x, int y, int a, int b) {
		return Math.abs(x-a)+Math.abs(y-b);
	}
} 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[][] array = new int[n][3];
		for(int i=0;i<n;i++) {
			array[i][0] = sc.nextInt();
			array[i][1] = sc.nextInt();
			array[i][2] = sc.nextInt();
		}
		int x=0,y=0,t=0,i;
		for(i=0;i<n;i++) {
			int sub = array[i][0]-t;
			if((x+y)%2==0 ) {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2!=0) break;
				}else {
					if((array[i][1]+array[i][2])%2==0) break;
				}
			}else {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2==0) break;
				}else {
					if((array[i][1]+array[i][2])%2!=0) break;
				}
			}
			if(MHD(x,y,array[i][1],array[i][2])>sub) break;
			x=array[i][1];
			y=array[i][2];
			t=array[i][0];
		}
		if(i==n) System.out.println("Yes");
		else System.out.println("No");
	}

	public static int MHD(int x, int y, int a, int b) {
		return Math.abs(x-a)+Math.abs(y-b);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[][] array = new int[n][3];
		for(int i=0;i<n;i++) {
			array[i][0] = sc.nextInt();
			array[i][1] = sc.nextInt();
			array[i][2] = sc.nextInt();
		}
		int x=0,y=0,t=0,i;
		for(i=0;i<n;i++) {
			int sub = array[i][0]-t;
			if((x+y)%2==0 ) {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2!=0) break;
				}else {
					if((array[i][1]+array[i][2])%2==0) break;
				}
			}else {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2==0) break;
				}else {
					if((array[i][1]+array[i][2])%2!=0) break;
				}
			}
			if(MHD(x,y,array[i][1],array[i][2])>sub) break;
			x=array[i][1];
			y=array[i][2];
			t=array[i][0];
		}
		if(i==n) System.out.println("Yes");
		else System.out.println("No");
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[][] array = new int[n][3];
		for(int i=0;i<n;i++) {
			array[i][0] = sc.nextInt();
			array[i][1] = sc.nextInt();
			array[i][2] = sc.nextInt();
		}
		int x=0,y=0,t=0,i;
		for(i=0;i<n;i++) {
			int sub = array[i][0]-t;
			if((x+y)%2==0 ) {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2!=0) break;
				}else {
					if((array[i][1]+array[i][2])%2==0) break;
				}
			}else {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2==0) break;
				}else {
					if((array[i][1]+array[i][2])%2!=0) break;
				}
			}
			if(MHD(x,y,array[i][1],array[i][2])>sub) break;
			x=array[i][1];
			y=array[i][2];
			t=array[i][0];
		}
		if(i==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[][] array = new int[n][3]; array new int[n][3] n 3 for(int i=0;i<n;i++) {
			array[i][0] = sc.nextInt();
			array[i][1] = sc.nextInt();
			array[i][2] = sc.nextInt();
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			array[i][0] = sc.nextInt();
			array[i][1] = sc.nextInt();
			array[i][2] = sc.nextInt();
		} {
			array[i][0] = sc.nextInt();
			array[i][1] = sc.nextInt();
			array[i][2] = sc.nextInt();
		} array[i][0] = sc.nextInt() array[i][0] array[i] array i 0 sc.nextInt() sc.nextInt sc array[i][1] = sc.nextInt() array[i][1] array[i] array i 1 sc.nextInt() sc.nextInt sc array[i][2] = sc.nextInt() array[i][2] array[i] array i 2 sc.nextInt() sc.nextInt sc int x=0 x 0 y=0 y 0 t=0 t 0 i; i for(i=0;i<n;i++) {
			int sub = array[i][0]-t;
			if((x+y)%2==0 ) {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2!=0) break;
				}else {
					if((array[i][1]+array[i][2])%2==0) break;
				}
			}else {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2==0) break;
				}else {
					if((array[i][1]+array[i][2])%2!=0) break;
				}
			}
			if(MHD(x,y,array[i][1],array[i][2])>sub) break;
			x=array[i][1];
			y=array[i][2];
			t=array[i][0];
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			int sub = array[i][0]-t;
			if((x+y)%2==0 ) {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2!=0) break;
				}else {
					if((array[i][1]+array[i][2])%2==0) break;
				}
			}else {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2==0) break;
				}else {
					if((array[i][1]+array[i][2])%2!=0) break;
				}
			}
			if(MHD(x,y,array[i][1],array[i][2])>sub) break;
			x=array[i][1];
			y=array[i][2];
			t=array[i][0];
		} {
			int sub = array[i][0]-t;
			if((x+y)%2==0 ) {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2!=0) break;
				}else {
					if((array[i][1]+array[i][2])%2==0) break;
				}
			}else {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2==0) break;
				}else {
					if((array[i][1]+array[i][2])%2!=0) break;
				}
			}
			if(MHD(x,y,array[i][1],array[i][2])>sub) break;
			x=array[i][1];
			y=array[i][2];
			t=array[i][0];
		} int sub = array[i][0]-t; sub array[i][0]-t array[i][0] array[i] array i 0 t if((x+y)%2==0 ) {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2!=0) break;
				}else {
					if((array[i][1]+array[i][2])%2==0) break;
				}
			}else {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2==0) break;
				}else {
					if((array[i][1]+array[i][2])%2!=0) break;
				}
			} (x+y)%2==0 (x+y)%2 (x+y) x y 2 0 {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2!=0) break;
				}else {
					if((array[i][1]+array[i][2])%2==0) break;
				}
			} if(sub%2==0) {
					if((array[i][1]+array[i][2])%2!=0) break;
				}else {
					if((array[i][1]+array[i][2])%2==0) break;
				} sub%2==0 sub%2 sub 2 0 {
					if((array[i][1]+array[i][2])%2!=0) break;
				} if((array[i][1]+array[i][2])%2!=0) break; (array[i][1]+array[i][2])%2!=0 (array[i][1]+array[i][2])%2 (array[i][1]+array[i][2]) array[i][1] array[i] array i 1 array[i][2] array[i] array i 2 2 0 break; {
					if((array[i][1]+array[i][2])%2==0) break;
				} if((array[i][1]+array[i][2])%2==0) break; (array[i][1]+array[i][2])%2==0 (array[i][1]+array[i][2])%2 (array[i][1]+array[i][2]) array[i][1] array[i] array i 1 array[i][2] array[i] array i 2 2 0 break; {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2==0) break;
				}else {
					if((array[i][1]+array[i][2])%2!=0) break;
				}
			} if(sub%2==0) {
					if((array[i][1]+array[i][2])%2==0) break;
				}else {
					if((array[i][1]+array[i][2])%2!=0) break;
				} sub%2==0 sub%2 sub 2 0 {
					if((array[i][1]+array[i][2])%2==0) break;
				} if((array[i][1]+array[i][2])%2==0) break; (array[i][1]+array[i][2])%2==0 (array[i][1]+array[i][2])%2 (array[i][1]+array[i][2]) array[i][1] array[i] array i 1 array[i][2] array[i] array i 2 2 0 break; {
					if((array[i][1]+array[i][2])%2!=0) break;
				} if((array[i][1]+array[i][2])%2!=0) break; (array[i][1]+array[i][2])%2!=0 (array[i][1]+array[i][2])%2 (array[i][1]+array[i][2]) array[i][1] array[i] array i 1 array[i][2] array[i] array i 2 2 0 break; if(MHD(x,y,array[i][1],array[i][2])>sub) break; MHD(x,y,array[i][1],array[i][2])>sub MHD(x,y,array[i][1],array[i][2]) MHD x y array[i][1] array[i] array i 1 array[i][2] array[i] array i 2 sub break; x=array[i][1] x array[i][1] array[i] array i 1 y=array[i][2] y array[i][2] array[i] array i 2 t=array[i][0] t array[i][0] array[i] array i 0 if(i==n) System.out.println("Yes");
		else System.out.println("No"); i==n i n System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args public static int MHD(int x, int y, int a, int b) {
		return Math.abs(x-a)+Math.abs(y-b);
	} MHD {
		return Math.abs(x-a)+Math.abs(y-b);
	} return Math.abs(x-a)+Math.abs(y-b); Math.abs(x-a)+Math.abs(y-b) Math.abs(x-a) Math.abs Math x-a x a Math.abs(y-b) Math.abs Math y-b y b int x x int y y int a a int b b public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[][] array = new int[n][3];
		for(int i=0;i<n;i++) {
			array[i][0] = sc.nextInt();
			array[i][1] = sc.nextInt();
			array[i][2] = sc.nextInt();
		}
		int x=0,y=0,t=0,i;
		for(i=0;i<n;i++) {
			int sub = array[i][0]-t;
			if((x+y)%2==0 ) {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2!=0) break;
				}else {
					if((array[i][1]+array[i][2])%2==0) break;
				}
			}else {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2==0) break;
				}else {
					if((array[i][1]+array[i][2])%2!=0) break;
				}
			}
			if(MHD(x,y,array[i][1],array[i][2])>sub) break;
			x=array[i][1];
			y=array[i][2];
			t=array[i][0];
		}
		if(i==n) System.out.println("Yes");
		else System.out.println("No");
	}

	public static int MHD(int x, int y, int a, int b) {
		return Math.abs(x-a)+Math.abs(y-b);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[][] array = new int[n][3];
		for(int i=0;i<n;i++) {
			array[i][0] = sc.nextInt();
			array[i][1] = sc.nextInt();
			array[i][2] = sc.nextInt();
		}
		int x=0,y=0,t=0,i;
		for(i=0;i<n;i++) {
			int sub = array[i][0]-t;
			if((x+y)%2==0 ) {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2!=0) break;
				}else {
					if((array[i][1]+array[i][2])%2==0) break;
				}
			}else {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2==0) break;
				}else {
					if((array[i][1]+array[i][2])%2!=0) break;
				}
			}
			if(MHD(x,y,array[i][1],array[i][2])>sub) break;
			x=array[i][1];
			y=array[i][2];
			t=array[i][0];
		}
		if(i==n) System.out.println("Yes");
		else System.out.println("No");
	}

	public static int MHD(int x, int y, int a, int b) {
		return Math.abs(x-a)+Math.abs(y-b);
	}
} 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[][] array = new int[n][3];
		for(int i=0;i<n;i++) {
			array[i][0] = sc.nextInt();
			array[i][1] = sc.nextInt();
			array[i][2] = sc.nextInt();
		}
		int x=0,y=0,t=0,i;
		for(i=0;i<n;i++) {
			int sub = array[i][0]-t;
			if((x+y)%2==0 ) {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2!=0) break;
				}else {
					if((array[i][1]+array[i][2])%2==0) break;
				}
			}else {
				if(sub%2==0) {
					if((array[i][1]+array[i][2])%2==0) break;
				}else {
					if((array[i][1]+array[i][2])%2!=0) break;
				}
			}
			if(MHD(x,y,array[i][1],array[i][2])>sub) break;
			x=array[i][1];
			y=array[i][2];
			t=array[i][0];
		}
		if(i==n) System.out.println("Yes");
		else System.out.println("No");
	}

	public static int MHD(int x, int y, int a, int b) {
		return Math.abs(x-a)+Math.abs(y-b);
	}
}