#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
#define ll long long
#define vl vector <ll>
#define pb push_back
#define pll pair<ll, ll>
#define all(v) v.begin(), v.end()
#define mk make_pair
#define INF 2000000000000000000
#define INF32 2000000000
#define FOR(i, a, b) for(ll i = (ll)(a); i <= (ll)(b); i++)
#define ROF(i, a, b) for(ll i = (ll)(a); i >= (ll)(b); i--)
#define BOOST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)

#define x first
#define y second

using namespace std;
bool comp(vector<ll> a, vector<ll> b)
{
    if(a[0] == b[0])
    {
        return a[1] < b[1];
    }
    return a[0] < b[0];
}
int main()
{
    BOOST;
    ll n, w;
    cin >> n >> w;
    vector < vector<ll> > p(2*n, vector<ll> (3, 0));
    FOR(i, 0, n-1)
    {
        ll a, b, c;
        cin >> a >> b >> c;
        p[i][0] = a;
        p[i][1] = 1;
        p[i][2] = c;
        p[n+i][0] = b;
        p[n+i][1] = -1;
        p[n+i][2] = c;
    }
    sort(all(p), comp);
    ll now = 0, ind = 0, ti = p[ind][0];
    while(ind <= 2*n-1)
    {
        now += p[ind][1]*p[ind][2];
        if(now > w)
        {
            cout << "No";
            return 0;
        }
        ind++;
    }
    cout << "Yes";
    return 0;
}

/* D - Water Heater */ 
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

const int N = 2e5 + 10;
int n, m, maxv; ll a[N], d[N];

string solve(void)
{
	for (int k = 0; k <= maxv; ++k) a[k] = a[k - 1] + d[k];
	ll x = *max_element(a, a + maxv);
	return (x <= m) ? "Yes" : "No";
}

int main(int argc, char** argv)
{
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
	//	freopen("output.txt", "w", stdout);
	#endif
	while (cin >> n >> m) {
		memset(a, 0, sizeof(a));
		memset(d, 0, sizeof(d));
		for (int k = 1; k <= n; ++k) {
			int l, r, c; cin >> l >> r >> c;
			d[l] += c;
			d[r] -= c;
			maxv = max(maxv, r);
		}
		cout << solve() << endl;
	}
	return 0;	
} 
