#include <bits/stdc++.h>

#define endl "\n"

using namespace std;


void setup() {
    #ifdef LOCAL
    freopen("input", "r", stdin);
    #else
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    #endif
}


int main() {
    setup();
    int N, W;
    cin >> N >> W;
    long long line[200020];
    memset(line, 0, sizeof(long long) * 200020);

    for (int i = 0; i < N; i++) {
        int S, T, P;
        cin >> S >> T >> P;
        line[S] += P;
        line[T] -= P;
    }

    bool no = line[0] > W;
    for (int i = 1; i < 200020; i++) {
        line[i] += line[i-1];
        if (line[i] > W) {
            no = true;
            break;
        }
    }
    if (no) cout << "No" << endl;
    else cout << "Yes" << endl;
}
#include "bits/stdc++.h"


typedef long long ll;
#define all(x) (x).begin(), (x).end()  // sortなどの引数を省略
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define max3(x, y, z) max(x, max(y, z))
#define min3(x, y, z) min(x, min(y, z))

#ifdef _MSC_FULL_VER  //デバッグ出力
#define dout cout
#define debug() if (true)
#define check(x) std::cout << "★" << #x << "の値:" << (x) << endl
#define pass(x) std::cout << "☆" << x << endl
#else
#define dout \
  if (false) cout
#define debug() if (false)
#define check(x) \
  if (false) cout << "★" << #x << "の値:" << (x) << endl
#define pass(x) \
  if (false) cout << "☆" << x << endl
#endif

using namespace std;
//#define int long long;
double dist(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
ll idist(ll x1, ll y1, ll x2, ll y2) {
  return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
}
signed main() {
  ll N,w;
  cin >> N >> w;
  vector<pair<ll,ll>> a(N);
  vector<pair<ll,ll>> b(N);
  rep(i,N){
      ll tmp0,tmp1,tmp2;
      cin >> tmp0 >> tmp1 >> tmp2;
      a[i] = make_pair(tmp0,tmp2);
      b[i] = make_pair(tmp1,tmp2);
  }
  sort(all(a));
  sort(all(b));
  ll d = 0;
  ll m = 0;
  rep(i,N){
      while(a[i].first >= b[d].first){
          m-=b[d].second;
          d++;
      }
      m+=a[i].second;
      //cout << i << " " << d << endl;
      if(m>w){
          //cout << i <<" " << d << endl;
          cout << "No";
          return 0;
      }
  }
  cout << "Yes";
}


