#include <bits/stdc++.h>
using namespace std;
int main() {
  int p;
  cin >> p;
  while (p--) {
    int t = 0, i, currmin, currmax, ti, li, hi;
    vector<vector<int>> v;
    vector<int> res;
    int c, init, maxx, minn;
    cin >> c >> init;
    for (i = 0; i < c; i++) {
      cin >> ti >> li >> hi;
      res.push_back(ti);
      res.push_back(li);
      res.push_back(hi);
      v.push_back(res);
      res.clear();
    }
    int flag = 0;
    maxx = init;
    minn = init;
    for (i = 0; i < c; i++) {
      flag = 0;
      if (i == 0)
        t = v[i][0];
      else
        t = v[i][0] - v[i - 1][0];
      currmin = v[i][1];
      currmax = v[i][2];
      minn = minn - t;
      maxx = maxx + t;
      if (currmin > maxx || currmax < minn) {
        flag = 1;
        break;
      }
      minn = max(minn, currmin);
      maxx = min(maxx, currmax);
    }
    if (flag == 1) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
  return 0;
}
