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

#define int         long long
#define ull         unsigned long long
#define ll          long long
#define M           998244353
#define pb          push_back
#define p_q         priority_queue
#define pii         pair<ll,ll>
#define vi          vector<ll>
#define vii         vector<pii>
#define mi          map<ll,ll>
#define mii         map<pii,ll>
#define all(a)      (a).begin(),(a).end()
#define sz(x)       (ll)x.size()
#define endl        '\n'
#define gcd(a,b)    __gcd((a),(b))
#define lcm(a,b)    ((a)*(b)) / gcd((a),(b))
#define ios         ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define mp          make_pair
#define lb          lower_bound
#define ub          upper_bound
#define F           first
#define S           second
#define rep(i, begin, end) for (int i=begin;i<end;i++)
#define repd(i, begin, end) for (int i=end-1;i>=begin;i--)
#define ini(a,n,b)  for(ll int i=0;i<n;i++) a[i]=0;
#define cset(a)     __builtin_popcountll(a)
#define hell        1000000007
#define re          resize
const int INF=1e18;
const int N=300005;


int powm(int a,int b)
{
  int res=1;
  while(b)
  {
    if(b&1) 
    res=(res*a)%M;
      a=(a*a)%M;
      b>>=1;
  }
 
  return res;
}

int pow(int a,int b)
{
  int res=1;
  while(b)
  {
    if(b&1) 
    res=(res*a);
      a=(a*a);
      b>>=1;
  }
 
  return res;
}


signed main(void)
{ios
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);freopen("answer.txt", "w", stdout);
    #endif

    
    int n,w;
    cin>>n>>w;
    vi a(2e5+5,0),b(2e5+5,0);
    rep(i,1,n+1)
    {
       int x,y,c;
       cin>>x>>y>>c;
       a[x]+=c;
       b[y]+=c;
    }

    int f=1;
    rep(i,0,2e5+5)
    {
      if(i>0)
       a[i]=a[i]+a[i-1];
    }

    rep(i,0,2e5+5)
    {
       if(i>0)
       b[i]=b[i]+b[i-1];
    }

    rep(i,0,2e5+5)
    {
      int k=a[i]-b[i];
      if(w<k) {f=0;break;}
    }



    if(f) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    


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

using ll = long long;

int main() {
  ll n, w;
  cin >> n >> w;
  
  vector<ll> imos(2e5 + 10, 0);
  for (int i = 0; i <n; i++) {
    ll s, t, p;
    cin >> s >> t >> p;
    imos.at(s) += p;
    imos.at(t) -= p;
  }
  
  for (int i = 1; i < 2e5 + 10; i++) imos.at(i) += imos.at(i - 1);
  
  bool ok = true;
  for (int i = 0; i < 2e5 + 10; i++) {
    if (imos.at(i) > w) ok = false;
  }
  
  if (ok) cout << "Yes\n";
  else cout << "No\n";
}