#include<stdio.h>
#include<algorithm>
using namespace std;
struct A {
    int x;
    int y;
};
bool comp(A c, A d) {
    if (c.x < d.x) {
        return true;
    } else if (c.x == d.x && c.y < d.y) {
        return true;
    } else return false;
}
int main() {
    int n;
    A m[100];
    while (scanf("%d", &n) != EOF) {
        for (int i = 0; i < n; i++) {
            scanf("%d%d", &m[i].x, &m[i].y);
        }
        sort(m, m + n, comp);
        printf("%d %d\n", m[0].x, m[0].y);
    }
    return 0;
}