import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number = sc.nextInt();
    int[][] coordinate = new int[number + 1][3];
    for (int i = 1; i < number + 1; i++) {
      for (int j = 0; j < 3; j++) {
        coordinate[i][j] = sc.nextInt();
      }
    }
    int[] deltaT = new int[number];
    int[] deltaX = new int[number];
    int[] deltaY = new int[number];
    int[] deltaXY = new int[number];
    for (int i = 0; i < number; i++) {
      deltaT[i] = Math.abs(coordinate[i + 1][0] - coordinate[i][0]);
      deltaX[i] = Math.abs(coordinate[i + 1][1] - coordinate[i][1]);
      deltaY[i] = Math.abs(coordinate[i + 1][2] - coordinate[i][2]);
      deltaXY[i] = deltaX[i] + deltaY[i];
    }
    int count = 0;
    for (int i = 0; i < number; i++) {
      if (deltaT[i] >= deltaXY[i]) {
        if ((deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1)) {
          count++;
        } else {
          System.out.println("No");
          break;
        }
      } else {
        System.out.println("No");
        break;
      }
    }
    if (count == number) {
      System.out.println("Yes");
    }
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number = sc.nextInt();
    int[][] coordinate = new int[number + 1][3];
    for (int i = 1; i < number + 1; i++) {
      for (int j = 0; j < 3; j++) {
        coordinate[i][j] = sc.nextInt();
      }
    }
    int[] deltaT = new int[number];
    int[] deltaX = new int[number];
    int[] deltaY = new int[number];
    int[] deltaXY = new int[number];
    for (int i = 0; i < number; i++) {
      deltaT[i] = Math.abs(coordinate[i + 1][0] - coordinate[i][0]);
      deltaX[i] = Math.abs(coordinate[i + 1][1] - coordinate[i][1]);
      deltaY[i] = Math.abs(coordinate[i + 1][2] - coordinate[i][2]);
      deltaXY[i] = deltaX[i] + deltaY[i];
    }
    int count = 0;
    for (int i = 0; i < number; i++) {
      if (deltaT[i] >= deltaXY[i]) {
        if ((deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1)) {
          count++;
        } else {
          System.out.println("No");
          break;
        }
      } else {
        System.out.println("No");
        break;
      }
    }
    if (count == number) {
      System.out.println("Yes");
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number = sc.nextInt();
    int[][] coordinate = new int[number + 1][3];
    for (int i = 1; i < number + 1; i++) {
      for (int j = 0; j < 3; j++) {
        coordinate[i][j] = sc.nextInt();
      }
    }
    int[] deltaT = new int[number];
    int[] deltaX = new int[number];
    int[] deltaY = new int[number];
    int[] deltaXY = new int[number];
    for (int i = 0; i < number; i++) {
      deltaT[i] = Math.abs(coordinate[i + 1][0] - coordinate[i][0]);
      deltaX[i] = Math.abs(coordinate[i + 1][1] - coordinate[i][1]);
      deltaY[i] = Math.abs(coordinate[i + 1][2] - coordinate[i][2]);
      deltaXY[i] = deltaX[i] + deltaY[i];
    }
    int count = 0;
    for (int i = 0; i < number; i++) {
      if (deltaT[i] >= deltaXY[i]) {
        if ((deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1)) {
          count++;
        } else {
          System.out.println("No");
          break;
        }
      } else {
        System.out.println("No");
        break;
      }
    }
    if (count == number) {
      System.out.println("Yes");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int number = sc.nextInt();
    int[][] coordinate = new int[number + 1][3];
    for (int i = 1; i < number + 1; i++) {
      for (int j = 0; j < 3; j++) {
        coordinate[i][j] = sc.nextInt();
      }
    }
    int[] deltaT = new int[number];
    int[] deltaX = new int[number];
    int[] deltaY = new int[number];
    int[] deltaXY = new int[number];
    for (int i = 0; i < number; i++) {
      deltaT[i] = Math.abs(coordinate[i + 1][0] - coordinate[i][0]);
      deltaX[i] = Math.abs(coordinate[i + 1][1] - coordinate[i][1]);
      deltaY[i] = Math.abs(coordinate[i + 1][2] - coordinate[i][2]);
      deltaXY[i] = deltaX[i] + deltaY[i];
    }
    int count = 0;
    for (int i = 0; i < number; i++) {
      if (deltaT[i] >= deltaXY[i]) {
        if ((deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1)) {
          count++;
        } else {
          System.out.println("No");
          break;
        }
      } else {
        System.out.println("No");
        break;
      }
    }
    if (count == number) {
      System.out.println("Yes");
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int number = sc.nextInt(); number sc.nextInt() sc.nextInt sc int[][] coordinate = new int[number + 1][3]; coordinate new int[number + 1][3] number + 1 number 1 3 for (int i = 1; i < number + 1; i++) {
      for (int j = 0; j < 3; j++) {
        coordinate[i][j] = sc.nextInt();
      }
    } int i = 1; int i = 1; i 1 i < number + 1 i number + 1 number 1 i++ i++ i {
      for (int j = 0; j < 3; j++) {
        coordinate[i][j] = sc.nextInt();
      }
    } {
      for (int j = 0; j < 3; j++) {
        coordinate[i][j] = sc.nextInt();
      }
    } for (int j = 0; j < 3; j++) {
        coordinate[i][j] = sc.nextInt();
      } int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
        coordinate[i][j] = sc.nextInt();
      } {
        coordinate[i][j] = sc.nextInt();
      } coordinate[i][j] = sc.nextInt() coordinate[i][j] coordinate[i] coordinate i j sc.nextInt() sc.nextInt sc int[] deltaT = new int[number]; deltaT new int[number] number int[] deltaX = new int[number]; deltaX new int[number] number int[] deltaY = new int[number]; deltaY new int[number] number int[] deltaXY = new int[number]; deltaXY new int[number] number for (int i = 0; i < number; i++) {
      deltaT[i] = Math.abs(coordinate[i + 1][0] - coordinate[i][0]);
      deltaX[i] = Math.abs(coordinate[i + 1][1] - coordinate[i][1]);
      deltaY[i] = Math.abs(coordinate[i + 1][2] - coordinate[i][2]);
      deltaXY[i] = deltaX[i] + deltaY[i];
    } int i = 0; int i = 0; i 0 i < number i number i++ i++ i {
      deltaT[i] = Math.abs(coordinate[i + 1][0] - coordinate[i][0]);
      deltaX[i] = Math.abs(coordinate[i + 1][1] - coordinate[i][1]);
      deltaY[i] = Math.abs(coordinate[i + 1][2] - coordinate[i][2]);
      deltaXY[i] = deltaX[i] + deltaY[i];
    } {
      deltaT[i] = Math.abs(coordinate[i + 1][0] - coordinate[i][0]);
      deltaX[i] = Math.abs(coordinate[i + 1][1] - coordinate[i][1]);
      deltaY[i] = Math.abs(coordinate[i + 1][2] - coordinate[i][2]);
      deltaXY[i] = deltaX[i] + deltaY[i];
    } deltaT[i] = Math.abs(coordinate[i + 1][0] - coordinate[i][0]) deltaT[i] deltaT i Math.abs(coordinate[i + 1][0] - coordinate[i][0]) Math.abs Math coordinate[i + 1][0] - coordinate[i][0] coordinate[i + 1][0] coordinate[i + 1] coordinate i + 1 i 1 0 coordinate[i][0] coordinate[i] coordinate i 0 deltaX[i] = Math.abs(coordinate[i + 1][1] - coordinate[i][1]) deltaX[i] deltaX i Math.abs(coordinate[i + 1][1] - coordinate[i][1]) Math.abs Math coordinate[i + 1][1] - coordinate[i][1] coordinate[i + 1][1] coordinate[i + 1] coordinate i + 1 i 1 1 coordinate[i][1] coordinate[i] coordinate i 1 deltaY[i] = Math.abs(coordinate[i + 1][2] - coordinate[i][2]) deltaY[i] deltaY i Math.abs(coordinate[i + 1][2] - coordinate[i][2]) Math.abs Math coordinate[i + 1][2] - coordinate[i][2] coordinate[i + 1][2] coordinate[i + 1] coordinate i + 1 i 1 2 coordinate[i][2] coordinate[i] coordinate i 2 deltaXY[i] = deltaX[i] + deltaY[i] deltaXY[i] deltaXY i deltaX[i] + deltaY[i] deltaX[i] deltaX i deltaY[i] deltaY i int count = 0; count 0 for (int i = 0; i < number; i++) {
      if (deltaT[i] >= deltaXY[i]) {
        if ((deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1)) {
          count++;
        } else {
          System.out.println("No");
          break;
        }
      } else {
        System.out.println("No");
        break;
      }
    } int i = 0; int i = 0; i 0 i < number i number i++ i++ i {
      if (deltaT[i] >= deltaXY[i]) {
        if ((deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1)) {
          count++;
        } else {
          System.out.println("No");
          break;
        }
      } else {
        System.out.println("No");
        break;
      }
    } {
      if (deltaT[i] >= deltaXY[i]) {
        if ((deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1)) {
          count++;
        } else {
          System.out.println("No");
          break;
        }
      } else {
        System.out.println("No");
        break;
      }
    } if (deltaT[i] >= deltaXY[i]) {
        if ((deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1)) {
          count++;
        } else {
          System.out.println("No");
          break;
        }
      } else {
        System.out.println("No");
        break;
      } deltaT[i] >= deltaXY[i] deltaT[i] deltaT i deltaXY[i] deltaXY i {
        if ((deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1)) {
          count++;
        } else {
          System.out.println("No");
          break;
        }
      } if ((deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1)) {
          count++;
        } else {
          System.out.println("No");
          break;
        } (deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1) (deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) deltaT[i] % 2 == 0 deltaT[i] % 2 deltaT[i] deltaT i 2 0 deltaXY[i] % 2 == 0 deltaXY[i] % 2 deltaXY[i] deltaXY i 2 0 (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1) deltaT[i] % 2 == 1 deltaT[i] % 2 deltaT[i] deltaT i 2 1 deltaXY[i] % 2 == 1 deltaXY[i] % 2 deltaXY[i] deltaXY i 2 1 {
          count++;
        } count++ count {
          System.out.println("No");
          break;
        } System.out.println("No") System.out.println System.out System System.out "No" break; {
        System.out.println("No");
        break;
      } System.out.println("No") System.out.println System.out System System.out "No" break; if (count == number) {
      System.out.println("Yes");
    } count == number count number {
      System.out.println("Yes");
    } System.out.println("Yes") System.out.println 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 number = sc.nextInt();
    int[][] coordinate = new int[number + 1][3];
    for (int i = 1; i < number + 1; i++) {
      for (int j = 0; j < 3; j++) {
        coordinate[i][j] = sc.nextInt();
      }
    }
    int[] deltaT = new int[number];
    int[] deltaX = new int[number];
    int[] deltaY = new int[number];
    int[] deltaXY = new int[number];
    for (int i = 0; i < number; i++) {
      deltaT[i] = Math.abs(coordinate[i + 1][0] - coordinate[i][0]);
      deltaX[i] = Math.abs(coordinate[i + 1][1] - coordinate[i][1]);
      deltaY[i] = Math.abs(coordinate[i + 1][2] - coordinate[i][2]);
      deltaXY[i] = deltaX[i] + deltaY[i];
    }
    int count = 0;
    for (int i = 0; i < number; i++) {
      if (deltaT[i] >= deltaXY[i]) {
        if ((deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1)) {
          count++;
        } else {
          System.out.println("No");
          break;
        }
      } else {
        System.out.println("No");
        break;
      }
    }
    if (count == number) {
      System.out.println("Yes");
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number = sc.nextInt();
    int[][] coordinate = new int[number + 1][3];
    for (int i = 1; i < number + 1; i++) {
      for (int j = 0; j < 3; j++) {
        coordinate[i][j] = sc.nextInt();
      }
    }
    int[] deltaT = new int[number];
    int[] deltaX = new int[number];
    int[] deltaY = new int[number];
    int[] deltaXY = new int[number];
    for (int i = 0; i < number; i++) {
      deltaT[i] = Math.abs(coordinate[i + 1][0] - coordinate[i][0]);
      deltaX[i] = Math.abs(coordinate[i + 1][1] - coordinate[i][1]);
      deltaY[i] = Math.abs(coordinate[i + 1][2] - coordinate[i][2]);
      deltaXY[i] = deltaX[i] + deltaY[i];
    }
    int count = 0;
    for (int i = 0; i < number; i++) {
      if (deltaT[i] >= deltaXY[i]) {
        if ((deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1)) {
          count++;
        } else {
          System.out.println("No");
          break;
        }
      } else {
        System.out.println("No");
        break;
      }
    }
    if (count == number) {
      System.out.println("Yes");
    }
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number = sc.nextInt();
    int[][] coordinate = new int[number + 1][3];
    for (int i = 1; i < number + 1; i++) {
      for (int j = 0; j < 3; j++) {
        coordinate[i][j] = sc.nextInt();
      }
    }
    int[] deltaT = new int[number];
    int[] deltaX = new int[number];
    int[] deltaY = new int[number];
    int[] deltaXY = new int[number];
    for (int i = 0; i < number; i++) {
      deltaT[i] = Math.abs(coordinate[i + 1][0] - coordinate[i][0]);
      deltaX[i] = Math.abs(coordinate[i + 1][1] - coordinate[i][1]);
      deltaY[i] = Math.abs(coordinate[i + 1][2] - coordinate[i][2]);
      deltaXY[i] = deltaX[i] + deltaY[i];
    }
    int count = 0;
    for (int i = 0; i < number; i++) {
      if (deltaT[i] >= deltaXY[i]) {
        if ((deltaT[i] % 2 == 0 && deltaXY[i] % 2 == 0) || (deltaT[i] % 2 == 1 && deltaXY[i] % 2 == 1)) {
          count++;
        } else {
          System.out.println("No");
          break;
        }
      } else {
        System.out.println("No");
        break;
      }
    }
    if (count == number) {
      System.out.println("Yes");
    }
  }
}