#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int t[100001], x[100001], y[100001];
  t[0] = x[0] = y[0] = 0;
  for (int i = 0; i < N; i++) {
    cin >> t[i + 1];
    cin >> x[i + 1];
    cin >> y[i + 1];
  }
  bool can = true;
  for (int i = 0; i < N; i++) {
    int dt = t[i + 1] - t[i];
    int dxy = abs(x[i + 1] - x[i] + y[i + 1] - y[i]);
    if (dt < dxy) {
      can = false;
      break;
    }
    if (dt % 2 != dxy % 2) {
      can = false;
      break;
    }
  }
  if (can)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
