#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <tuple>
#define mkp make_pair
#define mkt make_tuple
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define all(v) v.begin(),v.end()
using namespace std;
typedef long long ll;
const ll MOD=1e9+7;
template<class T> void chmin(T &a,const T &b){if(a>b) a=b;}
template<class T> void chmax(T &a,const T &b){if(a<b) a=b;}

const int L=3e5;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int N;
  ll W;
  cin>>N>>W;
  vector<int> S(N),T(N);
  vector<ll> P(N);
  rep(i,N) cin>>S[i]>>T[i]>>P[i];

  vector<ll> imos(L+10,0);
  rep(i,N){
    imos[S[i]]+=P[i];
    imos[T[i]]-=P[i];
  }

  rep(i,L) imos[i+1]+=imos[i];

  ll ma=*max_element(all(imos));
  if(ma<=W) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;

  return 0;
}

#include <iostream>
#include <climits>
#include <set>
#include <string>
#include <algorithm>
#include <vector>
#define MAX 1000000007


using namespace std;
#define ll long long
#define dbg if(0)
#define ISRANGE(val,lo,hi) ((lo<=val)&&(val<hi))



int main(){
    ll ans,a,b,c,d;
    cin>>a>>b>>c>>d;
    if(d*c-b>0){
        ans=a/(d*c-b)+((a%(d*c-b)!=0)?(1):(0));
    }else if(d*c-b==0 && a==0){
        ans=0;
    }else{
        ans=-1;
    }

    cout <<ans<<endl;

    return 0;

}