import java.util.*;
import java.util.stream.Stream;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), max = sc.nextInt(), min_cost = 1001;
        int[] c = new int[n], t = new int[n];
        for(int i = 0; i < n; i++){
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        for(int j = 0; j < n; j++){
        	if(t[j] <= max)
        		min_cost = Math.min(min_cost, c[j]);
        }
        System.out.println(min_cost == 1001 ? "TLE" : min_cost);
    }
} import java.util.*; util.* java import java.util.stream.Stream; Stream java.util.stream public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), max = sc.nextInt(), min_cost = 1001;
        int[] c = new int[n], t = new int[n];
        for(int i = 0; i < n; i++){
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        for(int j = 0; j < n; j++){
        	if(t[j] <= max)
        		min_cost = Math.min(min_cost, c[j]);
        }
        System.out.println(min_cost == 1001 ? "TLE" : min_cost);
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), max = sc.nextInt(), min_cost = 1001;
        int[] c = new int[n], t = new int[n];
        for(int i = 0; i < n; i++){
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        for(int j = 0; j < n; j++){
        	if(t[j] <= max)
        		min_cost = Math.min(min_cost, c[j]);
        }
        System.out.println(min_cost == 1001 ? "TLE" : min_cost);
    } main {
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), max = sc.nextInt(), min_cost = 1001;
        int[] c = new int[n], t = new int[n];
        for(int i = 0; i < n; i++){
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        for(int j = 0; j < n; j++){
        	if(t[j] <= max)
        		min_cost = Math.min(min_cost, c[j]);
        }
        System.out.println(min_cost == 1001 ? "TLE" : min_cost);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt() n sc.nextInt() sc.nextInt sc max = sc.nextInt() max sc.nextInt() sc.nextInt sc min_cost = 1001; min_cost 1001 int[] c = new int[n] c new int[n] n t = new int[n]; t new int[n] n for(int i = 0; i < n; i++){
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        } {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        } c[i] = sc.nextInt() c[i] c i sc.nextInt() sc.nextInt sc t[i] = sc.nextInt() t[i] t i sc.nextInt() sc.nextInt sc for(int j = 0; j < n; j++){
        	if(t[j] <= max)
        		min_cost = Math.min(min_cost, c[j]);
        } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
        	if(t[j] <= max)
        		min_cost = Math.min(min_cost, c[j]);
        } {
        	if(t[j] <= max)
        		min_cost = Math.min(min_cost, c[j]);
        } if(t[j] <= max)
        		min_cost = Math.min(min_cost, c[j]); t[j] <= max t[j] t j max min_cost = Math.min(min_cost, c[j]) min_cost Math.min(min_cost, c[j]) Math.min Math min_cost c[j] c j System.out.println(min_cost == 1001 ? "TLE" : min_cost) System.out.println System.out System System.out min_cost == 1001 ? "TLE" : min_cost min_cost == 1001 min_cost 1001 "TLE" min_cost String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), max = sc.nextInt(), min_cost = 1001;
        int[] c = new int[n], t = new int[n];
        for(int i = 0; i < n; i++){
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        for(int j = 0; j < n; j++){
        	if(t[j] <= max)
        		min_cost = Math.min(min_cost, c[j]);
        }
        System.out.println(min_cost == 1001 ? "TLE" : min_cost);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), max = sc.nextInt(), min_cost = 1001;
        int[] c = new int[n], t = new int[n];
        for(int i = 0; i < n; i++){
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        for(int j = 0; j < n; j++){
        	if(t[j] <= max)
        		min_cost = Math.min(min_cost, c[j]);
        }
        System.out.println(min_cost == 1001 ? "TLE" : min_cost);
    }
} Main
import java.util.*;
import java.util.stream.Stream;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), max = sc.nextInt(), min_cost = 1001;
        int[] c = new int[n], t = new int[n];
        for(int i = 0; i < n; i++){
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }
        for(int j = 0; j < n; j++){
        	if(t[j] <= max)
        		min_cost = Math.min(min_cost, c[j]);
        }
        System.out.println(min_cost == 1001 ? "TLE" : min_cost);
    }
}