#include <bits/stdc++.h>

using namespace std;

int n, T, c, t;
int ans=0x3f3f3f3f;

int main() {
	cin>>n>>T;
	for(int i=1; i<=n; i++) {
		cin>>c>>t;
		if (t<=T) ans=min(ans, c);
	}
	if (ans==0x3f3f3f3f) cout<<"TLE"<<endl;
	else cout<<ans<<endl;

	return 0;
}
