#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  int c,d,e=100000000,q=1;
  cin>>a>>b;
  for(int i=0;i<a;i++){
    cin>>c>>d;
    if(b>=d) e=min(e,c),q=0;
  }
  if(q==0) cout<<e<<"\n";
  else cout<<"TLE\n";

}
