import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int [] t = new int[N];
        int [] x = new int[N];
        int [] y = new int[N];
        String str = "Yes";
        int flag = 0;

        for(int i = 0 ; i < N ; i++){
            t[i] = sc.nextInt();
            x[i] = sc.nextInt();
            y[i] = sc.nextInt();
        }

        for(int i = 0 ; i < N ; i++){
            if( (t[i] % 2 == 1) && (((x[i] + y[i])) % 2 == 1 ) && (((x[i] + y[i])) <= t[i])){
                continue;
            }
            else if ((t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i])) {
                continue;
            }

            else{
                flag = 1;
            }
        }

        if(flag == 1){
            str = "No";
        }

        System.out.println(str);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int [] t = new int[N];
        int [] x = new int[N];
        int [] y = new int[N];
        String str = "Yes";
        int flag = 0;

        for(int i = 0 ; i < N ; i++){
            t[i] = sc.nextInt();
            x[i] = sc.nextInt();
            y[i] = sc.nextInt();
        }

        for(int i = 0 ; i < N ; i++){
            if( (t[i] % 2 == 1) && (((x[i] + y[i])) % 2 == 1 ) && (((x[i] + y[i])) <= t[i])){
                continue;
            }
            else if ((t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i])) {
                continue;
            }

            else{
                flag = 1;
            }
        }

        if(flag == 1){
            str = "No";
        }

        System.out.println(str);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int [] t = new int[N];
        int [] x = new int[N];
        int [] y = new int[N];
        String str = "Yes";
        int flag = 0;

        for(int i = 0 ; i < N ; i++){
            t[i] = sc.nextInt();
            x[i] = sc.nextInt();
            y[i] = sc.nextInt();
        }

        for(int i = 0 ; i < N ; i++){
            if( (t[i] % 2 == 1) && (((x[i] + y[i])) % 2 == 1 ) && (((x[i] + y[i])) <= t[i])){
                continue;
            }
            else if ((t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i])) {
                continue;
            }

            else{
                flag = 1;
            }
        }

        if(flag == 1){
            str = "No";
        }

        System.out.println(str);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int [] t = new int[N];
        int [] x = new int[N];
        int [] y = new int[N];
        String str = "Yes";
        int flag = 0;

        for(int i = 0 ; i < N ; i++){
            t[i] = sc.nextInt();
            x[i] = sc.nextInt();
            y[i] = sc.nextInt();
        }

        for(int i = 0 ; i < N ; i++){
            if( (t[i] % 2 == 1) && (((x[i] + y[i])) % 2 == 1 ) && (((x[i] + y[i])) <= t[i])){
                continue;
            }
            else if ((t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i])) {
                continue;
            }

            else{
                flag = 1;
            }
        }

        if(flag == 1){
            str = "No";
        }

        System.out.println(str);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int [] t = new int[N]; t new int[N] N int [] x = new int[N]; x new int[N] N int [] y = new int[N]; y new int[N] N String str = "Yes"; str "Yes" int flag = 0; flag 0 for(int i = 0 ; i < N ; i++){
            t[i] = sc.nextInt();
            x[i] = sc.nextInt();
            y[i] = sc.nextInt();
        } int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
            t[i] = sc.nextInt();
            x[i] = sc.nextInt();
            y[i] = sc.nextInt();
        } {
            t[i] = sc.nextInt();
            x[i] = sc.nextInt();
            y[i] = sc.nextInt();
        } t[i] = sc.nextInt() t[i] t i sc.nextInt() sc.nextInt sc x[i] = sc.nextInt() x[i] x i sc.nextInt() sc.nextInt sc y[i] = sc.nextInt() y[i] y i sc.nextInt() sc.nextInt sc for(int i = 0 ; i < N ; i++){
            if( (t[i] % 2 == 1) && (((x[i] + y[i])) % 2 == 1 ) && (((x[i] + y[i])) <= t[i])){
                continue;
            }
            else if ((t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i])) {
                continue;
            }

            else{
                flag = 1;
            }
        } int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
            if( (t[i] % 2 == 1) && (((x[i] + y[i])) % 2 == 1 ) && (((x[i] + y[i])) <= t[i])){
                continue;
            }
            else if ((t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i])) {
                continue;
            }

            else{
                flag = 1;
            }
        } {
            if( (t[i] % 2 == 1) && (((x[i] + y[i])) % 2 == 1 ) && (((x[i] + y[i])) <= t[i])){
                continue;
            }
            else if ((t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i])) {
                continue;
            }

            else{
                flag = 1;
            }
        } if( (t[i] % 2 == 1) && (((x[i] + y[i])) % 2 == 1 ) && (((x[i] + y[i])) <= t[i])){
                continue;
            }
            else if ((t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i])) {
                continue;
            }

            else{
                flag = 1;
            } (t[i] % 2 == 1) && (((x[i] + y[i])) % 2 == 1 ) && (((x[i] + y[i])) <= t[i]) (t[i] % 2 == 1) && (((x[i] + y[i])) % 2 == 1 ) && (((x[i] + y[i])) <= t[i]) (t[i] % 2 == 1) t[i] % 2 t[i] t i 2 1 (((x[i] + y[i])) % 2 == 1 ) ((x[i] + y[i])) % 2 ((x[i] + y[i])) x[i] x i y[i] y i 2 1 (((x[i] + y[i])) <= t[i]) ((x[i] + y[i])) x[i] x i y[i] y i t[i] t i {
                continue;
            } continue; if ((t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i])) {
                continue;
            }

            else{
                flag = 1;
            } (t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i]) (t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i]) (t[i] % 2 == 0) t[i] % 2 t[i] t i 2 0 (((x[i] + y[i])) % 2 == 0 ) ((x[i] + y[i])) % 2 ((x[i] + y[i])) x[i] x i y[i] y i 2 0 (((x[i] + y[i])) <= t[i]) ((x[i] + y[i])) x[i] x i y[i] y i t[i] t i {
                continue;
            } continue; {
                flag = 1;
            } flag = 1 flag 1 if(flag == 1){
            str = "No";
        } flag == 1 flag 1 {
            str = "No";
        } str = "No" str "No" System.out.println(str) System.out.println System.out System System.out str String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int [] t = new int[N];
        int [] x = new int[N];
        int [] y = new int[N];
        String str = "Yes";
        int flag = 0;

        for(int i = 0 ; i < N ; i++){
            t[i] = sc.nextInt();
            x[i] = sc.nextInt();
            y[i] = sc.nextInt();
        }

        for(int i = 0 ; i < N ; i++){
            if( (t[i] % 2 == 1) && (((x[i] + y[i])) % 2 == 1 ) && (((x[i] + y[i])) <= t[i])){
                continue;
            }
            else if ((t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i])) {
                continue;
            }

            else{
                flag = 1;
            }
        }

        if(flag == 1){
            str = "No";
        }

        System.out.println(str);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int [] t = new int[N];
        int [] x = new int[N];
        int [] y = new int[N];
        String str = "Yes";
        int flag = 0;

        for(int i = 0 ; i < N ; i++){
            t[i] = sc.nextInt();
            x[i] = sc.nextInt();
            y[i] = sc.nextInt();
        }

        for(int i = 0 ; i < N ; i++){
            if( (t[i] % 2 == 1) && (((x[i] + y[i])) % 2 == 1 ) && (((x[i] + y[i])) <= t[i])){
                continue;
            }
            else if ((t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i])) {
                continue;
            }

            else{
                flag = 1;
            }
        }

        if(flag == 1){
            str = "No";
        }

        System.out.println(str);
    }
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int [] t = new int[N];
        int [] x = new int[N];
        int [] y = new int[N];
        String str = "Yes";
        int flag = 0;

        for(int i = 0 ; i < N ; i++){
            t[i] = sc.nextInt();
            x[i] = sc.nextInt();
            y[i] = sc.nextInt();
        }

        for(int i = 0 ; i < N ; i++){
            if( (t[i] % 2 == 1) && (((x[i] + y[i])) % 2 == 1 ) && (((x[i] + y[i])) <= t[i])){
                continue;
            }
            else if ((t[i] % 2 == 0) && (((x[i] + y[i])) % 2 == 0 ) && (((x[i] + y[i])) <= t[i])) {
                continue;
            }

            else{
                flag = 1;
            }
        }

        if(flag == 1){
            str = "No";
        }

        System.out.println(str);
    }
}