/// Pe cadrane greedy cu cautare binara.
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("pachete.in");
ofstream g("pachete.out");
int m, start_x, start_y, a, b;
vector<pair<int,int>>cadran[5];
void citire()
{
f >> m;
f >> start_x >> start_y;
for (int i=1; i<=m; ++i)
{
f >> a >> b;
if (a>=start_x && b>=start_y)
cadran[1].push_back({a,b});
else if (a<=start_x && b>=start_y)
{
cadran[2].push_back({a,b});
}
else if (a<=start_x && b<=start_y)
cadran[3].push_back({a,b});
else
cadran[4].push_back({a,b});
}
}
void c1()
{
}
int main()
{
citire();
c1();
c2();
c3();
c4();
return 0;
}