#include <iostream>
#include <algorithm>
using namespace std;
struct ab {
int x;
int y;
};
bool compear(ab a, ab b) {
if (a.x == b.x) {
return a.y < b.y;
} else {
return a.x < b.x;
}
}
int main() {
int n;
cin>>n;
ab* xy = (ab*)malloc(sizeof(ab) * n);
for (int i = 0; i < n; ++i) {
cin >> xy[i].x >> xy[i].y;
}
sort(xy, xy + n, compear);
std::cout << xy[0].x << " " << xy[0].y << std::endl;
}

京公网安备 11010502036488号