#include<bits/stdc++.h>

#define vi             vector<int>
#define vvi            vector<vector<int>>
#define pb             push_back
#define int            long long int
#define mod            1000000007
#define from(i,n)      for(int i=0;i<(int)n;i++)
#define from_j(i,j,n)  for(int i=j:i<(int)n;i++)
using namespace std;

int power(int n , int k) {
    if (k == 0)return 1;
    int temp = power(n, k / 2);
    temp = (temp * temp);
    if (k % 2) return (temp * n);
    return temp;
}
int fact(int x)
{
    int res = 1;
    for(int i=2;i<=x;i++)
        res = i*res;
    return res;
}

int choose(int n, int r)
{
    return fact(n)/(fact(r)*fact(n-r));
}

void sync()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  /*
    #ifndef ONLINEJUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    freopen("error.txt", "w", stderr);
    #endif
    */
}

int32_t main() {
    sync();
    
    int n, s, d;
    cin>>n>>s>>d;
    int count = 0;
    from(i,n)
    {
    	int x,y;
    	cin>>x>>y;
    	if(x>=s)
    		continue;
    	else
    	{
    		if(y>d)
    			count++;
    	}
    }
    if(count)
    	cout<<"Yes";
    else
    	cout<<"No";

    cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n"; 
	return 0;   
} 

#include<bits/stdc++.h>
using namespace std;
#define For(i,a,b) for(int i=a,i##_end=b;i<i##_end;++i)
using ll=long long;
using pii=pair<int,int>;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
const int mo=1e9+7;
using L=__int128;
ll Pow(ll a,ll b,ll p=mo){ll r=1;for(;b;b>>=1,a=(L)a*a%p)if(b&1)r=(L)r*a%p;return r;}
//template<typename T>
void inc(int &x,int y){x=(x+y>=mo?x+y-mo:x+y);}
int ad(int x,int y){return x+y>=mo?x+y-mo:x+y;}
template<typename T>T gcd(T a,T b){while(b)a%=b,swap(a,b);return a;}
mt19937 rnd(time(0));
 

int main(){
#ifdef SGR
	freopen("a.txt","r",stdin);
#endif
	ios::sync_with_stdio(0);
	ll n,m;
	cin>>n>>m;
	int x=Pow(10,n,m);
	ll y=Pow(10,n,m*m);
	//cerr<<x<<" "<<y<<endl;
	cout<<(y)/m<<endl;
}