import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int T = Integer.parseInt(sc.next());
        int[] c = new int[N];
        int[] t = new int[N];
        int min = 1001;
        for(int i=0; i<N; i++) {
            c[i] = Integer.parseInt(sc.next());
            t[i] = Integer.parseInt(sc.next());
            if(T < t[i]) continue;
            if(min > c[i]) min = c[i];
        }
        if(min == 1001) 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 = Integer.parseInt(sc.next());
        int T = Integer.parseInt(sc.next());
        int[] c = new int[N];
        int[] t = new int[N];
        int min = 1001;
        for(int i=0; i<N; i++) {
            c[i] = Integer.parseInt(sc.next());
            t[i] = Integer.parseInt(sc.next());
            if(T < t[i]) continue;
            if(min > c[i]) min = c[i];
        }
        if(min == 1001) System.out.println("TLE");
        else System.out.println(min);
    }
    
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int T = Integer.parseInt(sc.next());
        int[] c = new int[N];
        int[] t = new int[N];
        int min = 1001;
        for(int i=0; i<N; i++) {
            c[i] = Integer.parseInt(sc.next());
            t[i] = Integer.parseInt(sc.next());
            if(T < t[i]) continue;
            if(min > c[i]) min = c[i];
        }
        if(min == 1001) System.out.println("TLE");
        else System.out.println(min);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int T = Integer.parseInt(sc.next());
        int[] c = new int[N];
        int[] t = new int[N];
        int min = 1001;
        for(int i=0; i<N; i++) {
            c[i] = Integer.parseInt(sc.next());
            t[i] = Integer.parseInt(sc.next());
            if(T < t[i]) continue;
            if(min > c[i]) min = c[i];
        }
        if(min == 1001) System.out.println("TLE");
        else System.out.println(min);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int T = Integer.parseInt(sc.next()); T Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] c = new int[N]; c new int[N] N int[] t = new int[N]; t new int[N] N int min = 1001; min 1001 for(int i=0; i<N; i++) {
            c[i] = Integer.parseInt(sc.next());
            t[i] = Integer.parseInt(sc.next());
            if(T < t[i]) continue;
            if(min > c[i]) min = c[i];
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            c[i] = Integer.parseInt(sc.next());
            t[i] = Integer.parseInt(sc.next());
            if(T < t[i]) continue;
            if(min > c[i]) min = c[i];
        } {
            c[i] = Integer.parseInt(sc.next());
            t[i] = Integer.parseInt(sc.next());
            if(T < t[i]) continue;
            if(min > c[i]) min = c[i];
        } c[i] = Integer.parseInt(sc.next()) c[i] c i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc t[i] = Integer.parseInt(sc.next()) t[i] t i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(T < t[i]) continue; T < t[i] T t[i] t i continue; if(min > c[i]) min = c[i]; min > c[i] min c[i] c i min = c[i] min c[i] c i if(min == 1001) System.out.println("TLE");
        else System.out.println(min); min == 1001 min 1001 System.out.println("TLE") System.out.println System.out System System.out "TLE" 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 = Integer.parseInt(sc.next());
        int T = Integer.parseInt(sc.next());
        int[] c = new int[N];
        int[] t = new int[N];
        int min = 1001;
        for(int i=0; i<N; i++) {
            c[i] = Integer.parseInt(sc.next());
            t[i] = Integer.parseInt(sc.next());
            if(T < t[i]) continue;
            if(min > c[i]) min = c[i];
        }
        if(min == 1001) 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 = Integer.parseInt(sc.next());
        int T = Integer.parseInt(sc.next());
        int[] c = new int[N];
        int[] t = new int[N];
        int min = 1001;
        for(int i=0; i<N; i++) {
            c[i] = Integer.parseInt(sc.next());
            t[i] = Integer.parseInt(sc.next());
            if(T < t[i]) continue;
            if(min > c[i]) min = c[i];
        }
        if(min == 1001) 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 = Integer.parseInt(sc.next());
        int T = Integer.parseInt(sc.next());
        int[] c = new int[N];
        int[] t = new int[N];
        int min = 1001;
        for(int i=0; i<N; i++) {
            c[i] = Integer.parseInt(sc.next());
            t[i] = Integer.parseInt(sc.next());
            if(T < t[i]) continue;
            if(min > c[i]) min = c[i];
        }
        if(min == 1001) System.out.println("TLE");
        else System.out.println(min);
    }
    
}