#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define yes cout << "YES" << "\n";
#define no cout << "NO" << "\n";
#define fri(a,b) for(ll i = a; i<b; i++)
#define frj(a,b) for(ll j = a; j <b; j++)
#define frk(a,b) for(ll k = a; k <b; k++)
#define rfri(a,b) for(ll i = a; i>=b; i--)
using namespace std;
int main()
{
ios_base:: sync_with_stdio(false);
cin.tie(NULL);
ll T = 1;
// cin >> T;
while(T--)
{
ll x,y,n;
cin >> n;
cin >> x >> y;
bool ps = 0;
while(n--)
{
ll x1,y1;
cin >> x1 >> y1;
if(((x1>=0 && x>=0)||(x1<=0 && x<=0)) && ((y1>=0 && y>=0)||(y1<=0 && y<=0)))
{
if((abs(x1)<=abs(x)) && (abs(y1)<=abs(y))) ps = 1;
}
}
if(ps) yes
else no
}
}