#include<iostream>
using namespace std;

const int N = 1e5 + 5;

struct node{
	int l, r;
}a[N];

int n, t, s;

bool cmp(node x, node y){
	return x.l < y.l;
}

int main(){
	
	cin >> n >> t >> s;
	
	for(int i = 1;i <= n;i ++){
		cin >> a[i].l >> a[i].r;
	}
	a[0] = {0, 0};
	a[n + 1] = {t, t};
	int minx = 1e9;
	while(r <= n + 1 && )
	
	return 0;
}
