import java.util.Scanner;

class Main {
    public static void main(String[] arg){
        Scanner sc =new Scanner(System.in);
        int n=sc.nextInt(),t=sc.nextInt();
        int cost=10000;
        for(int i=0;i<n;i++){
            int ci=sc.nextInt(),ti=sc.nextInt();
            if(ti<=t && ci<cost)cost=ci;
        }
        System.out.println(cost==10000?"TLE":cost);
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] arg){
        Scanner sc =new Scanner(System.in);
        int n=sc.nextInt(),t=sc.nextInt();
        int cost=10000;
        for(int i=0;i<n;i++){
            int ci=sc.nextInt(),ti=sc.nextInt();
            if(ti<=t && ci<cost)cost=ci;
        }
        System.out.println(cost==10000?"TLE":cost);
    }
} Main public static void main(String[] arg){
        Scanner sc =new Scanner(System.in);
        int n=sc.nextInt(),t=sc.nextInt();
        int cost=10000;
        for(int i=0;i<n;i++){
            int ci=sc.nextInt(),ti=sc.nextInt();
            if(ti<=t && ci<cost)cost=ci;
        }
        System.out.println(cost==10000?"TLE":cost);
    } main {
        Scanner sc =new Scanner(System.in);
        int n=sc.nextInt(),t=sc.nextInt();
        int cost=10000;
        for(int i=0;i<n;i++){
            int ci=sc.nextInt(),ti=sc.nextInt();
            if(ti<=t && ci<cost)cost=ci;
        }
        System.out.println(cost==10000?"TLE":cost);
    } Scanner sc =new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt() n sc.nextInt() sc.nextInt sc t=sc.nextInt(); t sc.nextInt() sc.nextInt sc int cost=10000; cost 10000 for(int i=0;i<n;i++){
            int ci=sc.nextInt(),ti=sc.nextInt();
            if(ti<=t && ci<cost)cost=ci;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            int ci=sc.nextInt(),ti=sc.nextInt();
            if(ti<=t && ci<cost)cost=ci;
        } {
            int ci=sc.nextInt(),ti=sc.nextInt();
            if(ti<=t && ci<cost)cost=ci;
        } int ci=sc.nextInt() ci sc.nextInt() sc.nextInt sc ti=sc.nextInt(); ti sc.nextInt() sc.nextInt sc if(ti<=t && ci<cost)cost=ci; ti<=t && ci<cost ti<=t ti t ci<cost ci cost cost=ci cost ci System.out.println(cost==10000?"TLE":cost) System.out.println System.out System System.out cost==10000?"TLE":cost cost==10000 cost 10000 "TLE" cost String[] arg arg
import java.util.Scanner;

class Main {
    public static void main(String[] arg){
        Scanner sc =new Scanner(System.in);
        int n=sc.nextInt(),t=sc.nextInt();
        int cost=10000;
        for(int i=0;i<n;i++){
            int ci=sc.nextInt(),ti=sc.nextInt();
            if(ti<=t && ci<cost)cost=ci;
        }
        System.out.println(cost==10000?"TLE":cost);
    }
}