#include <bits/stdc++.h>
using namespace std;
void test_case() {
  long long n, m;
  cin >> n >> m;
  long long mn = m, mx = m, time = 0, flag = 0;
  long long t, l, h;
  for (int i = 0; i < n; i++) {
    cin >> t >> l >> h;
    long long d = t - time;
    mn -= d, mx += d;
    if (mx < l || mn > h) {
      flag = 1;
    }
    time = t;
    mn = max(mn, l);
    mx = min(mx, h);
  }
  if (flag)
    cout << "NO\n";
  else
    cout << "YES\n";
}
int main() {
  int t;
  cin >> t;
  while (t--) test_case();
}
