#include<iostream>
using namespace std;
int N;
const int MAXN = 50009;
vector <pair<int, int>> sub;
int main (){
    cin>>N;
    for(int i = 0; i < N; i ++){
        int a, b;
        cin>>a>>b;
        sub.push_back({a, 1});
        sub.push_back({b, -1});
    }

    return 0;
}
