import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int timeLimit = sc.nextInt();
        int[][] input = new int[N][2];
        List<Integer> list = new ArrayList<>();

        for(int i = 0; i < N; i++){
            for(int j = 0; j < 2; j++){
                input[i][j] = sc.nextInt();
            }
        }
        for(int i = 0; i < N; i++) {
            if (input[i][1] <= timeLimit) {
                list.add(i);
            }
        }
        if (list.size() == 0){
            System.out.println("TLE");
        }else {
            int min = input[0][0];
            for (int k : list) {
                if (input[k][0] < min) {
                    min = input[k][0];
                }
            }

            System.out.println(min);
        }
    }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util 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 timeLimit = sc.nextInt();
        int[][] input = new int[N][2];
        List<Integer> list = new ArrayList<>();

        for(int i = 0; i < N; i++){
            for(int j = 0; j < 2; j++){
                input[i][j] = sc.nextInt();
            }
        }
        for(int i = 0; i < N; i++) {
            if (input[i][1] <= timeLimit) {
                list.add(i);
            }
        }
        if (list.size() == 0){
            System.out.println("TLE");
        }else {
            int min = input[0][0];
            for (int k : list) {
                if (input[k][0] < min) {
                    min = input[k][0];
                }
            }

            System.out.println(min);
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int timeLimit = sc.nextInt();
        int[][] input = new int[N][2];
        List<Integer> list = new ArrayList<>();

        for(int i = 0; i < N; i++){
            for(int j = 0; j < 2; j++){
                input[i][j] = sc.nextInt();
            }
        }
        for(int i = 0; i < N; i++) {
            if (input[i][1] <= timeLimit) {
                list.add(i);
            }
        }
        if (list.size() == 0){
            System.out.println("TLE");
        }else {
            int min = input[0][0];
            for (int k : list) {
                if (input[k][0] < min) {
                    min = input[k][0];
                }
            }

            System.out.println(min);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int timeLimit = sc.nextInt();
        int[][] input = new int[N][2];
        List<Integer> list = new ArrayList<>();

        for(int i = 0; i < N; i++){
            for(int j = 0; j < 2; j++){
                input[i][j] = sc.nextInt();
            }
        }
        for(int i = 0; i < N; i++) {
            if (input[i][1] <= timeLimit) {
                list.add(i);
            }
        }
        if (list.size() == 0){
            System.out.println("TLE");
        }else {
            int min = input[0][0];
            for (int k : list) {
                if (input[k][0] < min) {
                    min = input[k][0];
                }
            }

            System.out.println(min);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int timeLimit = sc.nextInt(); timeLimit sc.nextInt() sc.nextInt sc int[][] input = new int[N][2]; input new int[N][2] N 2 List<Integer> list = new ArrayList<>(); list new ArrayList<>() for(int i = 0; i < N; i++){
            for(int j = 0; j < 2; j++){
                input[i][j] = sc.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            for(int j = 0; j < 2; j++){
                input[i][j] = sc.nextInt();
            }
        } {
            for(int j = 0; j < 2; j++){
                input[i][j] = sc.nextInt();
            }
        } for(int j = 0; j < 2; j++){
                input[i][j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < 2 j 2 j++ j++ j {
                input[i][j] = sc.nextInt();
            } {
                input[i][j] = sc.nextInt();
            } input[i][j] = sc.nextInt() input[i][j] input[i] input i j sc.nextInt() sc.nextInt sc for(int i = 0; i < N; i++) {
            if (input[i][1] <= timeLimit) {
                list.add(i);
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if (input[i][1] <= timeLimit) {
                list.add(i);
            }
        } {
            if (input[i][1] <= timeLimit) {
                list.add(i);
            }
        } if (input[i][1] <= timeLimit) {
                list.add(i);
            } input[i][1] <= timeLimit input[i][1] input[i] input i 1 timeLimit {
                list.add(i);
            } list.add(i) list.add list i if (list.size() == 0){
            System.out.println("TLE");
        }else {
            int min = input[0][0];
            for (int k : list) {
                if (input[k][0] < min) {
                    min = input[k][0];
                }
            }

            System.out.println(min);
        } list.size() == 0 list.size() list.size list 0 {
            System.out.println("TLE");
        } System.out.println("TLE") System.out.println System.out System System.out "TLE" {
            int min = input[0][0];
            for (int k : list) {
                if (input[k][0] < min) {
                    min = input[k][0];
                }
            }

            System.out.println(min);
        } int min = input[0][0]; min input[0][0] input[0] input 0 0 for (int k : list) {
                if (input[k][0] < min) {
                    min = input[k][0];
                }
            } int k list {
                if (input[k][0] < min) {
                    min = input[k][0];
                }
            } {
                if (input[k][0] < min) {
                    min = input[k][0];
                }
            } if (input[k][0] < min) {
                    min = input[k][0];
                } input[k][0] < min input[k][0] input[k] input k 0 min {
                    min = input[k][0];
                } min = input[k][0] min input[k][0] input[k] input k 0 System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int timeLimit = sc.nextInt();
        int[][] input = new int[N][2];
        List<Integer> list = new ArrayList<>();

        for(int i = 0; i < N; i++){
            for(int j = 0; j < 2; j++){
                input[i][j] = sc.nextInt();
            }
        }
        for(int i = 0; i < N; i++) {
            if (input[i][1] <= timeLimit) {
                list.add(i);
            }
        }
        if (list.size() == 0){
            System.out.println("TLE");
        }else {
            int min = input[0][0];
            for (int k : list) {
                if (input[k][0] < min) {
                    min = input[k][0];
                }
            }

            System.out.println(min);
        }
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int timeLimit = sc.nextInt();
        int[][] input = new int[N][2];
        List<Integer> list = new ArrayList<>();

        for(int i = 0; i < N; i++){
            for(int j = 0; j < 2; j++){
                input[i][j] = sc.nextInt();
            }
        }
        for(int i = 0; i < N; i++) {
            if (input[i][1] <= timeLimit) {
                list.add(i);
            }
        }
        if (list.size() == 0){
            System.out.println("TLE");
        }else {
            int min = input[0][0];
            for (int k : list) {
                if (input[k][0] < min) {
                    min = input[k][0];
                }
            }

            System.out.println(min);
        }
    }
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int timeLimit = sc.nextInt();
        int[][] input = new int[N][2];
        List<Integer> list = new ArrayList<>();

        for(int i = 0; i < N; i++){
            for(int j = 0; j < 2; j++){
                input[i][j] = sc.nextInt();
            }
        }
        for(int i = 0; i < N; i++) {
            if (input[i][1] <= timeLimit) {
                list.add(i);
            }
        }
        if (list.size() == 0){
            System.out.println("TLE");
        }else {
            int min = input[0][0];
            for (int k : list) {
                if (input[k][0] < min) {
                    min = input[k][0];
                }
            }

            System.out.println(min);
        }
    }
}