#include<iostream>
using namespace std;
struct stu{
int id;
double score;
};
stu student[105];
int main(){
int n,k;
cin >> n >> k;
for(int i=1;i<=n;i++){
cin >> student[i].id;
cin >> student[i].score;
}
for(int i=1;i<=n-1;i++){
for(int j=1;j<=n-i;j++){
if(student[j].score<student[j+1].score) swap(student[j],student[j+1]);
}
}
cout << student[k].id << " " ;
printf("%g",student[k].score);
return 0;
}
信奥赛一本通1176 谁考了第k名