#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
typedef long long  ll;
int main() {
  ll N,W;
  cin>>N>>W;
  vector<ll> A(2*100000+1);
  rep(i,2*100000+1)A[i]=0;
  rep(i,N){
  ll S,T,P;
  cin>>S>>T>>P;
  A[S]+=P;
    A[T]-=P;
  }
  bool check=true;
  ll temp=0;
  rep(i,2*100000+1){
  temp+=A[i];
  if(temp>W)check=false;}
  if(check)cout<<"Yes";
  else cout<<"No";
}
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define ALL(x) (x).begin(),(x).end()
template<class T>bool umax(T &a, const T &b) {if(a<b){a=b;return 1;}return 0;}
template<class T>bool umin(T &a, const T &b) {if(b<a){a=b;return 1;}return 0;}
#ifdef LOCAL
void _debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void _debug_out(Head H, Tail... T) { cerr << " " << H; _debug_out(T...); }
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", _debug_out(__VA_ARGS__)
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
#define debug(...)
#define eprintf(...)
#endif

int main() {
  int n,s, d; cin >> n >> s >> d;
  rep(i,n) {
    int x,y; cin >> x >> y;
    if(x<s && y>d) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}
