import 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 []hairetu1 = new int[N];
	int []hairetu2 = new int[N];
	for(int i=0;i<N;i++) {
		hairetu1[i]=sc.nextInt();
		hairetu2[i]=sc.nextInt();
	}
int count=0;
	for(int i=0;i<N;i++) {
	if(hairetu2[i]<=T){
		count++;
	}
		}
	if(count==0){
		System.out.println("TLE");
		System.exit(0);
	}
	
	int z=0;
	int []hairetu3 = new int[count];
	for(int i=0;i<N;i++) {
		if(hairetu2[i]<=T){
			hairetu3[z]=hairetu1[i];
			z++;
		}
	}
	int min = hairetu3[0];
	for(int i=0;i<count;i++){
		if(min>hairetu3[i]){
			min=hairetu3[i];
		}
	}
	System.out.println(min);
	}
	}
 import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	int T = sc.nextInt();
	int []hairetu1 = new int[N];
	int []hairetu2 = new int[N];
	for(int i=0;i<N;i++) {
		hairetu1[i]=sc.nextInt();
		hairetu2[i]=sc.nextInt();
	}
int count=0;
	for(int i=0;i<N;i++) {
	if(hairetu2[i]<=T){
		count++;
	}
		}
	if(count==0){
		System.out.println("TLE");
		System.exit(0);
	}
	
	int z=0;
	int []hairetu3 = new int[count];
	for(int i=0;i<N;i++) {
		if(hairetu2[i]<=T){
			hairetu3[z]=hairetu1[i];
			z++;
		}
	}
	int min = hairetu3[0];
	for(int i=0;i<count;i++){
		if(min>hairetu3[i]){
			min=hairetu3[i];
		}
	}
	System.out.println(min);
	}
	} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	int T = sc.nextInt();
	int []hairetu1 = new int[N];
	int []hairetu2 = new int[N];
	for(int i=0;i<N;i++) {
		hairetu1[i]=sc.nextInt();
		hairetu2[i]=sc.nextInt();
	}
