#include <bits/stdc++.h>
using namespace std;
typedef struct {
  int t;
  int x;
  int y;
} Travel;
int main() {
  int n;
  scanf("%d", &n);
  Travel plan[100001];
  for (int i = 0; i < n; i++)
    scanf("%d %d %d", &plan[i].t, &plan[i].x, &plan[i].y);
  int time = plan[n - 1].t;
  int count = 0;
  for (int i = 0; i < n; i++) {
    if (plan[i].x == 0 && plan[i].y == 0) {
      if (plan[i].t % 2 == 0) {
        count++;
      }
    } else if (plan[i].t * 2 < plan[i].x + plan[i].y) {
      count--;
    } else if (plan[i].t % (plan[i].x + plan[i].y) == 0 ||
               (plan[i].x + plan[i].y) % plan[i].t == 0) {
      count++;
    }
  }
  if (count == n)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
