import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int time = sc.nextInt();
		
		int c_min = 1001;
		
		for(int i = 0 ; i < n ; i++) {
			
			int c = sc.nextInt();
			int t = sc.nextInt();
			
			if(t <= time ){
				if(c < c_min){
					c_min = c;
				}
			}
			
		}
		
		if(c_min >= 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(c_min);
		}
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int time = sc.nextInt();
		
		int c_min = 1001;
		
		for(int i = 0 ; i < n ; i++) {
			
			int c = sc.nextInt();
			int t = sc.nextInt();
			
			if(t <= time ){
				if(c < c_min){
					c_min = c;
				}
			}
			
		}
		
		if(c_min >= 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(c_min);
		}
	}
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int time = sc.nextInt();
		
		int c_min = 1001;
		
		for(int i = 0 ; i < n ; i++) {
			
			int c = sc.nextInt();
			int t = sc.nextInt();
			
			if(t <= time ){
				if(c < c_min){
					c_min = c;
				}
			}
			
		}
		
		if(c_min >= 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(c_min);
		}
	} main {
		
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int time = sc.nextInt();
		
		int c_min = 1001;
		
		for(int i = 0 ; i < n ; i++) {
			
			int c = sc.nextInt();
			int t = sc.nextInt();
			
			if(t <= time ){
				if(c < c_min){
					c_min = c;
				}
			}
			
		}
		
		if(c_min >= 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(c_min);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int time = sc.nextInt(); time sc.nextInt() sc.nextInt sc int c_min = 1001; c_min 1001 for(int i = 0 ; i < n ; i++) {
			
			int c = sc.nextInt();
			int t = sc.nextInt();
			
			if(t <= time ){
				if(c < c_min){
					c_min = 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(t <= time ){
				if(c < c_min){
					c_min = c;
				}
			}
			
		} {
			
			int c = sc.nextInt();
			int t = sc.nextInt();
			
			if(t <= time ){
				if(c < c_min){
					c_min = c;
				}
			}
			
		} int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int t = sc.nextInt(); t sc.nextInt() sc.nextInt sc if(t <= time ){
				if(c < c_min){
					c_min = c;
				}
			} t <= time t time {
				if(c < c_min){
					c_min = c;
				}
			} if(c < c_min){
					c_min = c;
				} c < c_min c c_min {
					c_min = c;
				} c_min = c c_min c if(c_min >= 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(c_min);
		} c_min >= 1001 c_min 1001 {
			System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(c_min);
		} System.out.println(c_min) System.out.println System.out System System.out c_min String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int time = sc.nextInt();
		
		int c_min = 1001;
		
		for(int i = 0 ; i < n ; i++) {
			
			int c = sc.nextInt();
			int t = sc.nextInt();
			
			if(t <= time ){
				if(c < c_min){
					c_min = c;
				}
			}
			
		}
		
		if(c_min >= 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(c_min);
		}
	}
}
