#include <bits/stdc++.h>
using namespace std;
int dirX[4] = {0, 0, 1, -1};
int dirY[4] = {1, -1, 0, 0};
int s, d;
int pp;
void des(int x, int y, int ii, int tt) {
  if (ii == tt && x == s && d == y) {
    pp = 1;
    return;
  }
  if (tt > ii) {
    return;
  }
  for (int i = 0; i < 4; i++) {
    des(x + dirX[i], y + dirY[i], ii, tt + 1);
  }
}
int main() {
  int n, temp, x1, y1, i, j, flag = 0, rem;
  cin >> n;
  int t[n];
  int x[n];
  int y[n];
  i = 0;
  temp = n;
  while (temp--) {
    cin >> t[i] >> x[i] >> y[i];
    i++;
  }
  x1 = y1 = 0;
  temp = n;
  i = 0;
  rem = 0;
  while (temp--) {
    s = x[i];
    d = y[i];
    pp = 0;
    des(0, 0, t[i], 0);
    if (pp) {
      flag = 1;
      x1 = s;
      y1 = d;
      i++;
    } else {
      flag = 0;
      break;
    }
  }
  if (flag) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
