#include using namespace std; int main(){ int N;cin>>N; vectorX(N),Y(N); for(int i=0;i>X[i]>>Y[i]; vectorid(N); iota(id.begin(),id.end(),0); sort(id.begin(),id.end(),[&](int l,int r){ if(X[l]!=X[r])return X[l]