int count=0;
	for(int i=0;i<N;i++) {
	if(hairetu2[i]<=T){
		count++;
	}
		}
	if(count==0){
		System.out.println("TLE");
		System.exit(0);
	}
	
	int z=0;
	int []hairetu3 = new int[count];
	for(int i=0;i<N;i++) {
		if(hairetu2[i]<=T){
			hairetu3[z]=hairetu1[i];
			z++;
		}
	}
	int min = hairetu3[0];
	for(int i=0;i<count;i++){
		if(min>hairetu3[i]){
			min=hairetu3[i];
		}
	}
	System.out.println(min);
	} main {
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	int T = sc.nextInt();
	int []hairetu1 = new int[N];
	int []hairetu2 = new int[N];
	for(int i=0;i<N;i++) {
		hairetu1[i]=sc.nextInt();
		hairetu2[i]=sc.nextInt();
	}
int count=0;
	for(int i=0;i<N;i++) {
	if(hairetu2[i]<=T){
		count++;
	}
		}
	if(count==0){
		System.out.println("TLE");
		System.exit(0);
	}
	
	int z=0;
	int []hairetu3 = new int[count];
	for(int i=0;i<N;i++) {
		if(hairetu2[i]<=T){
			hairetu3[z]=hairetu1[i];
			z++;
		}
	}
	int min = hairetu3[0];
	for(int i=0;i<count;i++){
		if(min>hairetu3[i]){
			min=hairetu3[i];
		}
	}
	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 T = sc.nextInt(); T sc.nextInt() sc.nextInt sc int []hairetu1 = new int[N]; hairetu1 new int[N] N int []hairetu2 = new int[N]; hairetu2 new int[N] N for(int i=0;i<N;i++) {
		hairetu1[i]=sc.nextInt();
		hairetu2[i]=sc.nextInt();
	} int i=0; int i=0; i 0 i<N i N i++ i++ i {
		hairetu1[i]=sc.nextInt();
		hairetu2[i]=sc.nextInt();
	} {
		hairetu1[i]=sc.nextInt();
		hairetu2[i]=sc.nextInt();
	} hairetu1[i]=sc.nextInt() hairetu1[i] hairetu1 i sc.nextInt() sc.nextInt sc hairetu2[i]=sc.nextInt() hairetu2[i] hairetu2 i sc.nextInt() sc.nextInt sc int count=0; count 0 for(int i=0;i<N;i++) {
	if(hairetu2[i]<=T){
		count++;
	}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
	if(hairetu2[i]<=T){
		count++;
	}
		} {
	if(hairetu2[i]<=T){
		count++;
	}
		} if(hairetu2[i]<=T){
		count++;
	} hairetu2[i]<=T hairetu2[i] hairetu2 i T {
		count++;
	} count++ count if(count==0){
		System.out.println("TLE");
		System.exit(0);
	} count==0 count 0 {
		System.out.println("TLE");
		System.exit(0);
	} System.out.println("TLE") System.out.println System.out System System.out "TLE" System.exit(0) System.exit System 0 int z=0; z 0 int []hairetu3 = new int[count]; hairetu3 new int[count] count for(int i=0;i<N;i++) {
		if(hairetu2[i]<=T){
			hairetu3[z]=hairetu1[i];
			z++;
		}
	} int i=0; int i=0; i 0 i<N i N i++ i++ i {
		if(hairetu2[i]<=T){
			hairetu3[z]=hairetu1[i];
			z++;
		}
	} {
		if(hairetu2[i]<=T){
			hairetu3[z]=hairetu1[i];
			z++;
		}
	} if(hairetu2[i]<=T){
			hairetu3[z]=hairetu1[i];
			z++;
		} hairetu2[i]<=T hairetu2[i] hairetu2 i T {
			hairetu3[z]=hairetu1[i];
			z++;
		} hairetu3[z]=hairetu1[i] hairetu3[z] hairetu3 z hairetu1[i] hairetu1 i z++ z int min = hairetu3[0]; min hairetu3[0] hairetu3 0 for(int i=0;i<count;i++){
		if(min>hairetu3[i]){
			min=hairetu3[i];
		}
	} int i=0; int i=0; i 0 i<count i count i++ i++ i {
		if(min>hairetu3[i]){
			min=hairetu3[i];
		}
	} {
		if(min>hairetu3[i]){
			min=hairetu3[i];
		}
	} if(min>hairetu3[i]){
			min=hairetu3[i];
		} min>hairetu3[i] min hairetu3[i] hairetu3 i {
			min=hairetu3[i];
		} min=hairetu3[i] min hairetu3[i] hairetu3 i 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 T = sc.nextInt();
	int []hairetu1 = new int[N];
	int []hairetu2 = new int[N];
	for(int i=0;i<N;i++) {
		hairetu1[i]=sc.nextInt();
		hairetu2[i]=sc.nextInt();
	}
int count=0;
	for(int i=0;i<N;i++) {
	if(hairetu2[i]<=T){
		count++;
	}
		}
	if(count==0){
		System.out.println("TLE");
		System.exit(0);
	}
	
	int z=0;
	int []hairetu3 = new int[count];
	for(int i=0;i<N;i++) {
		if(hairetu2[i]<=T){
			hairetu3[z]=hairetu1[i];
			z++;
		}
	}
	int min = hairetu3[0];
	for(int i=0;i<count;i++){
		if(min>hairetu3[i]){
			min=hairetu3[i];
		}
	}
	System.out.println(min);
	}
	} public class Main {

	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	int T = sc.nextInt();
	int []hairetu1 = new int[N];
	int []hairetu2 = new int[N];
	for(int i=0;i<N;i++) {
		hairetu1[i]=sc.nextInt();
		hairetu2[i]=sc.nextInt();
	}
int count=0;
	for(int i=0;i<N;i++) {
	if(hairetu2[i]<=T){
		count++;
	}
		}
	if(count==0){
		System.out.println("TLE");
		System.exit(0);
	}
	
	int z=0;
	int []hairetu3 = new int[count];
	for(int i=0;i<N;i++) {
		if(hairetu2[i]<=T){
			hairetu3[z]=hairetu1[i];
			z++;
		}
	}
	int min = hairetu3[0];
	for(int i=0;i<count;i++){
		if(min>hairetu3[i]){
			min=hairetu3[i];
		}
	}
	System.out.println(min);
	}
	} Main
import 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 []hairetu1 = new int[N];
	int []hairetu2 = new int[N];
	for(int i=0;i<N;i++) {
		hairetu1[i]=sc.nextInt();
		hairetu2[i]=sc.nextInt();
	}
int count=0;
	for(int i=0;i<N;i++) {
	if(hairetu2[i]<=T){
		count++;
	}
		}
	if(count==0){
		System.out.println("TLE");
		System.exit(0);
	}
	
	int z=0;
	int []hairetu3 = new int[count];
	for(int i=0;i<N;i++) {
		if(hairetu2[i]<=T){
			hairetu3[z]=hairetu1[i];
			z++;
		}
	}
	int min = hairetu3[0];
	for(int i=0;i<count;i++){
		if(min>hairetu3[i]){
			min=hairetu3[i];
		}
	}
	System.out.println(min);
	}
	}

