#include <bits/stdc++.h>
using namespace std;
const int MX = 1e9 + 7;
const int N = 100005;
int a[200005], b[200005];
void solve() {
  int n, m;
  cin >> n >> m;
  vector<int> hi(n, 0);
  vector<int> lo(n, 0);
  vector<int> t(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> t[i] >> lo[i] >> hi[i];
  }
  int prev = 0;
  int mn = m;
  int mx = m;
  for (int i = 0; i < n; i++) {
    mn -= t[i] - prev;
    mx += t[i] - prev;
    if (lo[i] > mx || mn > hi[i]) {
      cout << "No" << endl;
      return;
    }
    mn = max(lo[i], mn);
    mx = min(hi[i], mx);
    prev = t[i];
  }
  cout << "Yes" << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
