import java.util.*;
import java.util.Scanner;

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

        int numRoutes = sc.nextInt();
        int timeLimit = sc.nextInt();

        int[] c = new int[numRoutes];
        int[] t = new int[numRoutes];

        for (int i = 0; i < numRoutes; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }

        int optimalRoute = -1;
        for (int i = 0; i < numRoutes; i++) {
            if (t[i] > timeLimit) {
                continue;
            }

            if (optimalRoute == -1) {
                optimalRoute = i;
                continue;
            }

            if (c[i] < c[optimalRoute]) {
                optimalRoute = i;
            }
        }

        if (optimalRoute == -1) {
            System.out.println("TLE");
        } else {
            System.out.println(c[optimalRoute]);
        }

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

        int numRoutes = sc.nextInt();
        int timeLimit = sc.nextInt();

        int[] c = new int[numRoutes];
        int[] t = new int[numRoutes];

        for (int i = 0; i < numRoutes; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }

        int optimalRoute = -1;
        for (int i = 0; i < numRoutes; i++) {
            if (t[i] > timeLimit) {
                continue;
            }

            if (optimalRoute == -1) {
                optimalRoute = i;
                continue;
            }

            if (c[i] < c[optimalRoute]) {
                optimalRoute = i;
            }
        }

        if (optimalRoute == -1) {
            System.out.println("TLE");
        } else {
            System.out.println(c[optimalRoute]);
        }

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

        int numRoutes = sc.nextInt();
        int timeLimit = sc.nextInt();

        int[] c = new int[numRoutes];
        int[] t = new int[numRoutes];

        for (int i = 0; i < numRoutes; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }

        int optimalRoute = -1;
        for (int i = 0; i < numRoutes; i++) {
            if (t[i] > timeLimit) {
                continue;
            }

            if (optimalRoute == -1) {
                optimalRoute = i;
                continue;
            }

            if (c[i] < c[optimalRoute]) {
                optimalRoute = i;
            }
        }

        if (optimalRoute == -1) {
            System.out.println("TLE");
        } else {
            System.out.println(c[optimalRoute]);
        }

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

        int numRoutes = sc.nextInt();
        int timeLimit = sc.nextInt();

        int[] c = new int[numRoutes];
        int[] t = new int[numRoutes];

        for (int i = 0; i < numRoutes; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }

        int optimalRoute = -1;
        for (int i = 0; i < numRoutes; i++) {
            if (t[i] > timeLimit) {
                continue;
            }

            if (optimalRoute == -1) {
                optimalRoute = i;
                continue;
            }

            if (c[i] < c[optimalRoute]) {
                optimalRoute = i;
            }
        }

        if (optimalRoute == -1) {
            System.out.println("TLE");
        } else {
            System.out.println(c[optimalRoute]);
        }

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int numRoutes = sc.nextInt(); numRoutes sc.nextInt() sc.nextInt sc int timeLimit = sc.nextInt(); timeLimit sc.nextInt() sc.nextInt sc int[] c = new int[numRoutes]; c new int[numRoutes] numRoutes int[] t = new int[numRoutes]; t new int[numRoutes] numRoutes for (int i = 0; i < numRoutes; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < numRoutes i numRoutes i++ i++ i {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        } {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        } c[i] = sc.nextInt() c[i] c i sc.nextInt() sc.nextInt sc t[i] = sc.nextInt() t[i] t i sc.nextInt() sc.nextInt sc int optimalRoute = -1; optimalRoute -1 1 for (int i = 0; i < numRoutes; i++) {
            if (t[i] > timeLimit) {
                continue;
            }

            if (optimalRoute == -1) {
                optimalRoute = i;
                continue;
            }

            if (c[i] < c[optimalRoute]) {
                optimalRoute = i;
            }
        } int i = 0; int i = 0; i 0 i < numRoutes i numRoutes i++ i++ i {
            if (t[i] > timeLimit) {
                continue;
            }

            if (optimalRoute == -1) {
                optimalRoute = i;
                continue;
            }

            if (c[i] < c[optimalRoute]) {
                optimalRoute = i;
            }
        } {
            if (t[i] > timeLimit) {
                continue;
            }

            if (optimalRoute == -1) {
                optimalRoute = i;
                continue;
            }

            if (c[i] < c[optimalRoute]) {
                optimalRoute = i;
            }
        } if (t[i] > timeLimit) {
                continue;
            } t[i] > timeLimit t[i] t i timeLimit {
                continue;
            } continue; if (optimalRoute == -1) {
                optimalRoute = i;
                continue;
            } optimalRoute == -1 optimalRoute -1 1 {
                optimalRoute = i;
                continue;
            } optimalRoute = i optimalRoute i continue; if (c[i] < c[optimalRoute]) {
                optimalRoute = i;
            } c[i] < c[optimalRoute] c[i] c i c[optimalRoute] c optimalRoute {
                optimalRoute = i;
            } optimalRoute = i optimalRoute i if (optimalRoute == -1) {
            System.out.println("TLE");
        } else {
            System.out.println(c[optimalRoute]);
        } optimalRoute == -1 optimalRoute -1 1 {
            System.out.println("TLE");
        } System.out.println("TLE") System.out.println System.out System System.out "TLE" {
            System.out.println(c[optimalRoute]);
        } System.out.println(c[optimalRoute]) System.out.println System.out System System.out c[optimalRoute] c optimalRoute String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int numRoutes = sc.nextInt();
        int timeLimit = sc.nextInt();

        int[] c = new int[numRoutes];
        int[] t = new int[numRoutes];

        for (int i = 0; i < numRoutes; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }

        int optimalRoute = -1;
        for (int i = 0; i < numRoutes; i++) {
            if (t[i] > timeLimit) {
                continue;
            }

            if (optimalRoute == -1) {
                optimalRoute = i;
                continue;
            }

            if (c[i] < c[optimalRoute]) {
                optimalRoute = i;
            }
        }

        if (optimalRoute == -1) {
            System.out.println("TLE");
        } else {
            System.out.println(c[optimalRoute]);
        }

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

        int numRoutes = sc.nextInt();
        int timeLimit = sc.nextInt();

        int[] c = new int[numRoutes];
        int[] t = new int[numRoutes];

        for (int i = 0; i < numRoutes; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }

        int optimalRoute = -1;
        for (int i = 0; i < numRoutes; i++) {
            if (t[i] > timeLimit) {
                continue;
            }

            if (optimalRoute == -1) {
                optimalRoute = i;
                continue;
            }

            if (c[i] < c[optimalRoute]) {
                optimalRoute = i;
            }
        }

        if (optimalRoute == -1) {
            System.out.println("TLE");
        } else {
            System.out.println(c[optimalRoute]);
        }

    }
} Main
import java.util.*;
import java.util.Scanner;

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

        int numRoutes = sc.nextInt();
        int timeLimit = sc.nextInt();

        int[] c = new int[numRoutes];
        int[] t = new int[numRoutes];

        for (int i = 0; i < numRoutes; i++) {
            c[i] = sc.nextInt();
            t[i] = sc.nextInt();
        }

        int optimalRoute = -1;
        for (int i = 0; i < numRoutes; i++) {
            if (t[i] > timeLimit) {
                continue;
            }

            if (optimalRoute == -1) {
                optimalRoute = i;
                continue;
            }

            if (c[i] < c[optimalRoute]) {
                optimalRoute = i;
            }
        }

        if (optimalRoute == -1) {
            System.out.println("TLE");
        } else {
            System.out.println(c[optimalRoute]);
        }

    }
}