#include <bits/stdc++.h>
using namespace std;
inline long long min2(long long a, long long b) {
  return (a) < (b) ? (a) : (b);
}
inline long long max2(long long a, long long b) {
  return (a) > (b) ? (a) : (b);
}
inline long long max3(long long a, long long b, long long c) {
  return (a) > (b) ? ((a) > (c) ? (a) : (c)) : ((b) > (c) ? (b) : (c));
}
inline long long min3(long long a, long long b, long long c) {
  return (a) < (b) ? ((a) < (c) ? (a) : (c)) : ((b) < (c) ? (b) : (c));
}
pair<long long int, long long int> fsi(pair<long long int, long long int> a,
                                       pair<long long int, long long int> b) {
  pair<long long int, long long int> x;
  if (max(a.first, b.first) > min(a.second, b.second)) {
    x.first = 10000000000002;
    x.second = 10000000000002;
  } else {
    x.first = max(a.first, b.first);
    x.second = min(a.second, b.second);
  }
  return x;
}
void process() {
  long long int n, m, l, h, pt, ct;
  pair<long long int, long long int> p, curr;
  string ans;
  ans = "YES";
  bool and_found = false;
  pt = 0;
  cin >> n >> m;
  p.first = m;
  p.second = m;
  for (long long int i = 0; i < n; i++) {
    cin >> ct >> curr.first >> curr.second;
    if (!and_found) {
      p.first -= ct - pt;
      p.second += ct - pt;
      p = fsi(p, curr);
      if (p.first == 10000000000002) {
        and_found = true;
        ans = "NO";
      }
      pt = ct;
    }
  }
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int t;
  cin >> t;
  ;
  while (t--) process();
}
