import java.util.*;
public class Main{
	public static void main(String [] args) {
		Scanner x=new Scanner(System.in);
		int a=x.nextInt();
		int b=x.nextInt();
		int c[]=new int [a];
		int c1[]=new int [a];
		for(int i=0;i<a;i++) {
			c1[i]=x.nextInt();
			c[i]=x.nextInt();
		}
		int min=9999;
		for(int i=0;i<a;i++) {
			if(c[i]<=b&&min>c1[i])
			{
				min=c1[i];
				
			}
		}
		if(min==9999) {
			System.out.println("TLE");
		}
		else {
			System.out.println(min);
		}
	}
} import java.util.*; util.* java public class Main{
	public static void main(String [] args) {
		Scanner x=new Scanner(System.in);
		int a=x.nextInt();
		int b=x.nextInt();
		int c[]=new int [a];
		int c1[]=new int [a];
		for(int i=0;i<a;i++) {
			c1[i]=x.nextInt();
			c[i]=x.nextInt();
		}
		int min=9999;
		for(int i=0;i<a;i++) {
			if(c[i]<=b&&min>c1[i])
			{
				min=c1[i];
				
			}
		}
		if(min==9999) {
			System.out.println("TLE");
		}
		else {
			System.out.println(min);
		}
	}
} Main public static void main(String [] args) {
		Scanner x=new Scanner(System.in);
		int a=x.nextInt();
		int b=x.nextInt();
		int c[]=new int [a];
		int c1[]=new int [a];
		for(int i=0;i<a;i++) {
			c1[i]=x.nextInt();
			c[i]=x.nextInt();
		}
		int min=9999;
		for(int i=0;i<a;i++) {
			if(c[i]<=b&&min>c1[i])
			{
				min=c1[i];
				
			}
		}
		if(min==9999) {
			System.out.println("TLE");
		}
		else {
			System.out.println(min);
		}
	} main {
		Scanner x=new Scanner(System.in);
		int a=x.nextInt();
		int b=x.nextInt();
		int c[]=new int [a];
		int c1[]=new int [a];
		for(int i=0;i<a;i++) {
			c1[i]=x.nextInt();
			c[i]=x.nextInt();
		}
		int min=9999;
		for(int i=0;i<a;i++) {
			if(c[i]<=b&&min>c1[i])
			{
				min=c1[i];
				
			}
		}
		if(min==9999) {
			System.out.println("TLE");
		}
		else {
			System.out.println(min);
		}
	} Scanner x=new Scanner(System.in); x new Scanner(System.in) int a=x.nextInt(); a x.nextInt() x.nextInt x int b=x.nextInt(); b x.nextInt() x.nextInt x int c[]=new int [a]; c new int [a] a int c1[]=new int [a]; c1 new int [a] a for(int i=0;i<a;i++) {
			c1[i]=x.nextInt();
			c[i]=x.nextInt();
		} int i=0; int i=0; i 0 i<a i a i++ i++ i {
			c1[i]=x.nextInt();
			c[i]=x.nextInt();
		} {
			c1[i]=x.nextInt();
			c[i]=x.nextInt();
		} c1[i]=x.nextInt() c1[i] c1 i x.nextInt() x.nextInt x c[i]=x.nextInt() c[i] c i x.nextInt() x.nextInt x int min=9999; min 9999 for(int i=0;i<a;i++) {
			if(c[i]<=b&&min>c1[i])
			{
				min=c1[i];
				
			}
		} int i=0; int i=0; i 0 i<a i a i++ i++ i {
			if(c[i]<=b&&min>c1[i])
			{
				min=c1[i];
				
			}
		} {
			if(c[i]<=b&&min>c1[i])
			{
				min=c1[i];
				
			}
		} if(c[i]<=b&&min>c1[i])
			{
				min=c1[i];
				
			} c[i]<=b&&min>c1[i] c[i]<=b c[i] c i b min>c1[i] min c1[i] c1 i {
				min=c1[i];
				
			} min=c1[i] min c1[i] c1 i if(min==9999) {
			System.out.println("TLE");
		}
		else {
			System.out.println(min);
		} min==9999 min 9999 {
			System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(min);
		} 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 x=new Scanner(System.in);
		int a=x.nextInt();
		int b=x.nextInt();
		int c[]=new int [a];
		int c1[]=new int [a];
		for(int i=0;i<a;i++) {
			c1[i]=x.nextInt();
			c[i]=x.nextInt();
		}
		int min=9999;
		for(int i=0;i<a;i++) {
			if(c[i]<=b&&min>c1[i])
			{
				min=c1[i];
				
			}
		}
		if(min==9999) {
			System.out.println("TLE");
		}
		else {
			System.out.println(min);
		}
	}
} public class Main{
	public static void main(String [] args) {
		Scanner x=new Scanner(System.in);
		int a=x.nextInt();
		int b=x.nextInt();
		int c[]=new int [a];
		int c1[]=new int [a];
		for(int i=0;i<a;i++) {
			c1[i]=x.nextInt();
			c[i]=x.nextInt();
		}
		int min=9999;
		for(int i=0;i<a;i++) {
			if(c[i]<=b&&min>c1[i])
			{
				min=c1[i];
				
			}
		}
		if(min==9999) {
			System.out.println("TLE");
		}
		else {
			System.out.println(min);
		}
	}
} Main
import java.util.*;
public class Main{
	public static void main(String [] args) {
		Scanner x=new Scanner(System.in);
		int a=x.nextInt();
		int b=x.nextInt();
		int c[]=new int [a];
		int c1[]=new int [a];
		for(int i=0;i<a;i++) {
			c1[i]=x.nextInt();
			c[i]=x.nextInt();
		}
		int min=9999;
		for(int i=0;i<a;i++) {
			if(c[i]<=b&&min>c1[i])
			{
				min=c1[i];
				
			}
		}
		if(min==9999) {
			System.out.println("TLE");
		}
		else {
			System.out.println(min);
		}
	}
}
