//
// Created by Kushagra on 30-01-2021.
//

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<ll> vll;
typedef set<int> si;

#define F first
#define S second
#define PB push_back
#define MP make_pair
#define INF 1e18+5
#define MOD 1e9+7
#define TEST(i, a, t) for (int i=a; i<=t; i++)
#define FORn(i, a, b) for (int i=a; i>=b; i--)
#define all(v) v.begin(), v.end()
#define allR(v) v.rbegin(), v.rend()
#define FRIO freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define FIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int main()
{
    FIO;
    int n,s,d;
    cin>>n>>s>>d;
    int x,y;
    int c=0;
    TEST(i,1,n)
    {
        cin>>x>>y;
        if(x<s && y>d)
        {
            c++;
        }
    }
    if(c>0)
    {
        cout<<"Yes";
    }
    else
    {
        cout<<"No";
    }
    return 0;
}
#include <iostream>

int main(){
   int N, S, D;
   std::cin >> N >> S >> D;
   int X, Y;
   long long ans = 0;
   for(int i=0; i<N; ++i){
      std::cin >> X >> Y;
      if(X<S && Y>D) ans += Y;
   }
   std::cout << (ans>0 ? "Yes" : "No") << std::endl;
   return 0;
}
