#include <bits/stdc++.h>
#define rep(i,n)    for(int i=0;i<(n);++i)
#define repA(i,k,n) for(int i=k;i<=(n);++i)
#define repD(i,k,n)	for(int i=k;i>=(n);--i)
#define endl '\n'
#define print(b)	for(auto a:b) cout<<a<<' ';
#define printN(b)   for(auto a:b) cout<<a<<endl;
#define fin    		freopen("C:\\Users\\Nazmul Rahul\\Desktop\\in.txt", "r++", stdin)
#define fout   		freopen("C:\\Users\\Nazmul Rahul\\Desktop\\out.txt", "w++", stdout)
#define fastio    	ios::sync_with_stdio(false)
#define max(a,b)	((a)>(b)?(a):(b))
#define min(a,b)	((a)<(b)?(a):(b))
#define pb    		push_back
#define pob   		pop_back
#define ll 			long long int
#define MAX         2*100001
std::vector<ll> total(MAX);
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
	fin;
	fout;
#endif
	ll n, w;
	ll s, t, p;
	cin >> n >> w;

	for (ll i = 0; i < n; i++) {
		cin >> s >> t >> p;
		total[s] += p;
		total[t] -= p;
	}
	for (ll i = 1; i < MAX; i++) {
		total[i] += total[i - 1];
	}
	// cout << total[2] << endl;
	for (int i = 0; i < MAX; i++) {
		if (total[i] > w) {
			cout << "No" << endl;
			return 0;
		}
	}
	cout << "Yes";

	return 0;
}
//FEARLESS
//Fear is the path to the dark side. 
//Fear leads to anger. Anger leads to hate. 
//Hate leads to suffering. - Master Yoda

// Templates
// 1. tempgeo.cpp
// 2. tempunion.cpp
#include <bits/stdc++.h>
using namespace std;
#define ll int64_t
#define pb push_back
#define pii pair <int, int>
#define pll pair <long long, long long>
#define endl '\n'
#define PI (2.0 * acos(0.0))
#define testcase ll T; cin >> T; for (ll tc = 1; tc <= T; tc++)
#define info pair<int, pii>
#define mkp make_pair
#define MAXN   1000002 
const long long M = 1e5 + 10, M2 = 1e6 + 10, oo = 1e9 + 7;
const long long MC = (1<<20) + 5;
void precomp () {
	// precomputation here
}
void solve () {
	int n, s, d;
	cin >> n >> s >> d;
	for (int i = 0; i < n; i++) {
		int x, y;
		cin >> x >> y;
		if (x < s && y > d) {
			cout << "Yes" << endl;
			return;
		}
	}
	cout << "No" << endl;
}
int main () {
    //freopen("E:/newts/in.txt", "r", stdin);
    //freopen("E:/newts/out.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	precomp();
    //testcase {
        solve ();
    //}
    return 0;
}

