import 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];
        int min = 1001;
        for (int i = 0; i < n; i++) {
            cost[i] = sc.nextInt();
            time[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                if (min > cost[i])
                    min = cost[i];
            }
        }
        if (min != 1001)
            System.out.println(min);
        else
            System.out.println("TLE");
    }
} import java.util.*; util.* java 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];
        int min = 1001;
        for (int i = 0; i < n; i++) {
            cost[i] = sc.nextInt();
            time[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                if (min > cost[i])
                    min = cost[i];
            }
        }
        if (min != 1001)
            System.out.println(min);
        else
            System.out.println("TLE");
    }
} 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];
        int min = 1001;
        for (int i = 0; i < n; i++) {
            cost[i] = sc.nextInt();
            time[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                if (min > cost[i])
                    min = cost[i];
            }
        }
        if (min != 1001)
            System.out.println(min);
        else
            System.out.println("TLE");
    } 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];
        int min = 1001;
        for (int i = 0; i < n; i++) {
            cost[i] = sc.nextInt();
            time[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                if (min > cost[i])
                    min = cost[i];
            }
        }
        if (min != 1001)
            System.out.println(min);
        else
            System.out.println("TLE");
    } 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 int min = 1001; min 1001 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 for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                if (min > cost[i])
                    min = cost[i];
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (time[i] <= t) {
                if (min > cost[i])
                    min = cost[i];
            }
        } {
            if (time[i] <= t) {
                if (min > cost[i])
                    min = cost[i];
            }
        } if (time[i] <= t) {
                if (min > cost[i])
                    min = cost[i];
            } time[i] <= t time[i] time i t {
                if (min > cost[i])
                    min = cost[i];
            } if (min > cost[i])
                    min = cost[i]; min > cost[i] min cost[i] cost i min = cost[i] min cost[i] cost i if (min != 1001)
            System.out.println(min);
        else
            System.out.println("TLE"); min != 1001 min 1001 System.out.println(min) System.out.println System.out System System.out min System.out.println("TLE") System.out.println System.out System System.out "TLE" 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];
        int min = 1001;
        for (int i = 0; i < n; i++) {
            cost[i] = sc.nextInt();
            time[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                if (min > cost[i])
                    min = cost[i];
            }
        }
        if (min != 1001)
            System.out.println(min);
        else
            System.out.println("TLE");
    }
} 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];
        int min = 1001;
        for (int i = 0; i < n; i++) {
            cost[i] = sc.nextInt();
            time[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                if (min > cost[i])
                    min = cost[i];
            }
        }
        if (min != 1001)
            System.out.println(min);
        else
            System.out.println("TLE");
    }
} Main
import 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];
        int min = 1001;
        for (int i = 0; i < n; i++) {
            cost[i] = sc.nextInt();
            time[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                if (min > cost[i])
                    min = cost[i];
            }
        }
        if (min != 1001)
            System.out.println(min);
        else
            System.out.println("TLE");
    }
}