#include <bits/stdc++.h>
using namespace std;
void run() {}
void fast() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long dist(long long x, long long y, long long a, long long b) {
  return ((x - a) * (x - a)) + ((y - b) * (y - b));
}
int main() {
  fast();
  int n;
  cin >> n;
  long long t, x, y;
  long long curx = 0, cury = 0, last_t = 0;
  for (int i = 0; i < n; i++) {
    cin >> t >> x >> y;
    long long dis = dist(curx, cury, x, y);
    if (dis < (t - last_t) * (t - last_t) && (curx != x || cury != y)) {
      curx = x;
      cury = y;
      last_t = t;
    } else
      return cout << "No" << endl, 0;
  }
  cout << "Yes" << endl;
  return 0;
}
