#include #include #include #include #include using namespace std; int main() { int N; cin >> N; vector> Sid(N); for (pair& i : Sid) cin >> i.first >> i.second; sort(Sid.begin(), Sid.end()); for (pair& i : Sid) cout << i.first << ' ' << i.second << endl; }