#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) {
    return b;
  }
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
long long power_mod(long long a, long long b) {
  if (b == 0) {
    return 1;
  }
  long long temp = power_mod(a, b / 2);
  temp = (temp * temp) % 1000000007;
  if (b % 2) {
    temp = (temp * a) % 1000000007;
  }
  return temp;
}
int help(char c) {
  if (c == 'L') {
    return 0;
  }
  if (c == 'R') {
    return 1;
  }
  if (c == 'U') {
    return 2;
  }
  return 3;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    long long mmin = m, mmax = m;
    bool ans = true;
    long long to = 0;
    for (int i = 0; i < n; ++i) {
      long long t, l, h;
      cin >> t >> l >> h;
      mmin -= (t - to);
      mmax += (t - to);
      if (mmin <= h && mmax >= l) {
        mmin = max(mmin, l);
        mmax = min(mmax, h);
      } else {
        ans = false;
      }
      to = t;
    }
    if (ans) {
      cout << "YES"
           << "\n";
    } else {
      cout << "NO"
           << "\n";
    }
  }
}
