import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        //受け取り
        Scanner sc = new Scanner(System.in);
        int row = sc.nextInt();
        
        int[][] index = new int[row][3];
        
        for(int i=0;i<row;i++){
            index[i][0] = sc.nextInt();
            index[i][1] = sc.nextInt();
            index[i][2] = sc.nextInt();
        }
        
        // 初回実行
        int initX = Math.abs(index[0][1]);
        int initY = Math.abs(index[0][2]);
        
        int d = initX + initY;
        
        if(d>index[0][0] || d%2 != index[0][0]%2){
            System.out.println("No");
            System.exit(0);
        }
        
        
        // 以降の実行
        for(int i=1;i<row;i++){
            int x = Math.abs(index[i][1]-index[i-1][1]);
            int y = Math.abs(index[i][2]-index[i-1][2]);
            int distance = x + y;
            int s = index[i][0]-index[i-1][0];
            
            if(distance>s || distance%2 != s%2){
                System.out.println("No");
                System.exit(0);
            }
        }
        
        System.out.println("Yes");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        //受け取り
        Scanner sc = new Scanner(System.in);
        int row = sc.nextInt();
        
        int[][] index = new int[row][3];
        
        for(int i=0;i<row;i++){
            index[i][0] = sc.nextInt();
            index[i][1] = sc.nextInt();
            index[i][2] = sc.nextInt();
        }
        
        // 初回実行
        int initX = Math.abs(index[0][1]);
        int initY = Math.abs(index[0][2]);
        
        int d = initX + initY;
        
        if(d>index[0][0] || d%2 != index[0][0]%2){
            System.out.println("No");
            System.exit(0);
        }
        
        
        // 以降の実行
        for(int i=1;i<row;i++){
            int x = Math.abs(index[i][1]-index[i-1][1]);
            int y = Math.abs(index[i][2]-index[i-1][2]);
            int distance = x + y;
            int s = index[i][0]-index[i-1][0];
            
            if(distance>s || distance%2 != s%2){
                System.out.println("No");
                System.exit(0);
            }
        }
        
        System.out.println("Yes");
    }
} Main public static void main(String[] args) throws Exception {
        //受け取り
        Scanner sc = new Scanner(System.in);
        int row = sc.nextInt();
        
        int[][] index = new int[row][3];
        
        for(int i=0;i<row;i++){
            index[i][0] = sc.nextInt();
            index[i][1] = sc.nextInt();
            index[i][2] = sc.nextInt();
        }
        
        // 初回実行
        int initX = Math.abs(index[0][1]);
        int initY = Math.abs(index[0][2]);
        
        int d = initX + initY;
        
        if(d>index[0][0] || d%2 != index[0][0]%2){
            System.out.println("No");
            System.exit(0);
        }
        
        
        // 以降の実行
        for(int i=1;i<row;i++){
            int x = Math.abs(index[i][1]-index[i-1][1]);
            int y = Math.abs(index[i][2]-index[i-1][2]);
            int distance = x + y;
            int s = index[i][0]-index[i-1][0];
            
            if(distance>s || distance%2 != s%2){
                System.out.println("No");
                System.exit(0);
            }
        }
        
        System.out.println("Yes");
    } main {
        //受け取り
        Scanner sc = new Scanner(System.in);
        int row = sc.nextInt();
        
        int[][] index = new int[row][3];
        
        for(int i=0;i<row;i++){
            index[i][0] = sc.nextInt();
            index[i][1] = sc.nextInt();
            index[i][2] = sc.nextInt();
        }
        
        // 初回実行
        int initX = Math.abs(index[0][1]);
        int initY = Math.abs(index[0][2]);
        
        int d = initX + initY;
        
        if(d>index[0][0] || d%2 != index[0][0]%2){
            System.out.println("No");
            System.exit(0);
        }
        
        
        // 以降の実行
        for(int i=1;i<row;i++){
            int x = Math.abs(index[i][1]-index[i-1][1]);
            int y = Math.abs(index[i][2]-index[i-1][2]);
            int distance = x + y;
            int s = index[i][0]-index[i-1][0];
            
            if(distance>s || distance%2 != s%2){
                System.out.println("No");
                System.exit(0);
            }
        }
        
        System.out.println("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int row = sc.nextInt(); row sc.nextInt() sc.nextInt sc int[][] index = new int[row][3]; index new int[row][3] row 3 for(int i=0;i<row;i++){
            index[i][0] = sc.nextInt();
            index[i][1] = sc.nextInt();
            index[i][2] = sc.nextInt();
        } int i=0; int i=0; i 0 i<row i row i++ i++ i {
            index[i][0] = sc.nextInt();
            index[i][1] = sc.nextInt();
            index[i][2] = sc.nextInt();
        } {
            index[i][0] = sc.nextInt();
            index[i][1] = sc.nextInt();
            index[i][2] = sc.nextInt();
        } index[i][0] = sc.nextInt() index[i][0] index[i] index i 0 sc.nextInt() sc.nextInt sc index[i][1] = sc.nextInt() index[i][1] index[i] index i 1 sc.nextInt() sc.nextInt sc index[i][2] = sc.nextInt() index[i][2] index[i] index i 2 sc.nextInt() sc.nextInt sc int initX = Math.abs(index[0][1]); initX Math.abs(index[0][1]) Math.abs Math index[0][1] index[0] index 0 1 int initY = Math.abs(index[0][2]); initY Math.abs(index[0][2]) Math.abs Math index[0][2] index[0] index 0 2 int d = initX + initY; d initX + initY initX initY if(d>index[0][0] || d%2 != index[0][0]%2){
            System.out.println("No");
            System.exit(0);
        } d>index[0][0] || d%2 != index[0][0]%2 d>index[0][0] d index[0][0] index[0] index 0 0 d%2 != index[0][0]%2 d%2 d 2 index[0][0]%2 index[0][0] index[0] index 0 0 2 {
            System.out.println("No");
            System.exit(0);
        } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 for(int i=1;i<row;i++){
            int x = Math.abs(index[i][1]-index[i-1][1]);
            int y = Math.abs(index[i][2]-index[i-1][2]);
            int distance = x + y;
            int s = index[i][0]-index[i-1][0];
            
            if(distance>s || distance%2 != s%2){
                System.out.println("No");
                System.exit(0);
            }
        } int i=1; int i=1; i 1 i<row i row i++ i++ i {
            int x = Math.abs(index[i][1]-index[i-1][1]);
            int y = Math.abs(index[i][2]-index[i-1][2]);
            int distance = x + y;
            int s = index[i][0]-index[i-1][0];
            
            if(distance>s || distance%2 != s%2){
                System.out.println("No");
                System.exit(0);
            }
        } {
            int x = Math.abs(index[i][1]-index[i-1][1]);
            int y = Math.abs(index[i][2]-index[i-1][2]);
            int distance = x + y;
            int s = index[i][0]-index[i-1][0];
            
            if(distance>s || distance%2 != s%2){
                System.out.println("No");
                System.exit(0);
            }
        } int x = Math.abs(index[i][1]-index[i-1][1]); x Math.abs(index[i][1]-index[i-1][1]) Math.abs Math index[i][1]-index[i-1][1] index[i][1] index[i] index i 1 index[i-1][1] index[i-1] index i-1 i 1 1 int y = Math.abs(index[i][2]-index[i-1][2]); y Math.abs(index[i][2]-index[i-1][2]) Math.abs Math index[i][2]-index[i-1][2] index[i][2] index[i] index i 2 index[i-1][2] index[i-1] index i-1 i 1 2 int distance = x + y; distance x + y x y int s = index[i][0]-index[i-1][0]; s index[i][0]-index[i-1][0] index[i][0] index[i] index i 0 index[i-1][0] index[i-1] index i-1 i 1 0 if(distance>s || distance%2 != s%2){
                System.out.println("No");
                System.exit(0);
            } distance>s || distance%2 != s%2 distance>s distance s distance%2 != s%2 distance%2 distance 2 s%2 s 2 {
                System.out.println("No");
                System.exit(0);
            } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 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) throws Exception {
        //受け取り
        Scanner sc = new Scanner(System.in);
        int row = sc.nextInt();
        
        int[][] index = new int[row][3];
        
        for(int i=0;i<row;i++){
            index[i][0] = sc.nextInt();
            index[i][1] = sc.nextInt();
            index[i][2] = sc.nextInt();
        }
        
        // 初回実行
        int initX = Math.abs(index[0][1]);
        int initY = Math.abs(index[0][2]);
        
        int d = initX + initY;
        
        if(d>index[0][0] || d%2 != index[0][0]%2){
            System.out.println("No");
            System.exit(0);
        }
        
        
        // 以降の実行
        for(int i=1;i<row;i++){
            int x = Math.abs(index[i][1]-index[i-1][1]);
            int y = Math.abs(index[i][2]-index[i-1][2]);
            int distance = x + y;
            int s = index[i][0]-index[i-1][0];
            
            if(distance>s || distance%2 != s%2){
                System.out.println("No");
                System.exit(0);
            }
        }
        
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        //受け取り
        Scanner sc = new Scanner(System.in);
        int row = sc.nextInt();
        
        int[][] index = new int[row][3];
        
        for(int i=0;i<row;i++){
            index[i][0] = sc.nextInt();
            index[i][1] = sc.nextInt();
            index[i][2] = sc.nextInt();
        }
        
        // 初回実行
        int initX = Math.abs(index[0][1]);
        int initY = Math.abs(index[0][2]);
        
        int d = initX + initY;
        
        if(d>index[0][0] || d%2 != index[0][0]%2){
            System.out.println("No");
            System.exit(0);
        }
        
        
        // 以降の実行
        for(int i=1;i<row;i++){
            int x = Math.abs(index[i][1]-index[i-1][1]);
            int y = Math.abs(index[i][2]-index[i-1][2]);
            int distance = x + y;
            int s = index[i][0]-index[i-1][0];
            
            if(distance>s || distance%2 != s%2){
                System.out.println("No");
                System.exit(0);
            }
        }
        
        System.out.println("Yes");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        //受け取り
        Scanner sc = new Scanner(System.in);
        int row = sc.nextInt();
        
        int[][] index = new int[row][3];
        
        for(int i=0;i<row;i++){
            index[i][0] = sc.nextInt();
            index[i][1] = sc.nextInt();
            index[i][2] = sc.nextInt();
        }
        
        // 初回実行
        int initX = Math.abs(index[0][1]);
        int initY = Math.abs(index[0][2]);
        
        int d = initX + initY;
        
        if(d>index[0][0] || d%2 != index[0][0]%2){
            System.out.println("No");
            System.exit(0);
        }
        
        
        // 以降の実行
        for(int i=1;i<row;i++){
            int x = Math.abs(index[i][1]-index[i-1][1]);
            int y = Math.abs(index[i][2]-index[i-1][2]);
            int distance = x + y;
            int s = index[i][0]-index[i-1][0];
            
            if(distance>s || distance%2 != s%2){
                System.out.println("No");
                System.exit(0);
            }
        }
        
        System.out.println("Yes");
    }
}
