#include<cstdio>
#include<algorithm>
using namespace std;
struct pos{
int x;
int y;
}arr[1001];
bool comp(pos a,pos b){
if(a.x==b.x){
return a.y<=b.y;
}
return a.x<b.x;
}
int main(){
int n;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d",&arr[i].x);
scanf("%d",&arr[i].y);
}
sort(arr,arr+n,comp);
printf("%d %d",arr[0].x,arr[0].y);
return 0;
}

京公网安备 11010502036488号