#include <bits/stdc++.h>
using namespace std;
long long nxt() {
  long long x;
  cin >> x;
  return x;
}
long long _gcd(long long a, long long b) {
  if (a == 0) return b;
  return _gcd(b % a, a);
}
void testcase() {
  long long n, m;
  cin >> n >> m;
  vector<pair<long long, pair<long long, long long>>> cust(n);
  for (auto &x : cust) {
    cin >> x.first >> x.second.first >> x.second.second;
  }
  long long mn = m, mx = m;
  long long time = 0;
  long long prevTime = 0;
  for (auto &x : cust) {
    time = x.first - prevTime;
    mn = max(mn - time, x.second.first);
    mx = min(mx + time, x.second.second);
    prevTime = x.first;
    if (mx < x.second.first || mn > x.second.second) {
      cout << "NO"
           << "\n";
      return;
    }
  }
  cout << "YES"
       << "\n";
}
signed main() {
  std::ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  long long t;
  cin >> t;
  while (t--) testcase();
}
