#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,g,i,m=0,j=10000;
	cin>>n>>g;
	int c[n+6],t[n+6];
	for (i=1;i<=n;i++)
	{
		cin>>c[i]>>t[i];
		if (t[i]<=g&&c[i]<j)
		{
			j=c[i];
			m=i;
		}
	}
	if (m==0)
	{
		cout<<"TLE";
		return 0;
	}
	cout<<j;
}