#include <bits/stdc++.h>
#define rep3(i, s, n, a) for (int i = (s); i < (int)(n); i += a)
#define rep2(i, s, n) rep3(i, s, n, 1)
#define rep(i, n) rep2(i, 0, n)

using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;
using Pll = pair<ll, ll>;

int main() { 
    ll n, w;
    cin >> n>> w;
    vector<Pll> v;
    rep(i, n){
        ll s, t, p;
        cin >> s >> t >> p;
        v.emplace_back(s, p);
        v.emplace_back(t, -p);
    }

    sort(v.begin(), v.end());
    ll now = 0;
    string res = "Yes";

    rep(i, 2*n){
        now += v[i].second;
        if(now > w){
            res = "No";
            break;
        }
    }

    cout << res << endl;
    return 0; 
}
#include <stdio.h>
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>

using ll = long long int;
const int INF = (1<<30);
const ll INFLL = (1ll<<60);
const ll MOD = (ll)(1e9+7);

#define l_ength size

void mul_mod(ll& a, ll b){
	a *= b;
	a %= MOD;
}

void add_mod(ll& a, ll b){
	a = (a<MOD)?a:(a-MOD);
	b = (b<MOD)?b:(b-MOD);
	a += b;
	a = (a<MOD)?a:(a-MOD);
}

ll v[225816];

int main(void){
	int n,s,t,i;
	ll w,p;
	std::cin >> n >> w;
	for(i=0; i<n; ++i){
		std::cin >> s >> t >> p;
		v[s] += p;
		v[t] -= p;
	}
	for(i=1; i<225816; ++i){
		v[i] += v[i-1];
	}
	for(i=0; i<225816; ++i){
		if(v[i]>w){
			std::cout << "No" << std::endl;
			return 0;
		}
	}
	std::cout << "Yes" << std::endl;
	return 0;
}
