import java.util.Scanner;

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());
        Integer[] cost = new Integer[n];
        Integer[] time = new Integer[n];
        for (int i = 0; i < n; i++) {
            cost[i] = Integer.parseInt(sc.next());
            time[i] = Integer.parseInt(sc.next());
        }

        int minCost = 1001;
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                minCost = Math.min(minCost, cost[i]);
            }
        }

        System.out.println(minCost > 1000 ? "TLE" : minCost);
    }
} import java.util.Scanner; Scanner 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());
        Integer[] cost = new Integer[n];
        Integer[] time = new Integer[n];
        for (int i = 0; i < n; i++) {
            cost[i] = Integer.parseInt(sc.next());
            time[i] = Integer.parseInt(sc.next());
        }

        int minCost = 1001;
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                minCost = Math.min(minCost, cost[i]);
            }
        }

        System.out.println(minCost > 1000 ? "TLE" : minCost);
    }
} 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());
        Integer[] cost = new Integer[n];
        Integer[] time = new Integer[n];
        for (int i = 0; i < n; i++) {
            cost[i] = Integer.parseInt(sc.next());
            time[i] = Integer.parseInt(sc.next());
        }

        int minCost = 1001;
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                minCost = Math.min(minCost, cost[i]);
            }
        }

        System.out.println(minCost > 1000 ? "TLE" : minCost);
    } main {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int t = Integer.parseInt(sc.next());
        Integer[] cost = new Integer[n];
        Integer[] time = new Integer[n];
        for (int i = 0; i < n; i++) {
            cost[i] = Integer.parseInt(sc.next());
            time[i] = Integer.parseInt(sc.next());
        }

        int minCost = 1001;
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                minCost = Math.min(minCost, cost[i]);
            }
        }

        System.out.println(minCost > 1000 ? "TLE" : minCost);
    } 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 Integer[] cost = new Integer[n]; cost new Integer[n] n Integer[] time = new Integer[n]; time new Integer[n] n for (int i = 0; i < n; i++) {
            cost[i] = Integer.parseInt(sc.next());
            time[i] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            cost[i] = Integer.parseInt(sc.next());
            time[i] = Integer.parseInt(sc.next());
        } {
            cost[i] = Integer.parseInt(sc.next());
            time[i] = Integer.parseInt(sc.next());
        } cost[i] = Integer.parseInt(sc.next()) cost[i] cost i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc time[i] = Integer.parseInt(sc.next()) time[i] time i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int minCost = 1001; minCost 1001 for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                minCost = Math.min(minCost, cost[i]);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (time[i] <= t) {
                minCost = Math.min(minCost, cost[i]);
            }
        } {
            if (time[i] <= t) {
                minCost = Math.min(minCost, cost[i]);
            }
        } if (time[i] <= t) {
                minCost = Math.min(minCost, cost[i]);
            } time[i] <= t time[i] time i t {
                minCost = Math.min(minCost, cost[i]);
            } minCost = Math.min(minCost, cost[i]) minCost Math.min(minCost, cost[i]) Math.min Math minCost cost[i] cost i System.out.println(minCost > 1000 ? "TLE" : minCost) System.out.println System.out System System.out minCost > 1000 ? "TLE" : minCost minCost > 1000 minCost 1000 "TLE" minCost 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());
        Integer[] cost = new Integer[n];
        Integer[] time = new Integer[n];
        for (int i = 0; i < n; i++) {
            cost[i] = Integer.parseInt(sc.next());
            time[i] = Integer.parseInt(sc.next());
        }

        int minCost = 1001;
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                minCost = Math.min(minCost, cost[i]);
            }
        }

        System.out.println(minCost > 1000 ? "TLE" : minCost);
    }
} 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());
        Integer[] cost = new Integer[n];
        Integer[] time = new Integer[n];
        for (int i = 0; i < n; i++) {
            cost[i] = Integer.parseInt(sc.next());
            time[i] = Integer.parseInt(sc.next());
        }

        int minCost = 1001;
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                minCost = Math.min(minCost, cost[i]);
            }
        }

        System.out.println(minCost > 1000 ? "TLE" : minCost);
    }
} Main
import java.util.Scanner;

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());
        Integer[] cost = new Integer[n];
        Integer[] time = new Integer[n];
        for (int i = 0; i < n; i++) {
            cost[i] = Integer.parseInt(sc.next());
            time[i] = Integer.parseInt(sc.next());
        }

        int minCost = 1001;
        for (int i = 0; i < n; i++) {
            if (time[i] <= t) {
                minCost = Math.min(minCost, cost[i]);
            }
        }

        System.out.println(minCost > 1000 ? "TLE" : minCost);
    }
}