#include<iostream>
#include<vector>
#include<cmath>
 #include<iomanip>
#define int long long
#define endl '\n'
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define infi INT_MAX
#define rinfi INT_MIN
#define inf LLONG_MAX
#define rinf LLONG_MIN
#define ff first
#define ss second
#ifndef ONLINE_JUDGE
#define line cout<<"here - "<<__LINE__<<"\n";
#define dbg(a) cout<<#a<<" --> "<<(a)<<"\n";
#define db(a,b) cout<<#a<<" --> "<<(a)<<"\n";cin>>b;
#else
#define line
#define dbg(a)
#define db(a,b)
#endif
char _;
using namespace std;
const int mx=2e5+10;
main()
{
//    fast
    int tc=1,i,j,k;
//    cin>>tc;
    while(tc--)
    {
      int n,w;
      cin>>n>>w;
      int s,t,p;
      vector<int>aa(mx,0);
      for(i=0;i<n;i++)
      {
          cin>>s>>t>>p;
          aa[s]+=p;
          aa[t]-=p;
      }
      int ok=1;
      for(i=0;i<mx;i++)
      {
          if(i)
            aa[i]+=aa[i-1];
          if(aa[i]>w)
            ok=0;
      }
      if(ok)
        cout<<"Yes"<<endl;
      else cout<<"No"<<endl;
    }
}



#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FILL0(x) memset(x, 0, sizeof(x))
#define FILL1(x) memset(x, -1, sizeof(x))

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

template <class T>
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T &a, const T &b)
{
    if (b < a)
    {
        a = b;
        return 1;
    }
    return 0;
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(20);

    int n;
    ll w;
    cin >> n >> w;

    ll sp[200010], tp[200010];
    FILL0(sp);
    FILL0(tp);
    int tmax = 0;
    rep(i, n)
    {
        int s, t;
        ll p;
        cin >> s >> t >> p;
        chmax(tmax, t);
        sp[s] += p;
        tp[t] += p;
    }

    ll water = 0;
    rep(i, tmax + 2)
    {
        water += sp[i];
        water -= tp[i];
        if (water > w)
        {
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;

    return 0;
}
