#include <stdio.h> int main() { int n; while (scanf("%d", &n) != EOF) { int xy[2][1000]; int min[2] = { 100000, 100000 }; for (int i = 0; i < n; i++) { scanf("%d%d", &xy[0][i], &xy[1][i]); } for (int i = 0; i < n; i++) { if (xy[0][i] < min[0]) { min[0] = xy[0][i]; min[1] = xy[1][i]; } if (xy[0][i] == min[0]) { if (xy[1][i] < min[1]) { min[1] = xy[1][i]; } } } printf("%d %d\n", min[0], min[1]); } return 0; }