#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  int q;
  cin >> q;
  while (q--) {
    long long int n, m;
    cin >> n >> m;
    long long int mn = m;
    long long int mx = m;
    int flag = 0;
    int prev = 0;
    for (int i = 0; i < n; i++) {
      long long int t, L, R;
      cin >> t >> L >> R;
      mn -= t - prev;
      mx += t - prev;
      if (mn > R || mx < L) {
        flag = 1;
      }
      mn = max(mn, L);
      mx = min(mx, R);
      prev = t;
    }
    if (flag == 1) {
      cout << "NO" << '\n';
    } else {
      cout << "YES" << '\n';
    }
  }
  return 0;
}
