
/* {{{ */
#include <bits/stdc++.h>
using namespace std;
#ifdef __LOCAL
#include <prettyprint.hpp>
#define debug(a) cerr << "[\033[33mDEBUG\033[m] " << (#a) << ": " << (a) << endl
#else
#define debug(s) cerr << "[\033[33mDEBUG\033[m] local only" << endl
#endif
using ll = long long;
template <class T> using vec = vector<T>;
#define endl "\n"
#define INF (int)1e9
#define LINF (long long)1e12
#define MOD (int)1e9+7
#define _rep(i,_a,_b,a,b,...) for (int i=(a), lim##i=(b); i<lim##i; i++)
#define rep(i, ...) _rep(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
#define _rrep(i,_a,_b,a,b,...) for (int i=(a), lim##i=(b); i>=lim##i; i--)
#define rrep(i, ...) _rrep(i, __VA_ARGS__, __VA_ARGS__, __VA_ARGS__, 0)
#define each(e, c) for (auto &e: c)
#define all(v) begin(v), end(v)
#define popcount __builtin_popcount
template <class T> bool chmin(T& a, const T& b) { return a>b?a=b,true:false; }
template <class T> bool chmax(T& a, const T& b) { return a<b?a=b,true:false; }
void keep_my_fingers_crossed()
{
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
}
/* }}} */

int main()
{
  keep_my_fingers_crossed();
  ll n, w;
  cin >> n >> w;
  vec<pair<ll, ll>> a;
  rep(i, n)
  {
    ll s, t, p;
    cin >> s >> t >> p;
    a.push_back({ s, p });
    a.push_back({ t, -p });
  }
  sort(all(a), [&](auto x, auto y){ return x.first < y.first; });

  map<ll, ll> usage;
  ll total = 0;
  for (auto [t, p]: a)
  {
    total += p;
    usage[t] = total;
  }

  for (auto [key, val]: usage)
  {
    if (val > w)
    {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}


#include<bits/stdc++.h>
using namespace std;

int main(){
    int n, w;
    cin>>n>>w;
    map<int, vector<int>> starts;
    map<int, vector<int>> ends;
    vector<int> ps (n);
    for(int i = 0; i < n; i++){
        int s, t, p;
        cin>>s>>t>>p;
        starts[s].push_back(i);
        ends[t].push_back(i);
        ps[i] = p;
    }
    long long draw = 0;
    bool bad = 0;
    for(int i = 0; i <= 2e5; i++){
        if(starts.count(i)){
            for(int idx : starts[i]){
                draw += ps[idx];
            }
        }
        if(ends.count(i)){
            for(int idx : ends[i]){
                draw -= ps[idx];
            }
        }
        if(draw > w){
            bad = 1;
            break;
        }
    }
    cout<<(bad ? "No" : "Yes")<<endl;
}