import java.util.*;

class Main{
	static Scanner scan = new Scanner(System.in);
	static void programmingEducation(){
		int age = scan.nextInt();
		if(age == 1){
			System.out.println("Hello World");
		}
		else{
			int a = scan.nextInt(), b = scan.nextInt();
			System.out.println(a+b);
		}
		
	}
	
	static void timeLimit(){
		int n = scan.nextInt(), t = scan.nextInt();
		ArrayList<Integer> costs = new ArrayList<>();
		for(int i=0;i<n;i++){
			int input = scan.nextInt(), time = scan.nextInt();
			if(time<=t)
				costs.add(input);
		}
		Collections.sort(costs);
		if(costs.isEmpty())
			System.out.println("TLE");
		else{
			int cost = costs.get(0);
			System.out.println(cost);
		}
	}
	
	public static void main(String[] argv){
		//programmingEducation();
		timeLimit();
	}
	
} import java.util.*; util.* java class Main{
	static Scanner scan = new Scanner(System.in);
	static void programmingEducation(){
		int age = scan.nextInt();
		if(age == 1){
			System.out.println("Hello World");
		}
		else{
			int a = scan.nextInt(), b = scan.nextInt();
			System.out.println(a+b);
		}
		
	}
	
	static void timeLimit(){
		int n = scan.nextInt(), t = scan.nextInt();
		ArrayList<Integer> costs = new ArrayList<>();
		for(int i=0;i<n;i++){
			int input = scan.nextInt(), time = scan.nextInt();
			if(time<=t)
				costs.add(input);
		}
		Collections.sort(costs);
		if(costs.isEmpty())
			System.out.println("TLE");
		else{
			int cost = costs.get(0);
			System.out.println(cost);
		}
	}
	
	public static void main(String[] argv){
		//programmingEducation();
		timeLimit();
	}
	
} Main static Scanner scan = new Scanner(System.in); scan new Scanner(System.in) static void programmingEducation(){
		int age = scan.nextInt();
		if(age == 1){
			System.out.println("Hello World");
		}
		else{
			int a = scan.nextInt(), b = scan.nextInt();
			System.out.println(a+b);
		}
		
	} programmingEducation {
		int age = scan.nextInt();
		if(age == 1){
			System.out.println("Hello World");
		}
		else{
			int a = scan.nextInt(), b = scan.nextInt();
			System.out.println(a+b);
		}
		
	} int age = scan.nextInt(); age scan.nextInt() scan.nextInt scan if(age == 1){
			System.out.println("Hello World");
		}
		else{
			int a = scan.nextInt(), b = scan.nextInt();
			System.out.println(a+b);
		} age == 1 age 1 {
			System.out.println("Hello World");
		} System.out.println("Hello World") System.out.println System.out System System.out "Hello World" {
			int a = scan.nextInt(), b = scan.nextInt();
			System.out.println(a+b);
		} int a = scan.nextInt() a scan.nextInt() scan.nextInt scan b = scan.nextInt(); b scan.nextInt() scan.nextInt scan System.out.println(a+b) System.out.println System.out System System.out a+b a b static void timeLimit(){
		int n = scan.nextInt(), t = scan.nextInt();
		ArrayList<Integer> costs = new ArrayList<>();
		for(int i=0;i<n;i++){
			int input = scan.nextInt(), time = scan.nextInt();
			if(time<=t)
				costs.add(input);
		}
		Collections.sort(costs);
		if(costs.isEmpty())
			System.out.println("TLE");
		else{
			int cost = costs.get(0);
			System.out.println(cost);
		}
	} timeLimit {
		int n = scan.nextInt(), t = scan.nextInt();
		ArrayList<Integer> costs = new ArrayList<>();
		for(int i=0;i<n;i++){
			int input = scan.nextInt(), time = scan.nextInt();
			if(time<=t)
				costs.add(input);
		}
		Collections.sort(costs);
		if(costs.isEmpty())
			System.out.println("TLE");
		else{
			int cost = costs.get(0);
			System.out.println(cost);
		}
	} int n = scan.nextInt() n scan.nextInt() scan.nextInt scan t = scan.nextInt(); t scan.nextInt() scan.nextInt scan ArrayList<Integer> costs = new ArrayList<>(); costs new ArrayList<>() for(int i=0;i<n;i++){
			int input = scan.nextInt(), time = scan.nextInt();
			if(time<=t)
				costs.add(input);
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int input = scan.nextInt(), time = scan.nextInt();
			if(time<=t)
				costs.add(input);
		} {
			int input = scan.nextInt(), time = scan.nextInt();
			if(time<=t)
				costs.add(input);
		} int input = scan.nextInt() input scan.nextInt() scan.nextInt scan time = scan.nextInt(); time scan.nextInt() scan.nextInt scan if(time<=t)
				costs.add(input); time<=t time t costs.add(input) costs.add costs input Collections.sort(costs) Collections.sort Collections costs if(costs.isEmpty())
			System.out.println("TLE");
		else{
			int cost = costs.get(0);
			System.out.println(cost);
		} costs.isEmpty() costs.isEmpty costs System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			int cost = costs.get(0);
			System.out.println(cost);
		} int cost = costs.get(0); cost costs.get(0) costs.get costs 0 System.out.println(cost) System.out.println System.out System System.out cost public static void main(String[] argv){
		//programmingEducation();
		timeLimit();
	} main {
		//programmingEducation();
		timeLimit();
	} timeLimit() timeLimit String[] argv argv
import java.util.*;

class Main{
	static Scanner scan = new Scanner(System.in);
	static void programmingEducation(){
		int age = scan.nextInt();
		if(age == 1){
			System.out.println("Hello World");
		}
		else{
			int a = scan.nextInt(), b = scan.nextInt();
			System.out.println(a+b);
		}
		
	}
	
	static void timeLimit(){
		int n = scan.nextInt(), t = scan.nextInt();
		ArrayList<Integer> costs = new ArrayList<>();
		for(int i=0;i<n;i++){
			int input = scan.nextInt(), time = scan.nextInt();
			if(time<=t)
				costs.add(input);
		}
		Collections.sort(costs);
		if(costs.isEmpty())
			System.out.println("TLE");
		else{
			int cost = costs.get(0);
			System.out.println(cost);
		}
	}
	
	public static void main(String[] argv){
		//programmingEducation();
		timeLimit();
	}
	
}