#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  cin >> TESTS;
  while (TESTS--) {
    long long n, m;
    cin >> n >> m;
    vector<pair<long long, pair<long long, long long> > > v(n);
    for (long long int i = 0; i < n; i++) {
      cin >> v[i].first >> v[i].second.first >> v[i].second.second;
    }
    long long mn = m, mx = m;
    long long tm = 0;
    long long fl = 0;
    long long prev = 0;
    for (long long int i = 0; i < n; i++) {
      tm = v[i].first - prev;
      long long le = v[i].second.first;
      long long ri = v[i].second.second;
      mn = max(le, mn - tm);
      mx = min(ri, mx + tm);
      prev = v[i].first;
      if (mn > ri || mx < le) {
        cout << "NO"
             << "\n";
        fl = 1;
        break;
      }
    }
    if (fl == 1) continue;
    cout << "YES"
         << "\n";
  }
  return 0;
}
