import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int T = Integer.parseInt(in.next());
            int ct[][] = new int[N][2];
            for (int i = 0; i < N; i++) {
                ct[i][0] = Integer.parseInt(in.next());
                ct[i][1] = Integer.parseInt(in.next());
            }
            int ans = Integer.MAX_VALUE;
            int tle = 0;

            for (int i = 0; i < N; i++) {
                if (ct[i][1] <= T) {
                    ans = Math.min(ans, ct[i][0]);
                } else {
                    tle++;
                }
            }

            // 出力
            out.println(tle == N ? "TLE" : ans);

        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int T = Integer.parseInt(in.next());
            int ct[][] = new int[N][2];
            for (int i = 0; i < N; i++) {
                ct[i][0] = Integer.parseInt(in.next());
                ct[i][1] = Integer.parseInt(in.next());
            }
            int ans = Integer.MAX_VALUE;
            int tle = 0;

            for (int i = 0; i < N; i++) {
                if (ct[i][1] <= T) {
                    ans = Math.min(ans, ct[i][0]);
                } else {
                    tle++;
                }
            }

            // 出力
            out.println(tle == N ? "TLE" : ans);

        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) B solver = new B(); solver new B() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int T = Integer.parseInt(in.next());
            int ct[][] = new int[N][2];
            for (int i = 0; i < N; i++) {
                ct[i][0] = Integer.parseInt(in.next());
                ct[i][1] = Integer.parseInt(in.next());
            }
            int ans = Integer.MAX_VALUE;
            int tle = 0;

            for (int i = 0; i < N; i++) {
                if (ct[i][1] <= T) {
                    ans = Math.min(ans, ct[i][0]);
                } else {
                    tle++;
                }
            }

            // 出力
            out.println(tle == N ? "TLE" : ans);

        }

    } B public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int T = Integer.parseInt(in.next());
            int ct[][] = new int[N][2];
            for (int i = 0; i < N; i++) {
                ct[i][0] = Integer.parseInt(in.next());
                ct[i][1] = Integer.parseInt(in.next());
            }
            int ans = Integer.MAX_VALUE;
            int tle = 0;

            for (int i = 0; i < N; i++) {
                if (ct[i][1] <= T) {
                    ans = Math.min(ans, ct[i][0]);
                } else {
                    tle++;
                }
            }

            // 出力
            out.println(tle == N ? "TLE" : ans);

        } solve {
            // 入力
            int N = Integer.parseInt(in.next());
            int T = Integer.parseInt(in.next());
            int ct[][] = new int[N][2];
            for (int i = 0; i < N; i++) {
                ct[i][0] = Integer.parseInt(in.next());
                ct[i][1] = Integer.parseInt(in.next());
            }
            int ans = Integer.MAX_VALUE;
            int tle = 0;

            for (int i = 0; i < N; i++) {
                if (ct[i][1] <= T) {
                    ans = Math.min(ans, ct[i][0]);
                } else {
                    tle++;
                }
            }

            // 出力
            out.println(tle == N ? "TLE" : ans);

        } int N = Integer.parseInt(in.next()); N Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int T = Integer.parseInt(in.next()); T Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int ct[][] = new int[N][2]; ct new int[N][2] N 2 for (int i = 0; i < N; i++) {
                ct[i][0] = Integer.parseInt(in.next());
                ct[i][1] = Integer.parseInt(in.next());
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                ct[i][0] = Integer.parseInt(in.next());
                ct[i][1] = Integer.parseInt(in.next());
            } {
                ct[i][0] = Integer.parseInt(in.next());
                ct[i][1] = Integer.parseInt(in.next());
            } ct[i][0] = Integer.parseInt(in.next()) ct[i][0] ct[i] ct i 0 Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in ct[i][1] = Integer.parseInt(in.next()) ct[i][1] ct[i] ct i 1 Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int ans = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE int tle = 0; tle 0 for (int i = 0; i < N; i++) {
                if (ct[i][1] <= T) {
                    ans = Math.min(ans, ct[i][0]);
                } else {
                    tle++;
                }
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                if (ct[i][1] <= T) {
                    ans = Math.min(ans, ct[i][0]);
                } else {
                    tle++;
                }
            } {
                if (ct[i][1] <= T) {
                    ans = Math.min(ans, ct[i][0]);
                } else {
                    tle++;
                }
            } if (ct[i][1] <= T) {
                    ans = Math.min(ans, ct[i][0]);
                } else {
                    tle++;
                } ct[i][1] <= T ct[i][1] ct[i] ct i 1 T {
                    ans = Math.min(ans, ct[i][0]);
                } ans = Math.min(ans, ct[i][0]) ans Math.min(ans, ct[i][0]) Math.min Math ans ct[i][0] ct[i] ct i 0 {
                    tle++;
                } tle++ tle out.println(tle == N ? "TLE" : ans) out.println out tle == N ? "TLE" : ans tle == N tle N "TLE" ans int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int T = Integer.parseInt(in.next());
            int ct[][] = new int[N][2];
            for (int i = 0; i < N; i++) {
                ct[i][0] = Integer.parseInt(in.next());
                ct[i][1] = Integer.parseInt(in.next());
            }
            int ans = Integer.MAX_VALUE;
            int tle = 0;

            for (int i = 0; i < N; i++) {
                if (ct[i][1] <= T) {
                    ans = Math.min(ans, ct[i][0]);
                } else {
                    tle++;
                }
            }

            // 出力
            out.println(tle == N ? "TLE" : ans);

        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int T = Integer.parseInt(in.next());
            int ct[][] = new int[N][2];
            for (int i = 0; i < N; i++) {
                ct[i][0] = Integer.parseInt(in.next());
                ct[i][1] = Integer.parseInt(in.next());
            }
            int ans = Integer.MAX_VALUE;
            int tle = 0;

            for (int i = 0; i < N; i++) {
                if (ct[i][1] <= T) {
                    ans = Math.min(ans, ct[i][0]);
                } else {
                    tle++;
                }
            }

            // 出力
            out.println(tle == N ? "TLE" : ans);

        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int T = Integer.parseInt(in.next());
            int ct[][] = new int[N][2];
            for (int i = 0; i < N; i++) {
                ct[i][0] = Integer.parseInt(in.next());
                ct[i][1] = Integer.parseInt(in.next());
            }
            int ans = Integer.MAX_VALUE;
            int tle = 0;

            for (int i = 0; i < N; i++) {
                if (ct[i][1] <= T) {
                    ans = Math.min(ans, ct[i][0]);
                } else {
                    tle++;
                }
            }

            // 出力
            out.println(tle == N ? "TLE" : ans);

        }

    }
}

