import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        Point[] list = new Point[N];
        for (int i = 0; i < N; i++) {
            Point p = new Point();
            p.t = scan.nextInt();
            p.x = scan.nextInt();
            p.y = scan.nextInt();
            list[i] = p;
        }
        Point prev = new Point();
        prev.t = 0;
        prev.x = 0;
        prev.y = 0;
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            Point current = list[i];
            int time = current.t - prev.t;
            int distance = prev.distance(current);

            if (time == distance) {
                prev = current;
                continue;
            }
            if (time < distance || ((time - distance) % 2 != 0)) {
                answer = false;
                break;
            }
            prev = current;
        }
        System.out.println(answer ? "Yes" : "No");
    }
    class Point {
        int t;
        int x;
        int y;
        int distance(Point t) {
            return Math.abs(this.x - t.x) + Math.abs(this.y - t.y);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        Point[] list = new Point[N];
        for (int i = 0; i < N; i++) {
            Point p = new Point();
            p.t = scan.nextInt();
            p.x = scan.nextInt();
            p.y = scan.nextInt();
            list[i] = p;
        }
        Point prev = new Point();
        prev.t = 0;
        prev.x = 0;
        prev.y = 0;
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            Point current = list[i];
            int time = current.t - prev.t;
            int distance = prev.distance(current);

            if (time == distance) {
                prev = current;
                continue;
            }
            if (time < distance || ((time - distance) % 2 != 0)) {
                answer = false;
                break;
            }
            prev = current;
        }
        System.out.println(answer ? "Yes" : "No");
    }
    class Point {
        int t;
        int x;
        int y;
        int distance(Point t) {
            return Math.abs(this.x - t.x) + Math.abs(this.y - t.y);
        }
    }
} Main public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    } main {
        Main main = new Main();
        main.solve();
    } Main main = new Main(); main new Main() main.solve() main.solve main String[] args args public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        Point[] list = new Point[N];
        for (int i = 0; i < N; i++) {
            Point p = new Point();
            p.t = scan.nextInt();
            p.x = scan.nextInt();
            p.y = scan.nextInt();
            list[i] = p;
        }
        Point prev = new Point();
        prev.t = 0;
        prev.x = 0;
        prev.y = 0;
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            Point current = list[i];
            int time = current.t - prev.t;
            int distance = prev.distance(current);

            if (time == distance) {
                prev = current;
                continue;
            }
            if (time < distance || ((time - distance) % 2 != 0)) {
                answer = false;
                break;
            }
            prev = current;
        }
        System.out.println(answer ? "Yes" : "No");
    } solve {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        Point[] list = new Point[N];
        for (int i = 0; i < N; i++) {
            Point p = new Point();
            p.t = scan.nextInt();
            p.x = scan.nextInt();
            p.y = scan.nextInt();
            list[i] = p;
        }
        Point prev = new Point();
        prev.t = 0;
        prev.x = 0;
        prev.y = 0;
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            Point current = list[i];
            int time = current.t - prev.t;
            int distance = prev.distance(current);

            if (time == distance) {
                prev = current;
                continue;
            }
            if (time < distance || ((time - distance) % 2 != 0)) {
                answer = false;
                break;
            }
            prev = current;
        }
        System.out.println(answer ? "Yes" : "No");
    } Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in))); scan new Scanner(new BufferedReader(new InputStreamReader(System.in))) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan Point[] list = new Point[N]; list new Point[N] N for (int i = 0; i < N; i++) {
            Point p = new Point();
            p.t = scan.nextInt();
            p.x = scan.nextInt();
            p.y = scan.nextInt();
            list[i] = p;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            Point p = new Point();
            p.t = scan.nextInt();
            p.x = scan.nextInt();
            p.y = scan.nextInt();
            list[i] = p;
        } {
            Point p = new Point();
            p.t = scan.nextInt();
            p.x = scan.nextInt();
            p.y = scan.nextInt();
            list[i] = p;
        } Point p = new Point(); p new Point() p.t = scan.nextInt() p.t p p.t scan.nextInt() scan.nextInt scan p.x = scan.nextInt() p.x p p.x scan.nextInt() scan.nextInt scan p.y = scan.nextInt() p.y p p.y scan.nextInt() scan.nextInt scan list[i] = p list[i] list i p Point prev = new Point(); prev new Point() prev.t = 0 prev.t prev prev.t 0 prev.x = 0 prev.x prev prev.x 0 prev.y = 0 prev.y prev prev.y 0 boolean answer = true; answer true for (int i = 0; i < N; i++) {
            Point current = list[i];
            int time = current.t - prev.t;
            int distance = prev.distance(current);

            if (time == distance) {
                prev = current;
                continue;
            }
            if (time < distance || ((time - distance) % 2 != 0)) {
                answer = false;
                break;
            }
            prev = current;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            Point current = list[i];
            int time = current.t - prev.t;
            int distance = prev.distance(current);

            if (time == distance) {
                prev = current;
                continue;
            }
            if (time < distance || ((time - distance) % 2 != 0)) {
                answer = false;
                break;
            }
            prev = current;
        } {
            Point current = list[i];
            int time = current.t - prev.t;
            int distance = prev.distance(current);

            if (time == distance) {
                prev = current;
                continue;
            }
            if (time < distance || ((time - distance) % 2 != 0)) {
                answer = false;
                break;
            }
            prev = current;
        } Point current = list[i]; current list[i] list i int time = current.t - prev.t; time current.t - prev.t current.t current current.t prev.t prev prev.t int distance = prev.distance(current); distance prev.distance(current) prev.distance prev current if (time == distance) {
                prev = current;
                continue;
            } time == distance time distance {
                prev = current;
                continue;
            } prev = current prev current continue; if (time < distance || ((time - distance) % 2 != 0)) {
                answer = false;
                break;
            } time < distance || ((time - distance) % 2 != 0) time < distance time distance ((time - distance) % 2 != 0) (time - distance) % 2 (time - distance) time distance 2 0 {
                answer = false;
                break;
            } answer = false answer false break; prev = current prev current System.out.println(answer ? "Yes" : "No") System.out.println System.out System System.out answer ? "Yes" : "No" answer "Yes" "No" class Point {
        int t;
        int x;
        int y;
        int distance(Point t) {
            return Math.abs(this.x - t.x) + Math.abs(this.y - t.y);
        }
    } Point int t; t int x; x int y; y int distance(Point t) {
            return Math.abs(this.x - t.x) + Math.abs(this.y - t.y);
        } distance {
            return Math.abs(this.x - t.x) + Math.abs(this.y - t.y);
        } return Math.abs(this.x - t.x) + Math.abs(this.y - t.y); Math.abs(this.x - t.x) + Math.abs(this.y - t.y) Math.abs(this.x - t.x) Math.abs Math this.x - t.x this.x this this.x t.x t t.x Math.abs(this.y - t.y) Math.abs Math this.y - t.y this.y this this.y t.y t t.y Point t t public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        Point[] list = new Point[N];
        for (int i = 0; i < N; i++) {
            Point p = new Point();
            p.t = scan.nextInt();
            p.x = scan.nextInt();
            p.y = scan.nextInt();
            list[i] = p;
        }
        Point prev = new Point();
        prev.t = 0;
        prev.x = 0;
        prev.y = 0;
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            Point current = list[i];
            int time = current.t - prev.t;
            int distance = prev.distance(current);

            if (time == distance) {
                prev = current;
                continue;
            }
            if (time < distance || ((time - distance) % 2 != 0)) {
                answer = false;
                break;
            }
            prev = current;
        }
        System.out.println(answer ? "Yes" : "No");
    }
    class Point {
        int t;
        int x;
        int y;
        int distance(Point t) {
            return Math.abs(this.x - t.x) + Math.abs(this.y - t.y);
        }
    }
} public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        Point[] list = new Point[N];
        for (int i = 0; i < N; i++) {
            Point p = new Point();
            p.t = scan.nextInt();
            p.x = scan.nextInt();
            p.y = scan.nextInt();
            list[i] = p;
        }
        Point prev = new Point();
        prev.t = 0;
        prev.x = 0;
        prev.y = 0;
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            Point current = list[i];
            int time = current.t - prev.t;
            int distance = prev.distance(current);

            if (time == distance) {
                prev = current;
                continue;
            }
            if (time < distance || ((time - distance) % 2 != 0)) {
                answer = false;
                break;
            }
            prev = current;
        }
        System.out.println(answer ? "Yes" : "No");
    }
    class Point {
        int t;
        int x;
        int y;
        int distance(Point t) {
            return Math.abs(this.x - t.x) + Math.abs(this.y - t.y);
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        Point[] list = new Point[N];
        for (int i = 0; i < N; i++) {
            Point p = new Point();
            p.t = scan.nextInt();
            p.x = scan.nextInt();
            p.y = scan.nextInt();
            list[i] = p;
        }
        Point prev = new Point();
        prev.t = 0;
        prev.x = 0;
        prev.y = 0;
        boolean answer = true;
        for (int i = 0; i < N; i++) {
            Point current = list[i];
            int time = current.t - prev.t;
            int distance = prev.distance(current);

            if (time == distance) {
                prev = current;
                continue;
            }
            if (time < distance || ((time - distance) % 2 != 0)) {
                answer = false;
                break;
            }
            prev = current;
        }
        System.out.println(answer ? "Yes" : "No");
    }
    class Point {
        int t;
        int x;
        int y;
        int distance(Point t) {
            return Math.abs(this.x - t.x) + Math.abs(this.y - t.y);
        }
    }
}
