import java.util.Scanner;

public class Main { 
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int moveCount = Integer.parseInt(sc.nextLine());
    	
    	boolean okFlag = true;
    	int prePosX = 0;
    	int prePosY = 0;
    	int preTime = 0;
    	//check the route avaible
    	for(int i = 1;i<=moveCount;i++) {
    		String[] line = sc.nextLine().split(" ");
    		int time = Integer.parseInt(line[0]);
    		int posX = Integer.parseInt(line[1]);
    		int posY = Integer.parseInt(line[2]);
    		int disX = Math.abs(posX - prePosX);
    		int disY = Math.abs(posY - prePosY);
    		int disTime = Math.abs(time - preTime);
    		//check the distance
    		if(disTime < (disX + disY)) {
    			okFlag = false;
    			break;
    		}
    		
    		//check the avaible position
    		if(disTime%2 != (disX + disY)%2) {
    			okFlag = false;
    			break;
    		}
    		
    		prePosX = posX;
    		prePosY = posY;
    		preTime = time;
    		
    	}
    	if(okFlag) {
    		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 moveCount = Integer.parseInt(sc.nextLine());
    	
    	boolean okFlag = true;
    	int prePosX = 0;
    	int prePosY = 0;
    	int preTime = 0;
    	//check the route avaible
    	for(int i = 1;i<=moveCount;i++) {
    		String[] line = sc.nextLine().split(" ");
    		int time = Integer.parseInt(line[0]);
    		int posX = Integer.parseInt(line[1]);
    		int posY = Integer.parseInt(line[2]);
    		int disX = Math.abs(posX - prePosX);
    		int disY = Math.abs(posY - prePosY);
    		int disTime = Math.abs(time - preTime);
    		//check the distance
    		if(disTime < (disX + disY)) {
    			okFlag = false;
    			break;
    		}
    		
    		//check the avaible position
    		if(disTime%2 != (disX + disY)%2) {
    			okFlag = false;
    			break;
    		}
    		
    		prePosX = posX;
    		prePosY = posY;
    		preTime = time;
    		
    	}
    	if(okFlag) {
    		System.out.println("Yes");
    	}else {
    		System.out.println("No");
    	}
    	
    	
    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int moveCount = Integer.parseInt(sc.nextLine());
    	
    	boolean okFlag = true;
    	int prePosX = 0;
    	int prePosY = 0;
    	int preTime = 0;
    	//check the route avaible
    	for(int i = 1;i<=moveCount;i++) {
    		String[] line = sc.nextLine().split(" ");
    		int time = Integer.parseInt(line[0]);
    		int posX = Integer.parseInt(line[1]);
    		int posY = Integer.parseInt(line[2]);
    		int disX = Math.abs(posX - prePosX);
    		int disY = Math.abs(posY - prePosY);
    		int disTime = Math.abs(time - preTime);
    		//check the distance
    		if(disTime < (disX + disY)) {
    			okFlag = false;
    			break;
    		}
    		
    		//check the avaible position
    		if(disTime%2 != (disX + disY)%2) {
    			okFlag = false;
    			break;
    		}
    		
    		prePosX = posX;
    		prePosY = posY;
    		preTime = time;
    		
    	}
    	if(okFlag) {
    		System.out.println("Yes");
    	}else {
    		System.out.println("No");
    	}
    	
    	
    } main {
    	Scanner sc = new Scanner(System.in);
    	int moveCount = Integer.parseInt(sc.nextLine());
    	
    	boolean okFlag = true;
    	int prePosX = 0;
    	int prePosY = 0;
    	int preTime = 0;
    	//check the route avaible
    	for(int i = 1;i<=moveCount;i++) {
    		String[] line = sc.nextLine().split(" ");
    		int time = Integer.parseInt(line[0]);
    		int posX = Integer.parseInt(line[1]);
    		int posY = Integer.parseInt(line[2]);
    		int disX = Math.abs(posX - prePosX);
    		int disY = Math.abs(posY - prePosY);
    		int disTime = Math.abs(time - preTime);
    		//check the distance
    		if(disTime < (disX + disY)) {
    			okFlag = false;
    			break;
    		}
    		
    		//check the avaible position
    		if(disTime%2 != (disX + disY)%2) {
    			okFlag = false;
    			break;
    		}
    		
    		prePosX = posX;
    		prePosY = posY;
    		preTime = time;
    		
    	}
    	if(okFlag) {
    		System.out.println("Yes");
    	}else {
    		System.out.println("No");
    	}
    	
    	
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int moveCount = Integer.parseInt(sc.nextLine()); moveCount Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc boolean okFlag = true; okFlag true int prePosX = 0; prePosX 0 int prePosY = 0; prePosY 0 int preTime = 0; preTime 0 for(int i = 1;i<=moveCount;i++) {
    		String[] line = sc.nextLine().split(" ");
    		int time = Integer.parseInt(line[0]);
    		int posX = Integer.parseInt(line[1]);
    		int posY = Integer.parseInt(line[2]);
    		int disX = Math.abs(posX - prePosX);
    		int disY = Math.abs(posY - prePosY);
    		int disTime = Math.abs(time - preTime);
    		//check the distance
    		if(disTime < (disX + disY)) {
    			okFlag = false;
    			break;
    		}
    		
    		//check the avaible position
    		if(disTime%2 != (disX + disY)%2) {
    			okFlag = false;
    			break;
    		}
    		
    		prePosX = posX;
    		prePosY = posY;
    		preTime = time;
    		
    	} int i = 1; int i = 1; i 1 i<=moveCount i moveCount i++ i++ i {
    		String[] line = sc.nextLine().split(" ");
    		int time = Integer.parseInt(line[0]);
    		int posX = Integer.parseInt(line[1]);
    		int posY = Integer.parseInt(line[2]);
    		int disX = Math.abs(posX - prePosX);
    		int disY = Math.abs(posY - prePosY);
    		int disTime = Math.abs(time - preTime);
    		//check the distance
    		if(disTime < (disX + disY)) {
    			okFlag = false;
    			break;
    		}
    		
    		//check the avaible position
    		if(disTime%2 != (disX + disY)%2) {
    			okFlag = false;
    			break;
    		}
    		
    		prePosX = posX;
    		prePosY = posY;
    		preTime = time;
    		
    	} {
    		String[] line = sc.nextLine().split(" ");
    		int time = Integer.parseInt(line[0]);
    		int posX = Integer.parseInt(line[1]);
    		int posY = Integer.parseInt(line[2]);
    		int disX = Math.abs(posX - prePosX);
    		int disY = Math.abs(posY - prePosY);
    		int disTime = Math.abs(time - preTime);
    		//check the distance
    		if(disTime < (disX + disY)) {
    			okFlag = false;
    			break;
    		}
    		
    		//check the avaible position
    		if(disTime%2 != (disX + disY)%2) {
    			okFlag = false;
    			break;
    		}
    		
    		prePosX = posX;
    		prePosY = posY;
    		preTime = time;
    		
    	} String[] line = sc.nextLine().split(" "); line sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int time = Integer.parseInt(line[0]); time Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int posX = Integer.parseInt(line[1]); posX Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 int posY = Integer.parseInt(line[2]); posY Integer.parseInt(line[2]) Integer.parseInt Integer line[2] line 2 int disX = Math.abs(posX - prePosX); disX Math.abs(posX - prePosX) Math.abs Math posX - prePosX posX prePosX int disY = Math.abs(posY - prePosY); disY Math.abs(posY - prePosY) Math.abs Math posY - prePosY posY prePosY int disTime = Math.abs(time - preTime); disTime Math.abs(time - preTime) Math.abs Math time - preTime time preTime if(disTime < (disX + disY)) {
    			okFlag = false;
    			break;
    		} disTime < (disX + disY) disTime (disX + disY) disX disY {
    			okFlag = false;
    			break;
    		} okFlag = false okFlag false break; if(disTime%2 != (disX + disY)%2) {
    			okFlag = false;
    			break;
    		} disTime%2 != (disX + disY)%2 disTime%2 disTime 2 (disX + disY)%2 (disX + disY) disX disY 2 {
    			okFlag = false;
    			break;
    		} okFlag = false okFlag false break; prePosX = posX prePosX posX prePosY = posY prePosY posY preTime = time preTime time if(okFlag) {
    		System.out.println("Yes");
    	}else {
    		System.out.println("No");
    	} okFlag {
    		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 moveCount = Integer.parseInt(sc.nextLine());
    	
    	boolean okFlag = true;
    	int prePosX = 0;
    	int prePosY = 0;
    	int preTime = 0;
    	//check the route avaible
    	for(int i = 1;i<=moveCount;i++) {
    		String[] line = sc.nextLine().split(" ");
    		int time = Integer.parseInt(line[0]);
    		int posX = Integer.parseInt(line[1]);
    		int posY = Integer.parseInt(line[2]);
    		int disX = Math.abs(posX - prePosX);
    		int disY = Math.abs(posY - prePosY);
    		int disTime = Math.abs(time - preTime);
    		//check the distance
    		if(disTime < (disX + disY)) {
    			okFlag = false;
    			break;
    		}
    		
    		//check the avaible position
    		if(disTime%2 != (disX + disY)%2) {
    			okFlag = false;
    			break;
    		}
    		
    		prePosX = posX;
    		prePosY = posY;
    		preTime = time;
    		
    	}
    	if(okFlag) {
    		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 moveCount = Integer.parseInt(sc.nextLine());
    	
    	boolean okFlag = true;
    	int prePosX = 0;
    	int prePosY = 0;
    	int preTime = 0;
    	//check the route avaible
    	for(int i = 1;i<=moveCount;i++) {
    		String[] line = sc.nextLine().split(" ");
    		int time = Integer.parseInt(line[0]);
    		int posX = Integer.parseInt(line[1]);
    		int posY = Integer.parseInt(line[2]);
    		int disX = Math.abs(posX - prePosX);
    		int disY = Math.abs(posY - prePosY);
    		int disTime = Math.abs(time - preTime);
    		//check the distance
    		if(disTime < (disX + disY)) {
    			okFlag = false;
    			break;
    		}
    		
    		//check the avaible position
    		if(disTime%2 != (disX + disY)%2) {
    			okFlag = false;
    			break;
    		}
    		
    		prePosX = posX;
    		prePosY = posY;
    		preTime = time;
    		
    	}
    	if(okFlag) {
    		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 moveCount = Integer.parseInt(sc.nextLine());
    	
    	boolean okFlag = true;
    	int prePosX = 0;
    	int prePosY = 0;
    	int preTime = 0;
    	//check the route avaible
    	for(int i = 1;i<=moveCount;i++) {
    		String[] line = sc.nextLine().split(" ");
    		int time = Integer.parseInt(line[0]);
    		int posX = Integer.parseInt(line[1]);
    		int posY = Integer.parseInt(line[2]);
    		int disX = Math.abs(posX - prePosX);
    		int disY = Math.abs(posY - prePosY);
    		int disTime = Math.abs(time - preTime);
    		//check the distance
    		if(disTime < (disX + disY)) {
    			okFlag = false;
    			break;
    		}
    		
    		//check the avaible position
    		if(disTime%2 != (disX + disY)%2) {
    			okFlag = false;
    			break;
    		}
    		
    		prePosX = posX;
    		prePosY = posY;
    		preTime = time;
    		
    	}
    	if(okFlag) {
    		System.out.println("Yes");
    	}else {
    		System.out.println("No");
    	}
    	
    	
    }
}