import java.util.*;
class Main{
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N =	sc.nextInt();
	int T =	sc.nextInt();
	int[] cost = new int[N];
	int[] time = new int[N];
	for(int i = 0; i< N; i++) {
            cost[i] = sc.nextInt();
	    time[i] = sc.nextInt();
            if(time[i] > T) cost[i] = 1001;
	}
	int min	= 1001;
	for(int i = 0; i< N; i++) {
            if(cost[i] < min) min = cost[i];
	}
	if(min == 1001)	{
            System.out.println("TLE");
        }else {
            System.out.println(min);
	}

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

    }
}