#include <iostream> #include<cmath> #include <algorithm> using namespace std; typedef struct N{ int x; int y; }Num; Num num[1010]; bool cmp(Num n1,Num n2)//结构体的比较 { if(n1.x!=n2.x)return n1.x<n2.x; else return n1.y<n2.y; } int main() { int n; cin>>n; for(int i=1;i<=n;i++)cin>>num[i].x>>num[i].y; sort(num+1,num+1+n,cmp); cout<<num[1].x<<" "<<num[1].y<<endl; } // 64 位输出请用 printf("%lld")