import java.util.*;

class Main{
  public static void main(String[] args){
     Scanner sc=new Scanner(System.in);
     int n=sc.nextInt();
     int T=sc.nextInt();

     int answer=1001;
     for(int i=0;i<n;i++){
       int c=sc.nextInt();
       int t=sc.nextInt();
       if(c<answer&&t<=T){
         answer=c;
       }
     }
     System.out.println(answer!=1001?answer:"TLE");
  }
} import java.util.*; util.* java class Main{
  public static void main(String[] args){
     Scanner sc=new Scanner(System.in);
     int n=sc.nextInt();
     int T=sc.nextInt();

     int answer=1001;
     for(int i=0;i<n;i++){
       int c=sc.nextInt();
       int t=sc.nextInt();
       if(c<answer&&t<=T){
         answer=c;
       }
     }
     System.out.println(answer!=1001?answer:"TLE");
  }
} Main public static void main(String[] args){
     Scanner sc=new Scanner(System.in);
     int n=sc.nextInt();
     int T=sc.nextInt();

     int answer=1001;
     for(int i=0;i<n;i++){
       int c=sc.nextInt();
       int t=sc.nextInt();
       if(c<answer&&t<=T){
         answer=c;
       }
     }
     System.out.println(answer!=1001?answer:"TLE");
  } main {
     Scanner sc=new Scanner(System.in);
     int n=sc.nextInt();
     int T=sc.nextInt();

     int answer=1001;
     for(int i=0;i<n;i++){
       int c=sc.nextInt();
       int t=sc.nextInt();
       if(c<answer&&t<=T){
         answer=c;
       }
     }
     System.out.println(answer!=1001?answer:"TLE");
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int T=sc.nextInt(); T sc.nextInt() sc.nextInt sc int answer=1001; answer 1001 for(int i=0;i<n;i++){
       int c=sc.nextInt();
       int t=sc.nextInt();
       if(c<answer&&t<=T){
         answer=c;
       }
     } int i=0; int i=0; i 0 i<n i n i++ i++ i {
       int c=sc.nextInt();
       int t=sc.nextInt();
       if(c<answer&&t<=T){
         answer=c;
       }
     } {
       int c=sc.nextInt();
       int t=sc.nextInt();
       if(c<answer&&t<=T){
         answer=c;
       }
     } int c=sc.nextInt(); c sc.nextInt() sc.nextInt sc int t=sc.nextInt(); t sc.nextInt() sc.nextInt sc if(c<answer&&t<=T){
         answer=c;
       } c<answer&&t<=T c<answer c answer t<=T t T {
         answer=c;
       } answer=c answer c System.out.println(answer!=1001?answer:"TLE") System.out.println System.out System System.out answer!=1001?answer:"TLE" answer!=1001 answer 1001 answer "TLE" String[] args args
import java.util.*;

class Main{
  public static void main(String[] args){
     Scanner sc=new Scanner(System.in);
     int n=sc.nextInt();
     int T=sc.nextInt();

     int answer=1001;
     for(int i=0;i<n;i++){
       int c=sc.nextInt();
       int t=sc.nextInt();
       if(c<answer&&t<=T){
         answer=c;
       }
     }
     System.out.println(answer!=1001?answer:"TLE");
  }
}