#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, m;
    cin >> n >> m;
    long long int prev = 0;
    long long int mn = m;
    long long int mx = m;
    bool flag = false;
    while (n--) {
      long long int t, l, h;
      cin >> t >> l >> h;
      mx += (t - prev);
      mn -= (t - prev);
      prev = t;
      if (mx < l || mn > h) {
        flag = true;
      }
      mx = min(mx, h);
      mn = max(mn, l);
    }
    if (!flag)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
