#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int tc, n, m, t, l, r;
  vector<int> tv, lv, rv;
  cin >> tc;
  for (int i = 0; i < tc; i++) {
    cin >> n >> m;
    tv.push_back(0);
    lv.push_back(m);
    rv.push_back(m);
    for (int j = 0; j < n; j++) {
      cin >> t >> l >> r;
      tv.push_back(t);
      lv.push_back(l);
      rv.push_back(r);
    }
    int flag = 0;
    int lo, ho;
    for (int j = 1; j <= n; j++) {
      lo = lv[j - 1] - (tv[j] - tv[j - 1]);
      ho = rv[j - 1] + (tv[j] - tv[j - 1]);
      if (lo > rv[j] || ho < lv[j]) {
        flag = 1;
        break;
      } else {
        if (lo < lv[j]) lo = lv[j];
        if (ho > rv[j]) ho = rv[j];
        lv[j] = lo;
        rv[j] = ho;
      }
    }
    if (flag == 1)
      cout << "NO\n";
    else {
      cout << "YES\n";
    }
    tv.clear();
    lv.clear();
    rv.clear();
  }
}
