import java.util.*;

class Main {
	public static void main(String args[]){
	
    Scanner scan = new Scanner(System.in);
    int N=scan. nextInt();
    int T=scan.nextInt();
    
 
    
    int time[]=new int[N];
    int cost[]= new int[N];
    
    for(int i=0;i<N;i++){
    	cost[i]=scan.nextInt();
    	time[i]=scan.nextInt();
    }
    
    int mincost=1001;
   
  
    	for(int i=0;i<N;i++){
    		if(time[i]<=T){
    		  if(cost[i]<mincost){
    			  mincost=cost[i];
    		  }
    		}
    	}
    		if(mincost==1001){
    			System.out.println("TLE");
    		}else{
    			System.out.println(mincost);
    		}
    		
         }
    	
	
} import java.util.*; util.* java class Main {
	public static void main(String args[]){
	
    Scanner scan = new Scanner(System.in);
    int N=scan. nextInt();
    int T=scan.nextInt();
    
 
    
    int time[]=new int[N];
    int cost[]= new int[N];
    
    for(int i=0;i<N;i++){
    	cost[i]=scan.nextInt();
    	time[i]=scan.nextInt();
    }
    
    int mincost=1001;
   
  
    	for(int i=0;i<N;i++){
    		if(time[i]<=T){
    		  if(cost[i]<mincost){
    			  mincost=cost[i];
    		  }
    		}
    	}
    		if(mincost==1001){
    			System.out.println("TLE");
    		}else{
    			System.out.println(mincost);
    		}
    		
         }
    	
	
} Main public static void main(String args[]){
	
    Scanner scan = new Scanner(System.in);
    int N=scan. nextInt();
    int T=scan.nextInt();
    
 
    
    int time[]=new int[N];
    int cost[]= new int[N];
    
    for(int i=0;i<N;i++){
    	cost[i]=scan.nextInt();
    	time[i]=scan.nextInt();
    }
    
    int mincost=1001;
   
  
    	for(int i=0;i<N;i++){
    		if(time[i]<=T){
    		  if(cost[i]<mincost){
    			  mincost=cost[i];
    		  }
    		}
    	}
    		if(mincost==1001){
    			System.out.println("TLE");
    		}else{
    			System.out.println(mincost);
    		}
    		
         } main {
	
    Scanner scan = new Scanner(System.in);
    int N=scan. nextInt();
    int T=scan.nextInt();
    
 
    
    int time[]=new int[N];
    int cost[]= new int[N];
    
    for(int i=0;i<N;i++){
    	cost[i]=scan.nextInt();
    	time[i]=scan.nextInt();
    }
    
    int mincost=1001;
   
  
    	for(int i=0;i<N;i++){
    		if(time[i]<=T){
    		  if(cost[i]<mincost){
    			  mincost=cost[i];
    		  }
    		}
    	}
    		if(mincost==1001){
    			System.out.println("TLE");
    		}else{
    			System.out.println(mincost);
    		}
    		
         } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N=scan. nextInt(); N scan. nextInt() scan. nextInt scan int T=scan.nextInt(); T scan.nextInt() scan.nextInt scan int time[]=new int[N]; time new int[N] N int cost[]= new int[N]; cost new int[N] N for(int i=0;i<N;i++){
    	cost[i]=scan.nextInt();
    	time[i]=scan.nextInt();
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
    	cost[i]=scan.nextInt();
    	time[i]=scan.nextInt();
    } {
    	cost[i]=scan.nextInt();
    	time[i]=scan.nextInt();
    } cost[i]=scan.nextInt() cost[i] cost i scan.nextInt() scan.nextInt scan time[i]=scan.nextInt() time[i] time i scan.nextInt() scan.nextInt scan int mincost=1001; mincost 1001 for(int i=0;i<N;i++){
    		if(time[i]<=T){
    		  if(cost[i]<mincost){
    			  mincost=cost[i];
    		  }
    		}
    	} int i=0; int i=0; i 0 i<N i N i++ i++ i {
    		if(time[i]<=T){
    		  if(cost[i]<mincost){
    			  mincost=cost[i];
    		  }
    		}
    	} {
    		if(time[i]<=T){
    		  if(cost[i]<mincost){
    			  mincost=cost[i];
    		  }
    		}
    	} if(time[i]<=T){
    		  if(cost[i]<mincost){
    			  mincost=cost[i];
    		  }
    		} time[i]<=T time[i] time i T {
    		  if(cost[i]<mincost){
    			  mincost=cost[i];
    		  }
    		} if(cost[i]<mincost){
    			  mincost=cost[i];
    		  } cost[i]<mincost cost[i] cost i mincost {
    			  mincost=cost[i];
    		  } mincost=cost[i] mincost cost[i] cost i if(mincost==1001){
    			System.out.println("TLE");
    		}else{
    			System.out.println(mincost);
    		} mincost==1001 mincost 1001 {
    			System.out.println("TLE");
    		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
    			System.out.println(mincost);
    		} System.out.println(mincost) System.out.println System.out System System.out mincost String args[] args
import java.util.*;

class Main {
	public static void main(String args[]){
	
    Scanner scan = new Scanner(System.in);
    int N=scan. nextInt();
    int T=scan.nextInt();
    
 
    
    int time[]=new int[N];
    int cost[]= new int[N];
    
    for(int i=0;i<N;i++){
    	cost[i]=scan.nextInt();
    	time[i]=scan.nextInt();
    }
    
    int mincost=1001;
   
  
    	for(int i=0;i<N;i++){
    		if(time[i]<=T){
    		  if(cost[i]<mincost){
    			  mincost=cost[i];
    		  }
    		}
    	}
    		if(mincost==1001){
    			System.out.println("TLE");
    		}else{
    			System.out.println(mincost);
    		}
    		
         }
    	
	
}
