#include <bits/stdc++.h>
using namespace std;
struct node {
  long long t, x, y;
} a[200];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, flag = 1;
    long long m;
    scanf("%d%lld", &n, &m);
    for (int i = 1; i <= n; i++)
      scanf("%lld%lld%lld", &a[i].t, &a[i].x, &a[i].y);
    a[0].t = 0, a[0].x = m, a[0].y = m;
    for (int i = 1; i <= n; i++) {
      if (a[i].x - (a[i].t - a[i - 1].t) > a[i - 1].y ||
          a[i].y + (a[i].t - a[i - 1].t) < a[i - 1].x) {
        flag = 0;
        break;
      }
      long long left = max(a[i - 1].x, a[i].x - (a[i].t - a[i - 1].t)),
                right = min(a[i - 1].y, a[i].y + (a[i].t - a[i - 1].t));
      a[i].x = max(left - (a[i].t - a[i - 1].t), a[i].x),
      a[i].y = min(right + a[i].t - a[i - 1].t, a[i].y);
    }
    if (flag)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
