#include <bits/stdc++.h>
#define INF 1e18
#define mod 998244353
#define rep(i,n,m) for(int i = (n); i < (m); i++)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define mp make_pair
#define tii tuple<int,int,int> 
#define mt make_tuple
#define pb push_back
#define pq priority_queue

using namespace std;
typedef long long int ll;
typedef long double ld;

ld MAX(ld x, ld y)
{
    if(x < y) return y;
    return x;
}

ld MIN(ld x, ld y)
{
    if(x < y) return x;
    return y;
}

ll pmod(ll x, ll y)
{
    return ((x*y)%mod + mod)%mod;
}

int main()
{
    ll n,w; cin >> n >> w;
    vector<ll>v(1000000,0);
    ll end=0;
    rep(i,0,n)
    {
        int s,t,p; cin >> s >> t >> p;
        if(end < t) end = t;
        v[s] += p; v[t] -= p;
    }
    rep(i,0,end)
    {
        v[i+1] += v[i];
    }
    rep(i,0,end+1)
    {
        if(v[i] > w)
        {
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;
}
/*
 * @Author: AsilenceBTF
 * @LastEditTime: 2020-12-11 20:02:17
 */
#include<bits/stdc++.h>
using namespace std;

#define ALL(x) x.begin(), x.end()
typedef long long ll;
const int INF = 0x3f3f3f3f;
const int N = 2e5 + 105;

ll pre[N] = {0};
int main(){
    int n;
    ll w;
    cin >> n >> w;
    for(int i = 1; i <= n; ++i){
        int l, r, p;
        cin >> l >> r >> p;
        pre[r] += p;
        if(l) pre[l] -= p;
    }
    for(int i = N - 2; i >= 0; --i) pre[i] += pre[i + 1];
    for(int i = 0; i < N; ++i){
        if(pre[i] > w) {
            cout << "No" << endl;
            return 0;
        }
    }cout << "Yes" << endl;
    // system("pause");
}