#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
#define rep(i, n) for (int i = 0; i < n; ++i)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

int main(){
  int n,w;
  cin>>n>>w;
  vector<ll> a(200005,0),b(200005,0);
  rep(i,n){
    int s,t,p;
    cin>>s>>t>>p;
    a[s]+=p;
    a[t]-=p;
  }
  ll now=0;
  bool ok=true;
  rep(i,200005){
    now+=a[i];
    b[i]=now;
    if(b[i]>w) ok=false;
  }
  if(ok) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;



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

    ll curr [200005];
    memset( curr , 0 , sizeof(curr ) );
    for(int i=0;i< n;i++)
    {
        ll s , t, p;
        cin>>s>>t>>p;
        curr[s] += p;
        curr[t] += -p;
    }

    for(int i=0;i<200004;i++)
    {
        curr[i+1] +=curr[i];
        if( curr[i] > w )
        {
            cout<<"No";
            return 0;
        }
    }
    cout<<"Yes";
}