#include
struct student{
char name[20];
char number[20];
int score;
};
int main(){
int n,i;
scanf("%d",&n);
struct student stu[100];
for(i=0;isc[i]){
min=sc[i];
min_index=i;
}
}
printf("%s %s\n",stu[max_index].name,stu[max_index].number);
printf("%s %s\n",stu[min_index].name,stu[min_index].number);
return 0;
}