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];

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

        boolean canTravel = true;
        for (int i = 0; i < n; i++) {
            int time = 0;
            int distance = 0;
            if (i-1 < 0) {
                time = t[i];
                distance = Math.abs(x[i]) + Math.abs(y[i]);
            } else {
                time = t[i] - t[i-1];
                distance = Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]);
            }


            if (time < distance) {// 移動する時間が足りない
                canTravel = false;
                break;
            }

            if (time % 2 != distance % 2) {
                canTravel = false;
                break;
            }
        }

        System.out.println(canTravel ? "Yes" : "No");
    }
} 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];

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

        boolean canTravel = true;
        for (int i = 0; i < n; i++) {
            int time = 0;
            int distance = 0;
            if (i-1 < 0) {
                time = t[i];
                distance = Math.abs(x[i]) + Math.abs(y[i]);
            } else {
                time = t[i] - t[i-1];
                distance = Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]);
            }


            if (time < distance) {// 移動する時間が足りない
                canTravel = false;
                break;
            }

            if (time % 2 != distance % 2) {
                canTravel = false;
                break;
            }
        }

        System.out.println(canTravel ? "Yes" : "No");
    }
} 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];

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

        boolean canTravel = true;
        for (int i = 0; i < n; i++) {
            int time = 0;
            int distance = 0;
            if (i-1 < 0) {
                time = t[i];
                distance = Math.abs(x[i]) + Math.abs(y[i]);
            } else {
                time = t[i] - t[i-1];
                distance = Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]);
            }


            if (time < distance) {// 移動する時間が足りない
                canTravel = false;
                break;
            }

            if (time % 2 != distance % 2) {
                canTravel = false;
                break;
            }
        }

        System.out.println(canTravel ? "Yes" : "No");
    } 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];

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

        boolean canTravel = true;
        for (int i = 0; i < n; i++) {
            int time = 0;
            int distance = 0;
            if (i-1 < 0) {
                time = t[i];
                distance = Math.abs(x[i]) + Math.abs(y[i]);
            } else {
                time = t[i] - t[i-1];
                distance = Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]);
            }


            if (time < distance) {// 移動する時間が足りない
                canTravel = false;
                break;
            }

            if (time % 2 != distance % 2) {
                canTravel = false;
                break;
            }
        }

        System.out.println(canTravel ? "Yes" : "No");
    } 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 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 boolean canTravel = true; canTravel true for (int i = 0; i < n; i++) {
            int time = 0;
            int distance = 0;
            if (i-1 < 0) {
                time = t[i];
                distance = Math.abs(x[i]) + Math.abs(y[i]);
            } else {
                time = t[i] - t[i-1];
                distance = Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]);
            }


            if (time < distance) {// 移動する時間が足りない
                canTravel = false;
                break;
            }

            if (time % 2 != distance % 2) {
                canTravel = false;
                break;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int time = 0;
            int distance = 0;
            if (i-1 < 0) {
                time = t[i];
                distance = Math.abs(x[i]) + Math.abs(y[i]);
            } else {
                time = t[i] - t[i-1];
                distance = Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]);
            }


            if (time < distance) {// 移動する時間が足りない
                canTravel = false;
                break;
            }

            if (time % 2 != distance % 2) {
                canTravel = false;
                break;
            }
        } {
            int time = 0;
            int distance = 0;
            if (i-1 < 0) {
                time = t[i];
                distance = Math.abs(x[i]) + Math.abs(y[i]);
            } else {
                time = t[i] - t[i-1];
                distance = Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]);
            }


            if (time < distance) {// 移動する時間が足りない
                canTravel = false;
                break;
            }

            if (time % 2 != distance % 2) {
                canTravel = false;
                break;
            }
        } int time = 0; time 0 int distance = 0; distance 0 if (i-1 < 0) {
                time = t[i];
                distance = Math.abs(x[i]) + Math.abs(y[i]);
            } else {
                time = t[i] - t[i-1];
                distance = Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]);
            } i-1 < 0 i-1 i 1 0 {
                time = t[i];
                distance = Math.abs(x[i]) + Math.abs(y[i]);
            } time = t[i] time t[i] t i distance = Math.abs(x[i]) + Math.abs(y[i]) distance Math.abs(x[i]) + Math.abs(y[i]) Math.abs(x[i]) Math.abs Math x[i] x i Math.abs(y[i]) Math.abs Math y[i] y i {
                time = t[i] - t[i-1];
                distance = Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]);
            } time = t[i] - t[i-1] time t[i] - t[i-1] t[i] t i t[i-1] t i-1 i 1 distance = Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]) distance Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]) Math.abs(x[i] - x[i-1]) Math.abs Math x[i] - x[i-1] x[i] x i x[i-1] x i-1 i 1 Math.abs(y[i] - y[i-1]) Math.abs Math y[i] - y[i-1] y[i] y i y[i-1] y i-1 i 1 if (time < distance) {// 移動する時間が足りない
                canTravel = false;
                break;
            } time < distance time distance {// 移動する時間が足りない
                canTravel = false;
                break;
            } canTravel = false canTravel false break; if (time % 2 != distance % 2) {
                canTravel = false;
                break;
            } time % 2 != distance % 2 time % 2 time 2 distance % 2 distance 2 {
                canTravel = false;
                break;
            } canTravel = false canTravel false break; System.out.println(canTravel ? "Yes" : "No") System.out.println System.out System System.out canTravel ? "Yes" : "No" canTravel "Yes" "No" 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];

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

        boolean canTravel = true;
        for (int i = 0; i < n; i++) {
            int time = 0;
            int distance = 0;
            if (i-1 < 0) {
                time = t[i];
                distance = Math.abs(x[i]) + Math.abs(y[i]);
            } else {
                time = t[i] - t[i-1];
                distance = Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]);
            }


            if (time < distance) {// 移動する時間が足りない
                canTravel = false;
                break;
            }

            if (time % 2 != distance % 2) {
                canTravel = false;
                break;
            }
        }

        System.out.println(canTravel ? "Yes" : "No");
    }
} 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];

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

        boolean canTravel = true;
        for (int i = 0; i < n; i++) {
            int time = 0;
            int distance = 0;
            if (i-1 < 0) {
                time = t[i];
                distance = Math.abs(x[i]) + Math.abs(y[i]);
            } else {
                time = t[i] - t[i-1];
                distance = Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]);
            }


            if (time < distance) {// 移動する時間が足りない
                canTravel = false;
                break;
            }

            if (time % 2 != distance % 2) {
                canTravel = false;
                break;
            }
        }

        System.out.println(canTravel ? "Yes" : "No");
    }
} 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];

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

        boolean canTravel = true;
        for (int i = 0; i < n; i++) {
            int time = 0;
            int distance = 0;
            if (i-1 < 0) {
                time = t[i];
                distance = Math.abs(x[i]) + Math.abs(y[i]);
            } else {
                time = t[i] - t[i-1];
                distance = Math.abs(x[i] - x[i-1]) + Math.abs(y[i] - y[i-1]);
            }


            if (time < distance) {// 移動する時間が足りない
                canTravel = false;
                break;
            }

            if (time % 2 != distance % 2) {
                canTravel = false;
                break;
            }
        }

        System.out.println(canTravel ? "Yes" : "No");
    }
}
