#include <bits/stdc++.h>
#define lowbit(x) ((x)&(-(x)))
#define mkp make_pair
#define pb push_back

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;

int main()
{
	int n,s,d;
	scanf("%d%d%d",&n,&s,&d);
	int ans=0;
	for(int i=1;i<=n;i++)
	{
		int x,y;
		scanf("%d%d",&x,&y);
		if(x<s && y>d) ans|=1;
	}
	puts(ans==1 ? "Yes" : "No");
	
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, start, n) for (ll i = (ll)(start); i < (ll)(n); ++i)
static const ll INFTY = 1L << 62L;
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n, s, d;
    cin >> n >> s >> d;
    ll x[n], y[n];
    rep(i, 0, n)
    {
        cin >> x[i] >> y[i];
    }
    rep(i, 0, n)
    {
        if (x[i] < s && y[i] > d)
        {
            cout << "Yes\n";
            return 0;
        }
    }
    cout << "No\n";
}