import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int T = sc.nextInt();

        int[] costArr = new int[N];
        int[] timeArr = new int[N];
        for (int i = 0; i < N; i++) {
            costArr[i] = sc.nextInt();
            timeArr[i] = sc.nextInt();
        }

        int minCost = Integer.MAX_VALUE;

        for (int i = 0; i < N; i++) {
            if (timeArr[i] <= T) {
                minCost = Math.min(minCost, costArr[i]);
            }
        }

        if (minCost > 1000) {
            System.out.println("TLE");
        } else {
            System.out.println(minCost);
        }


        sc.close();
    }
} import java.util.Scanner; Scanner 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[] costArr = new int[N];
        int[] timeArr = new int[N];
        for (int i = 0; i < N; i++) {
            costArr[i] = sc.nextInt();
            timeArr[i] = sc.nextInt();
        }

        int minCost = Integer.MAX_VALUE;

        for (int i = 0; i < N; i++) {
            if (timeArr[i] <= T) {
                minCost = Math.min(minCost, costArr[i]);
            }
        }

        if (minCost > 1000) {
            System.out.println("TLE");
        } else {
            System.out.println(minCost);
        }


        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int T = sc.nextInt();

        int[] costArr = new int[N];
        int[] timeArr = new int[N];
        for (int i = 0; i < N; i++) {
            costArr[i] = sc.nextInt();
            timeArr[i] = sc.nextInt();
        }

        int minCost = Integer.MAX_VALUE;

        for (int i = 0; i < N; i++) {
            if (timeArr[i] <= T) {
                minCost = Math.min(minCost, costArr[i]);
            }
        }

        if (minCost > 1000) {
            System.out.println("TLE");
        } else {
            System.out.println(minCost);
        }


        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int T = sc.nextInt();

        int[] costArr = new int[N];
        int[] timeArr = new int[N];
        for (int i = 0; i < N; i++) {
            costArr[i] = sc.nextInt();
            timeArr[i] = sc.nextInt();
        }

        int minCost = Integer.MAX_VALUE;

        for (int i = 0; i < N; i++) {
            if (timeArr[i] <= T) {
                minCost = Math.min(minCost, costArr[i]);
            }
        }

        if (minCost > 1000) {
            System.out.println("TLE");
        } else {
            System.out.println(minCost);
        }


        sc.close();
    } 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[] costArr = new int[N]; costArr new int[N] N int[] timeArr = new int[N]; timeArr new int[N] N for (int i = 0; i < N; i++) {
            costArr[i] = sc.nextInt();
            timeArr[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            costArr[i] = sc.nextInt();
            timeArr[i] = sc.nextInt();
        } {
            costArr[i] = sc.nextInt();
            timeArr[i] = sc.nextInt();
        } costArr[i] = sc.nextInt() costArr[i] costArr i sc.nextInt() sc.nextInt sc timeArr[i] = sc.nextInt() timeArr[i] timeArr i sc.nextInt() sc.nextInt sc int minCost = Integer.MAX_VALUE; minCost Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0; i < N; i++) {
            if (timeArr[i] <= T) {
                minCost = Math.min(minCost, costArr[i]);
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if (timeArr[i] <= T) {
                minCost = Math.min(minCost, costArr[i]);
            }
        } {
            if (timeArr[i] <= T) {
                minCost = Math.min(minCost, costArr[i]);
            }
        } if (timeArr[i] <= T) {
                minCost = Math.min(minCost, costArr[i]);
            } timeArr[i] <= T timeArr[i] timeArr i T {
                minCost = Math.min(minCost, costArr[i]);
            } minCost = Math.min(minCost, costArr[i]) minCost Math.min(minCost, costArr[i]) Math.min Math minCost costArr[i] costArr i if (minCost > 1000) {
            System.out.println("TLE");
        } else {
            System.out.println(minCost);
        } minCost > 1000 minCost 1000 {
            System.out.println("TLE");
        } System.out.println("TLE") System.out.println System.out System System.out "TLE" {
            System.out.println(minCost);
        } System.out.println(minCost) System.out.println System.out System System.out minCost sc.close() sc.close sc 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[] costArr = new int[N];
        int[] timeArr = new int[N];
        for (int i = 0; i < N; i++) {
            costArr[i] = sc.nextInt();
            timeArr[i] = sc.nextInt();
        }

        int minCost = Integer.MAX_VALUE;

        for (int i = 0; i < N; i++) {
            if (timeArr[i] <= T) {
                minCost = Math.min(minCost, costArr[i]);
            }
        }

        if (minCost > 1000) {
            System.out.println("TLE");
        } else {
            System.out.println(minCost);
        }


        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int T = sc.nextInt();

        int[] costArr = new int[N];
        int[] timeArr = new int[N];
        for (int i = 0; i < N; i++) {
            costArr[i] = sc.nextInt();
            timeArr[i] = sc.nextInt();
        }

        int minCost = Integer.MAX_VALUE;

        for (int i = 0; i < N; i++) {
            if (timeArr[i] <= T) {
                minCost = Math.min(minCost, costArr[i]);
            }
        }

        if (minCost > 1000) {
            System.out.println("TLE");
        } else {
            System.out.println(minCost);
        }


        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int T = sc.nextInt();

        int[] costArr = new int[N];
        int[] timeArr = new int[N];
        for (int i = 0; i < N; i++) {
            costArr[i] = sc.nextInt();
            timeArr[i] = sc.nextInt();
        }

        int minCost = Integer.MAX_VALUE;

        for (int i = 0; i < N; i++) {
            if (timeArr[i] <= T) {
                minCost = Math.min(minCost, costArr[i]);
            }
        }

        if (minCost > 1000) {
            System.out.println("TLE");
        } else {
            System.out.println(minCost);
        }


        sc.close();
    }
}