#include <bits/stdc++.h>
// #include <atcoder/all>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define srep(i,s,t) for(int i = s; i < t; ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
using namespace std;
// using namespace atcoder;
typedef long long int ll;
typedef pair<int,int> P;
#define yn {puts("Yes");}else{puts("No");}
#define MAX_N 200005
ll a[MAX_N] = {};
int main() {
    ll n, w;
    cin >> n >> w;

    

    ll s[n], t[n], p[n];
    rep(i,n){
        cin >> s[i] >> t[i] >> p[i];
        a[s[i]] += p[i];
        a[t[i]] -= p[i];
    } 
    int ok = 1;
    ll now = 0;
    rep(i,MAX_N){
        now += a[i];
        if(now > w) ok = 0;
    }
    if(ok) yn;
    return 0;
}



#include <bits/stdc++.h>
using namespace std;
template <typename T> using vec = vector<T>;
template <typename T> using vvec = vector<vector<T>>;

int main() {
    int n, w; cin >> n >> w;

    vec<int64_t> imos(2 * 1e5 + 1, 0);
    for (int i = 0; i < n; ++i) {
        int s, t, p; cin >> s >> t >> p;
        imos[s] += p;
        imos[t] -= p;
    }
    for (int i = 0; i < 2 * 1e5; ++i) {
        imos[i + 1] += imos[i];
    }

    for (auto e : imos) {
        if (w < e) {
            cout << "No" << endl;
            return 0;
        }
    }

    cout << "Yes" << endl;
}

