#include <algorithm>
#include<iostream>
#include<vector>
#include<deque>
#include<queue>
#include<stack>
#include<list>
#include<map>
#include<set>
#include<string>
#include <sstream>
#include<bitset>

#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<limits.h>
const int TIME = 2*100000+10;
const int INF = 0x7fffffff;
using lll = long long;
using ull = unsigned long long;
using namespace std;


int main(){
  lll ii,jj,kk;
  vector<int> ret;
  int n,w;

  cin >> n >> w;

  vector<int> s(n),t(n),p(n);
  
  for(ii=0;ii<n;ii++){
    cin >> s[ii] >> t[ii] >> p[ii];
  }
  vector<lll> preCal(TIME);
  vector<lll> waste(TIME);

  //cout << "calc waste" << endl;
  for(ii=0;ii<n;ii++){
    preCal[s[ii]] += p[ii];
    preCal[t[ii]] -= p[ii];
  }
  lll calCost = 0;
  for(ii=0;ii<TIME;ii++){
    calCost+=preCal[ii];
    waste[ii] = calCost;
  }
  bool flg = true;
  //cout << "check waste" << endl;
  for(ii=0;ii<TIME;ii++){
    if(waste[ii] > w){
      flg = false;
    }
  }

  if(flg){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
  return 0;
}

//#include <atcoder/all>
#include <bits/stdc++.h>

using namespace std;


#define rep2(x,fr,to) for(int x=(fr);x<(to);x++)
#define rep(x,to) for(int x=0;x<(to);x++)
#define repr(x,fr,to) for(int x=(fr);x>=(to);x--)
#define all(c) c.begin(),c.end()
#define sz(v) (int)v.size()

typedef long long  ll; typedef vector<int> VI; typedef pair<int,int> pii; typedef vector<ll> VL; const int MD = 1e9+7; //998244353;
void dbg(){cerr<<"\n";} template <class F,class ...S> void dbg(const F& f, const S&...s){cerr <<f <<": "; dbg(s...);}

//using mint = modint1000000007;


int main()
{
	cin.tie(0); ios_base::sync_with_stdio(false);
	int n; ll w;
	cin >>n >>w;

	VL dp(200200);
	int mx =0;
	rep(i, n){
		int s,t, p;
		cin >>s >>t >>p;
		dp[s] += p;
		dp[t] -=p;
		mx = max(mx, t);
	}
	rep(i, 200001){
		dp[i+1] +=dp[i];
	}
	//rep(i, mx+1) cerr<<dp[i]<<" ";dbg();
	bool ok=1;
	rep(i, 200001) if(dp[i] > w) ok=0;
	puts(ok? "Yes":"No");
	return 0;
}
