#include<iostream>
#include<algorithm>
using namespace std;
vector<pair<int,int>>res;
int n,x,y;
int dist(int a,int b){
return (a-x)*(a-x)+(b-y)*(b-y);
}
int main(){
cin>>n>>x>>y;
for(int i=1;i<=n;i++){
int a,b;
cin>>a>>b;
pair<int,int>p={dist(a,b),i};
res.push_back(p);
}
sort(res.begin(),res.end());
for(int i=0;i<3;i++)cout<<res[i].second<<endl;
}
03-14
108
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)