import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		
		int InTime[];
		InTime= new int[N];
		
		int wark_cost;
		int wark_time;
		int flag = 0;
		int i = 0;
		int count = 0;
		
		for(i = 0; i < N; i++){  // N回くりかえす
			wark_cost = sc.nextInt();
			wark_time = sc.nextInt();
			
			if(wark_time <= T){
				InTime[i] = wark_cost;
				flag = 1;
			}else{
				InTime[i] = 1000;
			}
			
		}
		int min = 1000;
		
		for(i = 0; i < N; i++){
			if(min > InTime[i]){
				min = InTime[i];
			}
			
			
		}
		
		if(flag == 0){
			System.out.println("TLE");
		}
		else{
			System.out.println(min);
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		
		int InTime[];
		InTime= new int[N];
		
		int wark_cost;
		int wark_time;
		int flag = 0;
		int i = 0;
		int count = 0;
		
		for(i = 0; i < N; i++){  // N回くりかえす
			wark_cost = sc.nextInt();
			wark_time = sc.nextInt();
			
			if(wark_time <= T){
				InTime[i] = wark_cost;
				flag = 1;
			}else{
				InTime[i] = 1000;
			}
			
		}
		int min = 1000;
		
		for(i = 0; i < N; i++){
			if(min > InTime[i]){
				min = InTime[i];
			}
			
			
		}
		
		if(flag == 0){
			System.out.println("TLE");
		}
		else{
			System.out.println(min);
		}
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		
		int InTime[];
		InTime= new int[N];
		
		int wark_cost;
		int wark_time;
		int flag = 0;
		int i = 0;
		int count = 0;
		
		for(i = 0; i < N; i++){  // N回くりかえす
			wark_cost = sc.nextInt();
			wark_time = sc.nextInt();
			
			if(wark_time <= T){
				InTime[i] = wark_cost;
				flag = 1;
			}else{
				InTime[i] = 1000;
			}
			
		}
		int min = 1000;
		
		for(i = 0; i < N; i++){
			if(min > InTime[i]){
				min = InTime[i];
			}
			
			
		}
		
		if(flag == 0){
			System.out.println("TLE");
		}
		else{
			System.out.println(min);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		
		int InTime[];
		InTime= new int[N];
		
		int wark_cost;
		int wark_time;
		int flag = 0;
		int i = 0;
		int count = 0;
		
		for(i = 0; i < N; i++){  // N回くりかえす
			wark_cost = sc.nextInt();
			wark_time = sc.nextInt();
			
			if(wark_time <= T){
				InTime[i] = wark_cost;
				flag = 1;
			}else{
				InTime[i] = 1000;
			}
			
		}
		int min = 1000;
		
		for(i = 0; i < N; i++){
			if(min > InTime[i]){
				min = InTime[i];
			}
			
			
		}
		
		if(flag == 0){
			System.out.println("TLE");
		}
		else{
			System.out.println(min);
		}
	} 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 InTime[]; InTime InTime= new int[N] InTime new int[N] N int wark_cost; wark_cost int wark_time; wark_time int flag = 0; flag 0 int i = 0; i 0 int count = 0; count 0 for(i = 0; i < N; i++){  // N回くりかえす
			wark_cost = sc.nextInt();
			wark_time = sc.nextInt();
			
			if(wark_time <= T){
				InTime[i] = wark_cost;
				flag = 1;
			}else{
				InTime[i] = 1000;
			}
			
		} i = 0; i = 0 i 0 i < N i N i++ i++ i {  // N回くりかえす
			wark_cost = sc.nextInt();
			wark_time = sc.nextInt();
			
			if(wark_time <= T){
				InTime[i] = wark_cost;
				flag = 1;
			}else{
				InTime[i] = 1000;
			}
			
		} {  // N回くりかえす
			wark_cost = sc.nextInt();
			wark_time = sc.nextInt();
			
			if(wark_time <= T){
				InTime[i] = wark_cost;
				flag = 1;
			}else{
				InTime[i] = 1000;
			}
			
		} wark_cost = sc.nextInt() wark_cost sc.nextInt() sc.nextInt sc wark_time = sc.nextInt() wark_time sc.nextInt() sc.nextInt sc if(wark_time <= T){
				InTime[i] = wark_cost;
				flag = 1;
			}else{
				InTime[i] = 1000;
			} wark_time <= T wark_time T {
				InTime[i] = wark_cost;
				flag = 1;
			} InTime[i] = wark_cost InTime[i] InTime i wark_cost flag = 1 flag 1 {
				InTime[i] = 1000;
			} InTime[i] = 1000 InTime[i] InTime i 1000 int min = 1000; min 1000 for(i = 0; i < N; i++){
			if(min > InTime[i]){
				min = InTime[i];
			}
			
			
		} i = 0; i = 0 i 0 i < N i N i++ i++ i {
			if(min > InTime[i]){
				min = InTime[i];
			}
			
			
		} {
			if(min > InTime[i]){
				min = InTime[i];
			}
			
			
		} if(min > InTime[i]){
				min = InTime[i];
			} min > InTime[i] min InTime[i] InTime i {
				min = InTime[i];
			} min = InTime[i] min InTime[i] InTime i if(flag == 0){
			System.out.println("TLE");
		}
		else{
			System.out.println(min);
		} flag == 0 flag 0 {
			System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(min);
		} System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		
		int InTime[];
		InTime= new int[N];
		
		int wark_cost;
		int wark_time;
		int flag = 0;
		int i = 0;
		int count = 0;
		
		for(i = 0; i < N; i++){  // N回くりかえす
			wark_cost = sc.nextInt();
			wark_time = sc.nextInt();
			
			if(wark_time <= T){
				InTime[i] = wark_cost;
				flag = 1;
			}else{
				InTime[i] = 1000;
			}
			
		}
		int min = 1000;
		
		for(i = 0; i < N; i++){
			if(min > InTime[i]){
				min = InTime[i];
			}
			
			
		}
		
		if(flag == 0){
			System.out.println("TLE");
		}
		else{
			System.out.println(min);
		}
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		
		int InTime[];
		InTime= new int[N];
		
		int wark_cost;
		int wark_time;
		int flag = 0;
		int i = 0;
		int count = 0;
		
		for(i = 0; i < N; i++){  // N回くりかえす
			wark_cost = sc.nextInt();
			wark_time = sc.nextInt();
			
			if(wark_time <= T){
				InTime[i] = wark_cost;
				flag = 1;
			}else{
				InTime[i] = 1000;
			}
			
		}
		int min = 1000;
		
		for(i = 0; i < N; i++){
			if(min > InTime[i]){
				min = InTime[i];
			}
			
			
		}
		
		if(flag == 0){
			System.out.println("TLE");
		}
		else{
			System.out.println(min);
		}
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		
		int InTime[];
		InTime= new int[N];
		
		int wark_cost;
		int wark_time;
		int flag = 0;
		int i = 0;
		int count = 0;
		
		for(i = 0; i < N; i++){  // N回くりかえす
			wark_cost = sc.nextInt();
			wark_time = sc.nextInt();
			
			if(wark_time <= T){
				InTime[i] = wark_cost;
				flag = 1;
			}else{
				InTime[i] = 1000;
			}
			
		}
		int min = 1000;
		
		for(i = 0; i < N; i++){
			if(min > InTime[i]){
				min = InTime[i];
			}
			
			
		}
		
		if(flag == 0){
			System.out.println("TLE");
		}
		else{
			System.out.println(min);
		}
	}
}
