#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
#define rep(i,n) for(ll i=0; i<n; i++)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rrep(i,n) for(ll i=n-1; i>=0; i--)
#define fi first
#define se second
long long mo = 1000000007;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
typedef pair<ll,Pll> PlP;
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
template<class A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}cout << "\n";}
string zero_padding(int val, int nf){ ostringstream sout;sout << setfill('0') << setw(nf) << val; return sout.str();};
ld PI=3.14159265358979323846;
//using namespace atcoder;

int main(){
    ll N,W;
    cin >> N >> W;
    vector<ll> S(N), T(N), P(N), A(200001);
    rep(i,N){
        cin >> S[i] >> T[i] >> P[i];
        A[S[i]] += P[i];
        A[T[i]] -= P[i];
    }
    rep(i,200000){
        A[i+1] += A[i];
    }
    ll M = -1;
    rep(i,200001){
        cmax(M,A[i]);
    }
    string ans = "No";
    if(M <= W){
        ans = "Yes";
    }
    cout << ans << endl;
}
#include <bits/stdc++.h>
using namespace std;

int main() {
  int a,b,c,f=0;
  string g="Yes";
  cin>>a>>b>>c;
  int h=a;
  vector<int> d(b),e(b);
  for(int i=0;i<b;i++){
    cin>>d.at(i)>>e.at(i);
  }
  for(int i=0;i<b;i++){
    a-=d.at(i)-f;
    f=d.at(i);
    if(a<=0)g="No";
    a+=e.at(i)-f;
    if(h<a)a=h;
    f=e.at(i);
  }
  a-=c-f;
  if(a<=0)g="No";
  cout<<g<<endl;
}