#include <bits/stdc++.h>
using namespace std;
bool isPower(long long int x) { return x && (!(x & (x - 1))); }
long long int fac(long long int n) {
  long long int ans = 1;
  for (int i = n; i >= 1; i--) {
    ans *= n;
    n--;
  }
  return ans;
}
long long int ncr(long long int n, long long int r) {
  long long int ans = fac(n) / (fac(n - r) * fac(r));
  return ans;
}
long long int sum(long long int n) {
  long long int m = n;
  long long int s = 0;
  while (m) {
    s += m % 10;
    m /= 10;
  }
  return s;
}
void solve() {
  long long int n, m;
  cin >> n >> m;
  long long int ti, l, h;
  long long int mn = m, mx = m;
  long long int f = 0, pr = 0;
  for (int i = 0; i < n; i++) {
    cin >> ti >> l >> h;
    mx += ti - pr;
    mn -= ti - pr;
    if (mx < l || mn > h) {
      f = 1;
    }
    pr = ti;
    mx = min(mx, h);
    mn = max(mn, l);
  }
  if (f)
    cout << "NO"
         << "\n";
  else
    cout << "YES"
         << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  long long int t;
  t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
