#include <bits/stdc++.h>
#define int long long
#define IOS; ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pb emplace_back
#define pi pair<int, int>
#define fi first
#define se second
#define INF 2147483647
#define mkp make_pair
using namespace std;
int min(int a, int b){return a < b ? a : b;}
int max(int a, int b){return a > b ? a : b;}
bool isprime(int k){bool is=1 ; for ( int i = 2 ; i <= sqrt(k) ; i++ ) if ( k % i == 0 ) is = 0 ; return is;}
int s[200005];
int t[200005];
int n,w;
int32_t main()
{
    IOS;
	cin >>n>>w;
	memset(s,0,sizeof(s));
	memset(t,0,sizeof(t));
	for (int i=0,a,b,c;i<n;i++)
	{
		cin >>a>>b>>c;
		s[a]+=c;
		t[b]+=c;
	}
	bool is=1;
	int sum=0;
	for (int i=0;i<=200000;i++)
	{
		sum-=t[i];
		sum+=s[i];
		//cout <<sum<<" ";
		if (sum>w) {is=0;break;}
	}
	if (is) cout <<"Yes\n";
	else cout <<"No\n";
	return 0;
}

#include "bits/stdc++.h"


typedef long long ll;
#define all(x) (x).begin(), (x).end()  // sortなどの引数を省略
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define max3(x, y, z) max(x, max(y, z))
#define min3(x, y, z) min(x, min(y, z))

#ifdef _MSC_FULL_VER  //デバッグ出力
#define dout cout
#define debug() if (true)
#define check(x) std::cout << "★" << #x << "の値:" << (x) << endl
#define pass(x) std::cout << "☆" << x << endl
#else
#define dout \
  if (false) cout
#define debug() if (false)
#define check(x) \
  if (false) cout << "★" << #x << "の値:" << (x) << endl
#define pass(x) \
  if (false) cout << "☆" << x << endl
#endif

using namespace std;
//#define int long long;
double dist(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
ll idist(ll x1, ll y1, ll x2, ll y2) {
  return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
}
signed main() {
  ll N,w;
  cin >> N >> w;
  vector<pair<ll,ll>> a(N);
  vector<pair<ll,ll>> b(N);
  rep(i,N){
      ll tmp0,tmp1,tmp2;
      cin >> tmp0 >> tmp1 >> tmp2;
      a[i] = make_pair(tmp0,tmp2);
      b[i] = make_pair(tmp1,tmp2);
  }
  sort(all(a));
  sort(all(b));
  ll d = 0;
  ll m = 0;
  rep(i,N){
      while(a[i].first >= b[d].first){
          m-=b[d].second;
          d++;
      }
      m+=a[i].second;
      //cout << i << " " << d << endl;
      if(m>w){
          //cout << i <<" " << d << endl;
          cout << "No";
          return 0;
      }
  }
  cout << "Yes";
}


