#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, x, y, t, s;
  cin >> t;
  int tt = 0, px = 0, py = 0;
  int flag = 1;
  for (int i = 0; i < t; i++) {
    cin >> r >> x >> y;
    if (i == 0) px = 0, py = 0;
    s = abs(x - px) + abs(y - py);
    if (s % 2 == 0 && r % 2 == 0 || s % 2 != 0 && r % 2 != 0) {
      if (x * x + y * y - r * r < 0) {
        continue;
      } else
        flag = 0;
    } else
      flag = 0;
    px = x, py = y;
  }
  if (flag == 0)
    cout << "No\n";
  else
    cout << "Yes\n";
  return 0;
}
