import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());

        List<List<Integer>> pointList = new ArrayList<>();
        List<Integer> firstPoint = new ArrayList<>();
        firstPoint.add(0);
        firstPoint.add(0);
        firstPoint.add(0);
        pointList.add(firstPoint);

        for (int i = 0; i < N; i++) {
            List<Integer> tmpPoint = new ArrayList<>();
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            pointList.add(tmpPoint);
        }

        for (int i = 0; i < N; i++) {
            List<Integer> currentPoint = pointList.get(i);
            List<Integer> nextPoint = pointList.get(i + 1);
            int diff = Math.abs(currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) - nextPoint.get(2));
            int diffTime = nextPoint.get(0) - currentPoint.get(0);

            if (!(diff <= diffTime && diff % 2 == diffTime % 2)) {
                System.out.print("No");
                return;
            }
        }
        System.out.print("Yes");
    }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());

        List<List<Integer>> pointList = new ArrayList<>();
        List<Integer> firstPoint = new ArrayList<>();
        firstPoint.add(0);
        firstPoint.add(0);
        firstPoint.add(0);
        pointList.add(firstPoint);

        for (int i = 0; i < N; i++) {
            List<Integer> tmpPoint = new ArrayList<>();
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            pointList.add(tmpPoint);
        }

        for (int i = 0; i < N; i++) {
            List<Integer> currentPoint = pointList.get(i);
            List<Integer> nextPoint = pointList.get(i + 1);
            int diff = Math.abs(currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) - nextPoint.get(2));
            int diffTime = nextPoint.get(0) - currentPoint.get(0);

            if (!(diff <= diffTime && diff % 2 == diffTime % 2)) {
                System.out.print("No");
                return;
            }
        }
        System.out.print("Yes");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());

        List<List<Integer>> pointList = new ArrayList<>();
        List<Integer> firstPoint = new ArrayList<>();
        firstPoint.add(0);
        firstPoint.add(0);
        firstPoint.add(0);
        pointList.add(firstPoint);

        for (int i = 0; i < N; i++) {
            List<Integer> tmpPoint = new ArrayList<>();
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            pointList.add(tmpPoint);
        }

        for (int i = 0; i < N; i++) {
            List<Integer> currentPoint = pointList.get(i);
            List<Integer> nextPoint = pointList.get(i + 1);
            int diff = Math.abs(currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) - nextPoint.get(2));
            int diffTime = nextPoint.get(0) - currentPoint.get(0);

            if (!(diff <= diffTime && diff % 2 == diffTime % 2)) {
                System.out.print("No");
                return;
            }
        }
        System.out.print("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());

        List<List<Integer>> pointList = new ArrayList<>();
        List<Integer> firstPoint = new ArrayList<>();
        firstPoint.add(0);
        firstPoint.add(0);
        firstPoint.add(0);
        pointList.add(firstPoint);

        for (int i = 0; i < N; i++) {
            List<Integer> tmpPoint = new ArrayList<>();
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            pointList.add(tmpPoint);
        }

        for (int i = 0; i < N; i++) {
            List<Integer> currentPoint = pointList.get(i);
            List<Integer> nextPoint = pointList.get(i + 1);
            int diff = Math.abs(currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) - nextPoint.get(2));
            int diffTime = nextPoint.get(0) - currentPoint.get(0);

            if (!(diff <= diffTime && diff % 2 == diffTime % 2)) {
                System.out.print("No");
                return;
            }
        }
        System.out.print("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc List<List<Integer>> pointList = new ArrayList<>(); pointList new ArrayList<>() List<Integer> firstPoint = new ArrayList<>(); firstPoint new ArrayList<>() firstPoint.add(0) firstPoint.add firstPoint 0 firstPoint.add(0) firstPoint.add firstPoint 0 firstPoint.add(0) firstPoint.add firstPoint 0 pointList.add(firstPoint) pointList.add pointList firstPoint for (int i = 0; i < N; i++) {
            List<Integer> tmpPoint = new ArrayList<>();
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            pointList.add(tmpPoint);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            List<Integer> tmpPoint = new ArrayList<>();
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            pointList.add(tmpPoint);
        } {
            List<Integer> tmpPoint = new ArrayList<>();
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            pointList.add(tmpPoint);
        } List<Integer> tmpPoint = new ArrayList<>(); tmpPoint new ArrayList<>() tmpPoint.add(Integer.parseInt(sc.next())) tmpPoint.add tmpPoint Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc tmpPoint.add(Integer.parseInt(sc.next())) tmpPoint.add tmpPoint Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc tmpPoint.add(Integer.parseInt(sc.next())) tmpPoint.add tmpPoint Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc pointList.add(tmpPoint) pointList.add pointList tmpPoint for (int i = 0; i < N; i++) {
            List<Integer> currentPoint = pointList.get(i);
            List<Integer> nextPoint = pointList.get(i + 1);
            int diff = Math.abs(currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) - nextPoint.get(2));
            int diffTime = nextPoint.get(0) - currentPoint.get(0);

            if (!(diff <= diffTime && diff % 2 == diffTime % 2)) {
                System.out.print("No");
                return;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            List<Integer> currentPoint = pointList.get(i);
            List<Integer> nextPoint = pointList.get(i + 1);
            int diff = Math.abs(currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) - nextPoint.get(2));
            int diffTime = nextPoint.get(0) - currentPoint.get(0);

            if (!(diff <= diffTime && diff % 2 == diffTime % 2)) {
                System.out.print("No");
                return;
            }
        } {
            List<Integer> currentPoint = pointList.get(i);
            List<Integer> nextPoint = pointList.get(i + 1);
            int diff = Math.abs(currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) - nextPoint.get(2));
            int diffTime = nextPoint.get(0) - currentPoint.get(0);

            if (!(diff <= diffTime && diff % 2 == diffTime % 2)) {
                System.out.print("No");
                return;
            }
        } List<Integer> currentPoint = pointList.get(i); currentPoint pointList.get(i) pointList.get pointList i List<Integer> nextPoint = pointList.get(i + 1); nextPoint pointList.get(i + 1) pointList.get pointList i + 1 i 1 int diff = Math.abs(currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) - nextPoint.get(2)); diff Math.abs(currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) - nextPoint.get(2)) Math.abs Math currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) - nextPoint.get(2) currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) currentPoint.get(1) - nextPoint.get(1) currentPoint.get(1) currentPoint.get currentPoint 1 nextPoint.get(1) nextPoint.get nextPoint 1 currentPoint.get(2) currentPoint.get currentPoint 2 nextPoint.get(2) nextPoint.get nextPoint 2 int diffTime = nextPoint.get(0) - currentPoint.get(0); diffTime nextPoint.get(0) - currentPoint.get(0) nextPoint.get(0) nextPoint.get nextPoint 0 currentPoint.get(0) currentPoint.get currentPoint 0 if (!(diff <= diffTime && diff % 2 == diffTime % 2)) {
                System.out.print("No");
                return;
            } !(diff <= diffTime && diff % 2 == diffTime % 2) (diff <= diffTime && diff % 2 == diffTime % 2) diff <= diffTime diff diffTime diff % 2 == diffTime % 2 diff % 2 diff 2 diffTime % 2 diffTime 2 {
                System.out.print("No");
                return;
            } System.out.print("No") System.out.print System.out System System.out "No" return; System.out.print("Yes") System.out.print System.out System System.out "Yes" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());

        List<List<Integer>> pointList = new ArrayList<>();
        List<Integer> firstPoint = new ArrayList<>();
        firstPoint.add(0);
        firstPoint.add(0);
        firstPoint.add(0);
        pointList.add(firstPoint);

        for (int i = 0; i < N; i++) {
            List<Integer> tmpPoint = new ArrayList<>();
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            pointList.add(tmpPoint);
        }

        for (int i = 0; i < N; i++) {
            List<Integer> currentPoint = pointList.get(i);
            List<Integer> nextPoint = pointList.get(i + 1);
            int diff = Math.abs(currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) - nextPoint.get(2));
            int diffTime = nextPoint.get(0) - currentPoint.get(0);

            if (!(diff <= diffTime && diff % 2 == diffTime % 2)) {
                System.out.print("No");
                return;
            }
        }
        System.out.print("Yes");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());

        List<List<Integer>> pointList = new ArrayList<>();
        List<Integer> firstPoint = new ArrayList<>();
        firstPoint.add(0);
        firstPoint.add(0);
        firstPoint.add(0);
        pointList.add(firstPoint);

        for (int i = 0; i < N; i++) {
            List<Integer> tmpPoint = new ArrayList<>();
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            pointList.add(tmpPoint);
        }

        for (int i = 0; i < N; i++) {
            List<Integer> currentPoint = pointList.get(i);
            List<Integer> nextPoint = pointList.get(i + 1);
            int diff = Math.abs(currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) - nextPoint.get(2));
            int diffTime = nextPoint.get(0) - currentPoint.get(0);

            if (!(diff <= diffTime && diff % 2 == diffTime % 2)) {
                System.out.print("No");
                return;
            }
        }
        System.out.print("Yes");
    }
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());

        List<List<Integer>> pointList = new ArrayList<>();
        List<Integer> firstPoint = new ArrayList<>();
        firstPoint.add(0);
        firstPoint.add(0);
        firstPoint.add(0);
        pointList.add(firstPoint);

        for (int i = 0; i < N; i++) {
            List<Integer> tmpPoint = new ArrayList<>();
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            tmpPoint.add(Integer.parseInt(sc.next()));
            pointList.add(tmpPoint);
        }

        for (int i = 0; i < N; i++) {
            List<Integer> currentPoint = pointList.get(i);
            List<Integer> nextPoint = pointList.get(i + 1);
            int diff = Math.abs(currentPoint.get(1) - nextPoint.get(1) + currentPoint.get(2) - nextPoint.get(2));
            int diffTime = nextPoint.get(0) - currentPoint.get(0);

            if (!(diff <= diffTime && diff % 2 == diffTime % 2)) {
                System.out.print("No");
                return;
            }
        }
        System.out.print("Yes");
    }
}