#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << "=" << a << ", ";
  err(++it, args...);
}
long long int x[1000007], y[1000007], z[1000007], n;
string s, S;
vector<long long int> v;
int main() {
  {
    long long int a = 0, b = 0, c = 0, d, e, f, g, i, j, k, l, m, p, q, r, u, w,
                  t, tc = 1, in, loc, val, sz, lo, hi, mid, mn = 2134567891,
                  mx = 0, sum = 0, ans = 0;
    cin >> tc;
    for (t = 1; t <= tc; t++) {
      cin >> n >> k;
      mn = mx = k;
      long long int last = 0;
      f = 1;
      for (i = 1; i <= n; i++) {
        cin >> a >> l >> r;
        d = a - last;
        last = a;
        mx = min(r, mx + d);
        mn = max(l, mn - d);
        if (mn > mx) f = 0;
      }
      if (f)
        cout << "YES\n";
      else
        cout << "NO\n";
    }
  }
  return 0;
}
