#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    bool gt = true;
    long long mn = m, mx = m;
    long long curt = 0;
    for (long long i = 0; i < n; i++) {
      long long t, l, h;
      cin >> t >> l >> h;
      long long ti = t - curt;
      mn -= ti;
      mx += ti;
      if (l > mx || h < mn) gt = false;
      mn = max(mn, l);
      mx = min(mx, h);
      curt = t;
    }
    if (gt)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
