#include<bits/stdc++.h>
using namespace std;
int main() {
  int N,T;
  cin>>N>>T;
  int c[1000],t[1000];
  int ans=1001;
  for(int i=0;i<N;i++){
  	cin>>c[i]>>t[i];
    if(t[i]<=T&&ans>c[i])ans=c[i];
  }
  if(ans==1001){cout<<"TLE"<<endl;}
  else{cout<<ans<<endl;}
}