#include<iostream>
using namespace std;
int main(){
  int n,t,ans;
  ans=1001;
  int count=0;
  cin>>n>>t;
  for(int i=0;i<n;i++){
    int c,x;
    cin>>c>>x;
    if(x<=t){ans=min(ans,c); count++;}
  }
  if(count){cout<<ans;}
  else{cout<<"TLE";}
}