#include<bits/stdc++.h>
using namespace std;
#define int         long long
#define mod         1000000007
#define FAST        ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f(i,n)      for(int i=0;i<n;i++)
#define fp(i,k,n)   for(int i=k;i<=n;i++)
#define fr(i,k,n)   for(int i=k;i>=n;i--)
#define pb          push_back
#define pii         pair<int,int>
#define vi          vector<int>
#define vii         vector<pii>
#define dbg(x)      cout << (#x) << " is " << (x) << '\n' 
#define F           first
#define S           second
#define sz(x)       (int)(x).size()
#define lb          lower_bound
#define ub          upper_bound
#define mems(x)     memset(x,0,sizeof(x))
#define all(a)      a.begin(),a.end()
 
/*---------------------------------------------------------------------------------------------------*/
 
void solve()
{
    int m, n, k;
    cin >> n >> m >> k;

    int x[n], y[n];

    bool damS = false;
    f (i, n)
    {
        cin >> x[i] >> y[i];
        if ((x[i] < m) && (y[i] > k)) damS = true;
    }
    if (damS) cout << "Yes";
    else cout << "No";
} 
 
signed main()
{
    FAST
    int T = 1;
    // cin >> T; 

    while (T--) solve();

    return 0;
} 
#include<bits/stdc++.h>
#define pb push_back
#define all(v) v.begin(),v.end()
#define allr(v) v.rbegin(),v.rend()
#define SORT(v) sort(all(v))
#define int long long
#define ff first
#define ss second
#define mod 1000000007
#define endl "\n"

using namespace std;

void oj()
{
  ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  #ifndef ONLINE_JUDGE  
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  #endif
}

void solve()
{
  int n, s, d;
  cin>>n>>s>>d;
  bool ok = false;
  for(int i = 0; i <n; i++)
  {
    int x, y; cin>>x>>y;
    if(x < s && y > d)
      ok = true;
  }
  (ok?cout<<"Yes":cout<<"No");
}
signed main()
{
  oj();
  // int t; cin>>t;
  // while(t--)
    solve();

  return 0;
}