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