import java.util.*;
import java.util.ArrayList;
import java.util.Collections;

public 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();
        }
        int mincos = 1001;
        for(int i = 0; i < n; i++){
            if(time[i] <= t && cost[i] < mincos){
                mincos = cost[i];
            }
        }
        if(mincos == 1001){
            System.out.print("TLE");
        } else {
            System.out.print(mincos);
        }
    }
} import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util public 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();
        }
        int mincos = 1001;
        for(int i = 0; i < n; i++){
            if(time[i] <= t && cost[i] < mincos){
                mincos = cost[i];
            }
        }
        if(mincos == 1001){
            System.out.print("TLE");
        } else {
            System.out.print(mincos);
        }
    }
} 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();
        }
        int mincos = 1001;
        for(int i = 0; i < n; i++){
            if(time[i] <= t && cost[i] < mincos){
                mincos = cost[i];
            }
        }
        if(mincos == 1001){
            System.out.print("TLE");
        } else {
            System.out.print(mincos);
        }
    } 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();
        }
        int mincos = 1001;
        for(int i = 0; i < n; i++){
            if(time[i] <= t && cost[i] < mincos){
                mincos = cost[i];
            }
        }
        if(mincos == 1001){
            System.out.print("TLE");
        } else {
            System.out.print(mincos);
        }
    } 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();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            cost[i] = sc.nextInt();
            time[i] = sc.nextInt();
        } {
            cost[i] = sc.nextInt();
            time[i] = sc.nextInt();
        } 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 int mincos = 1001; mincos 1001 for(int i = 0; i < n; i++){
            if(time[i] <= t && cost[i] < mincos){
                mincos = cost[i];
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if(time[i] <= t && cost[i] < mincos){
                mincos = cost[i];
            }
        } {
            if(time[i] <= t && cost[i] < mincos){
                mincos = cost[i];
            }
        } if(time[i] <= t && cost[i] < mincos){
                mincos = cost[i];
            } time[i] <= t && cost[i] < mincos time[i] <= t time[i] time i t cost[i] < mincos cost[i] cost i mincos {
                mincos = cost[i];
            } mincos = cost[i] mincos cost[i] cost i if(mincos == 1001){
            System.out.print("TLE");
        } else {
            System.out.print(mincos);
        } mincos == 1001 mincos 1001 {
            System.out.print("TLE");
        } System.out.print("TLE") System.out.print System.out System System.out "TLE" {
            System.out.print(mincos);
        } System.out.print(mincos) System.out.print System.out System System.out mincos String[] args args public 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();
        }
        int mincos = 1001;
        for(int i = 0; i < n; i++){
            if(time[i] <= t && cost[i] < mincos){
                mincos = cost[i];
            }
        }
        if(mincos == 1001){
            System.out.print("TLE");
        } else {
            System.out.print(mincos);
        }
    }
} public 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();
        }
        int mincos = 1001;
        for(int i = 0; i < n; i++){
            if(time[i] <= t && cost[i] < mincos){
                mincos = cost[i];
            }
        }
        if(mincos == 1001){
            System.out.print("TLE");
        } else {
            System.out.print(mincos);
        }
    }
} Main
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;

public 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();
        }
        int mincos = 1001;
        for(int i = 0; i < n; i++){
            if(time[i] <= t && cost[i] < mincos){
                mincos = cost[i];
            }
        }
        if(mincos == 1001){
            System.out.print("TLE");
        } else {
            System.out.print(mincos);
        }
    }
}