#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int x[210]={0},y[210]={0};
int n,a,b;
cin>>n>>a>>b;
pair<int,int> h[n];
for(int i=0;i<n;i++)
{
cin>>x[i]>>y[i];
}
for(int i=0;i<n;i++)
{
int d=(a-x[i])*(a-x[i])+(b-y[i])*(b-y[i]);
h[i]={d,i};
}
sort(h,h+n);
for(int i=0;i<3;i++)
cout<<h[i].second+1<<endl;
return 0;
}