import java.util.*;
import java.util.regex.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 入力
        int n = sc.nextInt();
        int dt, dx, dy, dif;
        // 初期値
        boolean can = true;
        int t = 0;
        int x = 0;
        int y = 0;

        for (int i = 0; i < n; i++) {
            // 入力値
            dt = sc.nextInt();
            dx = sc.nextInt();
            dy = sc.nextInt();
            dif = Math.abs(dx - x) + Math.abs(dy - y) - dt + t;
            if (dif > 0 || (dif % 2 != 0)) {
                can = false;
            }
            t = dt;
            x = dx;
            y = dy;
        }

        // 出力
        if (can) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.*; util.* java import java.util.regex.*; regex.* java.util public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 入力
        int n = sc.nextInt();
        int dt, dx, dy, dif;
        // 初期値
        boolean can = true;
        int t = 0;
        int x = 0;
        int y = 0;

        for (int i = 0; i < n; i++) {
            // 入力値
            dt = sc.nextInt();
            dx = sc.nextInt();
            dy = sc.nextInt();
            dif = Math.abs(dx - x) + Math.abs(dy - y) - dt + t;
            if (dif > 0 || (dif % 2 != 0)) {
                can = false;
            }
            t = dt;
            x = dx;
            y = dy;
        }

        // 出力
        if (can) {
            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 dt, dx, dy, dif;
        // 初期値
        boolean can = true;
        int t = 0;
        int x = 0;
        int y = 0;

        for (int i = 0; i < n; i++) {
            // 入力値
            dt = sc.nextInt();
            dx = sc.nextInt();
            dy = sc.nextInt();
            dif = Math.abs(dx - x) + Math.abs(dy - y) - dt + t;
            if (dif > 0 || (dif % 2 != 0)) {
                can = false;
            }
            t = dt;
            x = dx;
            y = dy;
        }

        // 出力
        if (can) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        // 入力
        int n = sc.nextInt();
        int dt, dx, dy, dif;
        // 初期値
        boolean can = true;
        int t = 0;
        int x = 0;
        int y = 0;

        for (int i = 0; i < n; i++) {
            // 入力値
            dt = sc.nextInt();
            dx = sc.nextInt();
            dy = sc.nextInt();
            dif = Math.abs(dx - x) + Math.abs(dy - y) - dt + t;
            if (dif > 0 || (dif % 2 != 0)) {
                can = false;
            }
            t = dt;
            x = dx;
            y = dy;
        }

        // 出力
        if (can) {
            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 dt dt dx dx dy dy dif; dif boolean can = true; can true int t = 0; t 0 int x = 0; x 0 int y = 0; y 0 for (int i = 0; i < n; i++) {
            // 入力値
            dt = sc.nextInt();
            dx = sc.nextInt();
            dy = sc.nextInt();
            dif = Math.abs(dx - x) + Math.abs(dy - y) - dt + t;
            if (dif > 0 || (dif % 2 != 0)) {
                can = false;
            }
            t = dt;
            x = dx;
            y = dy;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            // 入力値
            dt = sc.nextInt();
            dx = sc.nextInt();
            dy = sc.nextInt();
            dif = Math.abs(dx - x) + Math.abs(dy - y) - dt + t;
            if (dif > 0 || (dif % 2 != 0)) {
                can = false;
            }
            t = dt;
            x = dx;
            y = dy;
        } {
            // 入力値
            dt = sc.nextInt();
            dx = sc.nextInt();
            dy = sc.nextInt();
            dif = Math.abs(dx - x) + Math.abs(dy - y) - dt + t;
            if (dif > 0 || (dif % 2 != 0)) {
                can = false;
            }
            t = dt;
            x = dx;
            y = dy;
        } dt = sc.nextInt() dt sc.nextInt() sc.nextInt sc dx = sc.nextInt() dx sc.nextInt() sc.nextInt sc dy = sc.nextInt() dy sc.nextInt() sc.nextInt sc dif = Math.abs(dx - x) + Math.abs(dy - y) - dt + t dif Math.abs(dx - x) + Math.abs(dy - y) - dt + t Math.abs(dx - x) + Math.abs(dy - y) - dt Math.abs(dx - x) + Math.abs(dy - y) Math.abs(dx - x) Math.abs Math dx - x dx x Math.abs(dy - y) Math.abs Math dy - y dy y dt t if (dif > 0 || (dif % 2 != 0)) {
                can = false;
            } dif > 0 || (dif % 2 != 0) dif > 0 dif 0 (dif % 2 != 0) dif % 2 dif 2 0 {
                can = false;
            } can = false can false t = dt t dt x = dx x dx y = dy y dy if (can) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } can {
            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 dt, dx, dy, dif;
        // 初期値
        boolean can = true;
        int t = 0;
        int x = 0;
        int y = 0;

        for (int i = 0; i < n; i++) {
            // 入力値
            dt = sc.nextInt();
            dx = sc.nextInt();
            dy = sc.nextInt();
            dif = Math.abs(dx - x) + Math.abs(dy - y) - dt + t;
            if (dif > 0 || (dif % 2 != 0)) {
                can = false;
            }
            t = dt;
            x = dx;
            y = dy;
        }

        // 出力
        if (can) {
            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 dt, dx, dy, dif;
        // 初期値
        boolean can = true;
        int t = 0;
        int x = 0;
        int y = 0;

        for (int i = 0; i < n; i++) {
            // 入力値
            dt = sc.nextInt();
            dx = sc.nextInt();
            dy = sc.nextInt();
            dif = Math.abs(dx - x) + Math.abs(dy - y) - dt + t;
            if (dif > 0 || (dif % 2 != 0)) {
                can = false;
            }
            t = dt;
            x = dx;
            y = dy;
        }

        // 出力
        if (can) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main
import java.util.*;
import java.util.regex.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 入力
        int n = sc.nextInt();
        int dt, dx, dy, dif;
        // 初期値
        boolean can = true;
        int t = 0;
        int x = 0;
        int y = 0;

        for (int i = 0; i < n; i++) {
            // 入力値
            dt = sc.nextInt();
            dx = sc.nextInt();
            dy = sc.nextInt();
            dif = Math.abs(dx - x) + Math.abs(dy - y) - dt + t;
            if (dif > 0 || (dif % 2 != 0)) {
                can = false;
            }
            t = dt;
            x = dx;
            y = dy;
        }

        // 出力
        if (can) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}
