#include<iostream>
#include<cmath>
using namespace std;
int main(){
  int a=1e4,n,t,m,l;
  cin>>n>>t;
  for(int i=0;i<n;i++){
    cin>>m>>l;
    if(l<=t){
      a=min(a,m);
    }
  }
  if(a!=1e4){
    cout<<a<<endl;
  }else{
    cout<<"TLE"<<endl;
  }
  return 0;
}