#include <bits/stdc++.h>
int main(void) {
  int n, t, x, y, ct, cx, cy;
  ct = cx = cy = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d %d %d", &t, &x, &y);
    int difT = t - ct;
    int difPos = abs(x - cx) + abs(y - cy);
    if (difT >= difPos && (difT - difPos) % 2 == 0) {
      ct = t;
      cx = x;
      cy = y;
    } else {
      printf("NO");
      return 0;
    }
  }
  printf("YES");
  return 0;
}
