#include <bits/stdc++.h>
using namespace std;

const int N = 2e5+5;
int n,w;
long long s[N];

int main() {
    cin >> n >> w;
    for(int i = 1; i <= n; ++i) {
        int l,r,p;
        cin >> l >> r >> p;
        s[l] += p;
        s[r] -= p;
    }
    int flag = 1;
    for(int i = 0; i < N; ++i) {
        s[i] += s[i-1];
        if(s[i] > w) {
            flag = 0;
            break;
        }
    }
    if(flag)
        cout << "Yes\n";
    else
        cout << "No\n";
    return 0;
}

#include<bits/stdc++.h>
#define lld long long int
#define ll long double
#define vlld vector <lld>
#define vll vector <ll>
#define vvlld vector <vlld>
#define vvll vector <vll>
#define plld pair <lld,lld>
#define pll pair <ll,ll>
#define vplld vector <plld>
#define vpll vector <pll>
#define F first
#define S second 
#define mod 1000000007
#define modd 998244353
#define all(v) v.begin(),v.end()
#define rep(i,a,b)    for(lld i=a;i<b;i++)
#define repr(i,a,b) for(lld i=a;i>=b;i--)
#define pb push_back
#define mp make_pair
#define ios ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;



int main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
    ios;
    lld n,w;
    cin>>n>>w;

    vlld s(n),t(n),p(n);

    lld mx=2*pow(10,5)+5;
    vlld v(mx,0);

    rep(i,0,n){
        cin>>s[i]>>t[i]>>p[i];
        v[s[i]]+=p[i];
        v[t[i]]-=p[i];
    }

    rep(i,1,v.size())v[i]+=v[i-1];

    lld mmax=*max_element(all(v));

    if(mmax>w)cout<<"No"<<endl;
    else cout<<"Yes"<<endl;
}