#include <bits/stdc++.h>
using namespace std;
constexpr long long int INFLL = 1001001001001001LL;
constexpr int INFI = 1000000007;
const int mod = 1000000007;
int main() {
  int n;
  cin >> n;
  vector<vector<int>> a(n + 1, vector<int>(3));
  a.at(0) = {0, 0, 0};
  int yokoidou = 0, tateidou = 0, zikan = 0;
  for (int i = 1; i < n + 1; i++) {
    for (int j = 0; j < 3; j++) {
      cin >> a.at(i).at(j);
    }
  }
  for (int i = 0; i < n; i++) {
    yokoidou = a.at(i + 1).at(1) - a.at(i).at(1);
    tateidou = a.at(i + 1).at(2) - a.at(i).at(2);
    zikan = a.at(i + 1).at(0) - a.at(i).at(0);
    if (yokoidou + tateidou > zikan ||
        abs((yokoidou + tateidou) % 2) != abs(zikan % 2)) {
      cout << "NO" << endl;
      break;
    }
    if (i == n - 1) {
      cout << "YES" << endl;
    }
  }
}
