#include #include #include using namespace std; typedef struct punct { int x,y; float dist; }; punct v[100]; int n,k,boss_x,boss_y; float distanta(int x,int y,int boss_x,int boss_y); ifstream fin("date.in"); int main() { cin>>n>>k; cin>>boss_x>>boss_y; for(int i=1;i<=n;i++) { fin>>v[i].x>>v[i].y; v[i].dist=distanta(v[i].x,v[i].y,boss_x,boss_y); } for(int i=1;iv[j].dist) { punct aux = v[i]; v[i]=v[j]; v[j]=aux; } else if(v[i].dist==v[j].dist) { if(v[i].x>v[j].x) { punct aux = v[i]; v[i]=v[j]; v[j]=aux; } else if(v[i].x==v[j].x) if(v[i].y>v[j].y) { punct aux = v[i]; v[i]=v[j]; v[j]=aux; } } for(int i=1;i<=k;i++) cout<