#include <bits/stdc++.h>

using namespace std;

#define REP(i, n)   for(int i = 0; i < (n); i++)
#define REPS(i, n)  for(int i = 1; i <= (n); i++)
#define RREP(i, n)  for(int i = (n)-1; i >= 0; i--)
#define RREPS(i, n) for(int i = (n); i > 0; i--)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define YES cout << "YES" << endl
#define Yes cout << "Yes" << endl
#define NO cout << "NO" << endl
#define No cout << "No" << endl

using ll  = long long;
using pi  = pair<int, int>;
using pl  = pair<ll, ll>;
using vi  = vector<int>;
using vl  = vector<ll>;
using vs  = vector<string>;
using vb  = vector<bool>;
using vvi = vector<vi>;
using vvl = vector<vl>;

const int MOD = 1e9 + 7;
const int INF = 1e9 + 7;
const ll  INFL = 1e18;

template<class T> bool chmax(T &a, const T &b) { if(a < b) { a = b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if(a > b) { a = b; return true; } return false; }

int main()
{ 
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    ll N, W; cin >> N >> W;
    vl imos(2*100010, 0);
    REP(i, N)
    {
        ll s, t, p; cin >> s >> t >> p;
        imos[s] += p;
        imos[t] -= p;
    }
    REP(i, 2*100010-1) imos[i+1] += imos[i];
    REP(i, 2*100010) 
    {
        if(imos[i] > W)
        {
            No;
            return 0;
        }
    }
    Yes;
}
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define ll long long int
#define ve vector<ll>
#define ve_pa vector<pair<ll,ll> >
#define pb push_back
#define mod 1000000007
#define INF 1e18+7
#define ld long double 
#define pll pair<ll,ll>
#define fi first
#define se second
#define mll map<ll,ll>
#define m_ve map<ll,ve>
#define min3(x,y,z) min(x,min(y,z))
#define max3(x,y,z) max(x,max(y,z))
#define W(x) while(x--)
#define ld long double
#define all(x) x.begin(),x.end()
#define popcount(x) __builtin_popcountll(x)
using namespace std;
using namespace __gnu_pbds;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
//int dx[]={1,-1,0,0},dy[]={0,0,1,-1};
class compare
{
public:
    bool operator() (pll p1,pll p2)
    {
        if(p1.fi>p2.fi)
        return 1;
        else
        return 0;
    }
};

int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL); 
cout.tie(NULL);
ll n,w;cin>>n>>w;
vector<pair<pll,ll> >pos;
for(int i=0;i<n;i++)
{
	ll s,t,p;
	cin>>s>>t>>p;
	pos.pb({{s,t},p});
}
sort(all(pos));
priority_queue<pll,vector<pll>,compare >q;
for(int i=0;i<n;i++)
{
	while(q.size()&&q.top().fi<=pos[i].fi.fi)
	{
		w+=q.top().se;
		q.pop();
	}	
	w-=pos[i].se;
	q.push({pos[i].fi.se,pos[i].se});
	if(w<0)
	{
		cout<<"No";
		return 0;
	}
}
cout<<"Yes";


}
