import java.util.Scanner;

public class Main {

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

        for(int i = 0; i < n; i++){
            pos[i][0] = sc.nextInt();
            pos[i][1] = sc.nextInt();
            pos[i][2] = sc.nextInt();
        }
        sc.close();

        int[] curentPos = {0,0,0};
        boolean canTravel = true;
        for(int[] nextPos: pos){
            boolean canMove = false;
            if(nextPos[0] % 2 == (nextPos[1] + nextPos[2]) % 2){
                int timeDiff = nextPos[0] - curentPos[0];
                int xDiff = Math.abs(nextPos[1] - curentPos[1]);
                int yDiff = Math.abs(nextPos[2] - curentPos[2]);
                if(timeDiff >= (xDiff + yDiff)){
                    curentPos = nextPos;
                    canMove = true;
                }
            }

            if(!canMove){
                canTravel = false;
                break;
            }
        }

        if(canTravel){
            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[][] pos = new int[n][3];

        for(int i = 0; i < n; i++){
            pos[i][0] = sc.nextInt();
            pos[i][1] = sc.nextInt();
            pos[i][2] = sc.nextInt();
        }
        sc.close();

        int[] curentPos = {0,0,0};
        boolean canTravel = true;
        for(int[] nextPos: pos){
            boolean canMove = false;
            if(nextPos[0] % 2 == (nextPos[1] + nextPos[2]) % 2){
                int timeDiff = nextPos[0] - curentPos[0];
                int xDiff = Math.abs(nextPos[1] - curentPos[1]);
                int yDiff = Math.abs(nextPos[2] - curentPos[2]);
                if(timeDiff >= (xDiff + yDiff)){
                    curentPos = nextPos;
                    canMove = true;
                }
            }

            if(!canMove){
                canTravel = false;
                break;
            }
        }

        if(canTravel){
            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[][] pos = new int[n][3];

        for(int i = 0; i < n; i++){
            pos[i][0] = sc.nextInt();
            pos[i][1] = sc.nextInt();
            pos[i][2] = sc.nextInt();
        }
        sc.close();

        int[] curentPos = {0,0,0};
        boolean canTravel = true;
        for(int[] nextPos: pos){
            boolean canMove = false;
            if(nextPos[0] % 2 == (nextPos[1] + nextPos[2]) % 2){
                int timeDiff = nextPos[0] - curentPos[0];
                int xDiff = Math.abs(nextPos[1] - curentPos[1]);
                int yDiff = Math.abs(nextPos[2] - curentPos[2]);
                if(timeDiff >= (xDiff + yDiff)){
                    curentPos = nextPos;
                    canMove = true;
                }
            }

            if(!canMove){
                canTravel = false;
                break;
            }
        }

        if(canTravel){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] pos = new int[n][3];

        for(int i = 0; i < n; i++){
            pos[i][0] = sc.nextInt();
            pos[i][1] = sc.nextInt();
            pos[i][2] = sc.nextInt();
        }
        sc.close();

        int[] curentPos = {0,0,0};
        boolean canTravel = true;
        for(int[] nextPos: pos){
            boolean canMove = false;
            if(nextPos[0] % 2 == (nextPos[1] + nextPos[2]) % 2){
                int timeDiff = nextPos[0] - curentPos[0];
                int xDiff = Math.abs(nextPos[1] - curentPos[1]);
                int yDiff = Math.abs(nextPos[2] - curentPos[2]);
                if(timeDiff >= (xDiff + yDiff)){
                    curentPos = nextPos;
                    canMove = true;
                }
            }

            if(!canMove){
                canTravel = false;
                break;
            }
        }

        if(canTravel){
            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[][] pos = new int[n][3]; pos new int[n][3] n 3 for(int i = 0; i < n; i++){
            pos[i][0] = sc.nextInt();
            pos[i][1] = sc.nextInt();
            pos[i][2] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            pos[i][0] = sc.nextInt();
            pos[i][1] = sc.nextInt();
            pos[i][2] = sc.nextInt();
        } {
            pos[i][0] = sc.nextInt();
            pos[i][1] = sc.nextInt();
            pos[i][2] = sc.nextInt();
        } pos[i][0] = sc.nextInt() pos[i][0] pos[i] pos i 0 sc.nextInt() sc.nextInt sc pos[i][1] = sc.nextInt() pos[i][1] pos[i] pos i 1 sc.nextInt() sc.nextInt sc pos[i][2] = sc.nextInt() pos[i][2] pos[i] pos i 2 sc.nextInt() sc.nextInt sc sc.close() sc.close sc int[] curentPos = {0,0,0}; curentPos {0,0,0} 0 0 0 boolean canTravel = true; canTravel true for(int[] nextPos: pos){
            boolean canMove = false;
            if(nextPos[0] % 2 == (nextPos[1] + nextPos[2]) % 2){
                int timeDiff = nextPos[0] - curentPos[0];
                int xDiff = Math.abs(nextPos[1] - curentPos[1]);
                int yDiff = Math.abs(nextPos[2] - curentPos[2]);
                if(timeDiff >= (xDiff + yDiff)){
                    curentPos = nextPos;
                    canMove = true;
                }
            }

            if(!canMove){
                canTravel = false;
                break;
            }
        } int[] nextPos pos {
            boolean canMove = false;
            if(nextPos[0] % 2 == (nextPos[1] + nextPos[2]) % 2){
                int timeDiff = nextPos[0] - curentPos[0];
                int xDiff = Math.abs(nextPos[1] - curentPos[1]);
                int yDiff = Math.abs(nextPos[2] - curentPos[2]);
                if(timeDiff >= (xDiff + yDiff)){
                    curentPos = nextPos;
                    canMove = true;
                }
            }

            if(!canMove){
                canTravel = false;
                break;
            }
        } {
            boolean canMove = false;
            if(nextPos[0] % 2 == (nextPos[1] + nextPos[2]) % 2){
                int timeDiff = nextPos[0] - curentPos[0];
                int xDiff = Math.abs(nextPos[1] - curentPos[1]);
                int yDiff = Math.abs(nextPos[2] - curentPos[2]);
                if(timeDiff >= (xDiff + yDiff)){
                    curentPos = nextPos;
                    canMove = true;
                }
            }

            if(!canMove){
                canTravel = false;
                break;
            }
        } boolean canMove = false; canMove false if(nextPos[0] % 2 == (nextPos[1] + nextPos[2]) % 2){
                int timeDiff = nextPos[0] - curentPos[0];
                int xDiff = Math.abs(nextPos[1] - curentPos[1]);
                int yDiff = Math.abs(nextPos[2] - curentPos[2]);
                if(timeDiff >= (xDiff + yDiff)){
                    curentPos = nextPos;
                    canMove = true;
                }
            } nextPos[0] % 2 == (nextPos[1] + nextPos[2]) % 2 nextPos[0] % 2 nextPos[0] nextPos 0 2 (nextPos[1] + nextPos[2]) % 2 (nextPos[1] + nextPos[2]) nextPos[1] nextPos 1 nextPos[2] nextPos 2 2 {
                int timeDiff = nextPos[0] - curentPos[0];
                int xDiff = Math.abs(nextPos[1] - curentPos[1]);
                int yDiff = Math.abs(nextPos[2] - curentPos[2]);
                if(timeDiff >= (xDiff + yDiff)){
                    curentPos = nextPos;
                    canMove = true;
                }
            } int timeDiff = nextPos[0] - curentPos[0]; timeDiff nextPos[0] - curentPos[0] nextPos[0] nextPos 0 curentPos[0] curentPos 0 int xDiff = Math.abs(nextPos[1] - curentPos[1]); xDiff Math.abs(nextPos[1] - curentPos[1]) Math.abs Math nextPos[1] - curentPos[1] nextPos[1] nextPos 1 curentPos[1] curentPos 1 int yDiff = Math.abs(nextPos[2] - curentPos[2]); yDiff Math.abs(nextPos[2] - curentPos[2]) Math.abs Math nextPos[2] - curentPos[2] nextPos[2] nextPos 2 curentPos[2] curentPos 2 if(timeDiff >= (xDiff + yDiff)){
                    curentPos = nextPos;
                    canMove = true;
                } timeDiff >= (xDiff + yDiff) timeDiff (xDiff + yDiff) xDiff yDiff {
                    curentPos = nextPos;
                    canMove = true;
                } curentPos = nextPos curentPos nextPos canMove = true canMove true if(!canMove){
                canTravel = false;
                break;
            } !canMove canMove {
                canTravel = false;
                break;
            } canTravel = false canTravel false break; if(canTravel){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } canTravel {
            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[][] pos = new int[n][3];

        for(int i = 0; i < n; i++){
            pos[i][0] = sc.nextInt();
            pos[i][1] = sc.nextInt();
            pos[i][2] = sc.nextInt();
        }
        sc.close();

        int[] curentPos = {0,0,0};
        boolean canTravel = true;
        for(int[] nextPos: pos){
            boolean canMove = false;
            if(nextPos[0] % 2 == (nextPos[1] + nextPos[2]) % 2){
                int timeDiff = nextPos[0] - curentPos[0];
                int xDiff = Math.abs(nextPos[1] - curentPos[1]);
                int yDiff = Math.abs(nextPos[2] - curentPos[2]);
                if(timeDiff >= (xDiff + yDiff)){
                    curentPos = nextPos;
                    canMove = true;
                }
            }

            if(!canMove){
                canTravel = false;
                break;
            }
        }

        if(canTravel){
            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[][] pos = new int[n][3];

        for(int i = 0; i < n; i++){
            pos[i][0] = sc.nextInt();
            pos[i][1] = sc.nextInt();
            pos[i][2] = sc.nextInt();
        }
        sc.close();

        int[] curentPos = {0,0,0};
        boolean canTravel = true;
        for(int[] nextPos: pos){
            boolean canMove = false;
            if(nextPos[0] % 2 == (nextPos[1] + nextPos[2]) % 2){
                int timeDiff = nextPos[0] - curentPos[0];
                int xDiff = Math.abs(nextPos[1] - curentPos[1]);
                int yDiff = Math.abs(nextPos[2] - curentPos[2]);
                if(timeDiff >= (xDiff + yDiff)){
                    curentPos = nextPos;
                    canMove = true;
                }
            }

            if(!canMove){
                canTravel = false;
                break;
            }
        }

        if(canTravel){
            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[][] pos = new int[n][3];

        for(int i = 0; i < n; i++){
            pos[i][0] = sc.nextInt();
            pos[i][1] = sc.nextInt();
            pos[i][2] = sc.nextInt();
        }
        sc.close();

        int[] curentPos = {0,0,0};
        boolean canTravel = true;
        for(int[] nextPos: pos){
            boolean canMove = false;
            if(nextPos[0] % 2 == (nextPos[1] + nextPos[2]) % 2){
                int timeDiff = nextPos[0] - curentPos[0];
                int xDiff = Math.abs(nextPos[1] - curentPos[1]);
                int yDiff = Math.abs(nextPos[2] - curentPos[2]);
                if(timeDiff >= (xDiff + yDiff)){
                    curentPos = nextPos;
                    canMove = true;
                }
            }

            if(!canMove){
                canTravel = false;
                break;
            }
        }

        if(canTravel){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }

}
