#include int main() { int N; std::cin >> N; using P = std::pair; std::vector

p(N); for(auto& e:p){std::cin >> e.first >> e.second;} std::sort(p.begin(),p.end()); for(const auto& e:p){std::cout << e.first << " "<< e.second<