import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int T = sc.nextInt();
		int[][] w = new int[N][2];
		boolean beg = false;
		int cost =2000;
		//int res;
		//int time;
		for(int i = 0;i<N;i++) {
			w[i][0] = sc.nextInt();
			w[i][1] = sc.nextInt();
			if(w[i][1]<=T&&beg==false) {
				beg=true;
				//time = w[i][1];
				cost = w[i][0];
            //  System.out.println(cost);
			}

		}
		for(int n = 0;n<N;n++) {
			if(cost>w[n][0] && w[n][1]<=T) {
				cost = w[n][0];
			}
		}
		if(cost==2000) {
		System.out.println("TLE");
		}else {
			System.out.println(cost);
		}



	}

} 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 T = sc.nextInt();
		int[][] w = new int[N][2];
		boolean beg = false;
		int cost =2000;
		//int res;
		//int time;
		for(int i = 0;i<N;i++) {
			w[i][0] = sc.nextInt();
			w[i][1] = sc.nextInt();
			if(w[i][1]<=T&&beg==false) {
				beg=true;
				//time = w[i][1];
				cost = w[i][0];
            //  System.out.println(cost);
			}

		}
		for(int n = 0;n<N;n++) {
			if(cost>w[n][0] && w[n][1]<=T) {
				cost = w[n][0];
			}
		}
		if(cost==2000) {
		System.out.println("TLE");
		}else {
			System.out.println(cost);
		}



	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int T = sc.nextInt();
		int[][] w = new int[N][2];
		boolean beg = false;
		int cost =2000;
		//int res;
		//int time;
		for(int i = 0;i<N;i++) {
			w[i][0] = sc.nextInt();
			w[i][1] = sc.nextInt();
			if(w[i][1]<=T&&beg==false) {
				beg=true;
				//time = w[i][1];
				cost = w[i][0];
            //  System.out.println(cost);
			}

		}
		for(int n = 0;n<N;n++) {
			if(cost>w[n][0] && w[n][1]<=T) {
				cost = w[n][0];
			}
		}
		if(cost==2000) {
		System.out.println("TLE");
		}else {
			System.out.println(cost);
		}



	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int T = sc.nextInt();
		int[][] w = new int[N][2];
		boolean beg = false;
		int cost =2000;
		//int res;
		//int time;
		for(int i = 0;i<N;i++) {
			w[i][0] = sc.nextInt();
			w[i][1] = sc.nextInt();
			if(w[i][1]<=T&&beg==false) {
				beg=true;
				//time = w[i][1];
				cost = w[i][0];
            //  System.out.println(cost);
			}

		}
		for(int n = 0;n<N;n++) {
			if(cost>w[n][0] && w[n][1]<=T) {
				cost = w[n][0];
			}
		}
		if(cost==2000) {
		System.out.println("TLE");
		}else {
			System.out.println(cost);
		}



	} 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[][] w = new int[N][2]; w new int[N][2] N 2 boolean beg = false; beg false int cost =2000; cost 2000 for(int i = 0;i<N;i++) {
			w[i][0] = sc.nextInt();
			w[i][1] = sc.nextInt();
			if(w[i][1]<=T&&beg==false) {
				beg=true;
				//time = w[i][1];
				cost = w[i][0];
            //  System.out.println(cost);
			}

		} int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
			w[i][0] = sc.nextInt();
			w[i][1] = sc.nextInt();
			if(w[i][1]<=T&&beg==false) {
				beg=true;
				//time = w[i][1];
				cost = w[i][0];
            //  System.out.println(cost);
			}

		} {
			w[i][0] = sc.nextInt();
			w[i][1] = sc.nextInt();
			if(w[i][1]<=T&&beg==false) {
				beg=true;
				//time = w[i][1];
				cost = w[i][0];
            //  System.out.println(cost);
			}

		} w[i][0] = sc.nextInt() w[i][0] w[i] w i 0 sc.nextInt() sc.nextInt sc w[i][1] = sc.nextInt() w[i][1] w[i] w i 1 sc.nextInt() sc.nextInt sc if(w[i][1]<=T&&beg==false) {
				beg=true;
				//time = w[i][1];
				cost = w[i][0];
            //  System.out.println(cost);
			} w[i][1]<=T&&beg==false w[i][1]<=T w[i][1] w[i] w i 1 T beg==false beg false {
				beg=true;
				//time = w[i][1];
				cost = w[i][0];
            //  System.out.println(cost);
			} beg=true beg true cost = w[i][0] cost w[i][0] w[i] w i 0 for(int n = 0;n<N;n++) {
			if(cost>w[n][0] && w[n][1]<=T) {
				cost = w[n][0];
			}
		} int n = 0; int n = 0; n 0 n<N n N n++ n++ n {
			if(cost>w[n][0] && w[n][1]<=T) {
				cost = w[n][0];
			}
		} {
			if(cost>w[n][0] && w[n][1]<=T) {
				cost = w[n][0];
			}
		} if(cost>w[n][0] && w[n][1]<=T) {
				cost = w[n][0];
			} cost>w[n][0] && w[n][1]<=T cost>w[n][0] cost w[n][0] w[n] w n 0 w[n][1]<=T w[n][1] w[n] w n 1 T {
				cost = w[n][0];
			} cost = w[n][0] cost w[n][0] w[n] w n 0 if(cost==2000) {
		System.out.println("TLE");
		}else {
			System.out.println(cost);
		} cost==2000 cost 2000 {
		System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(cost);
		} System.out.println(cost) System.out.println System.out System System.out cost 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[][] w = new int[N][2];
		boolean beg = false;
		int cost =2000;
		//int res;
		//int time;
		for(int i = 0;i<N;i++) {
			w[i][0] = sc.nextInt();
			w[i][1] = sc.nextInt();
			if(w[i][1]<=T&&beg==false) {
				beg=true;
				//time = w[i][1];
				cost = w[i][0];
            //  System.out.println(cost);
			}

		}
		for(int n = 0;n<N;n++) {
			if(cost>w[n][0] && w[n][1]<=T) {
				cost = w[n][0];
			}
		}
		if(cost==2000) {
		System.out.println("TLE");
		}else {
			System.out.println(cost);
		}



	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int T = sc.nextInt();
		int[][] w = new int[N][2];
		boolean beg = false;
		int cost =2000;
		//int res;
		//int time;
		for(int i = 0;i<N;i++) {
			w[i][0] = sc.nextInt();
			w[i][1] = sc.nextInt();
			if(w[i][1]<=T&&beg==false) {
				beg=true;
				//time = w[i][1];
				cost = w[i][0];
            //  System.out.println(cost);
			}

		}
		for(int n = 0;n<N;n++) {
			if(cost>w[n][0] && w[n][1]<=T) {
				cost = w[n][0];
			}
		}
		if(cost==2000) {
		System.out.println("TLE");
		}else {
			System.out.println(cost);
		}



	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int T = sc.nextInt();
		int[][] w = new int[N][2];
		boolean beg = false;
		int cost =2000;
		//int res;
		//int time;
		for(int i = 0;i<N;i++) {
			w[i][0] = sc.nextInt();
			w[i][1] = sc.nextInt();
			if(w[i][1]<=T&&beg==false) {
				beg=true;
				//time = w[i][1];
				cost = w[i][0];
            //  System.out.println(cost);
			}

		}
		for(int n = 0;n<N;n++) {
			if(cost>w[n][0] && w[n][1]<=T) {
				cost = w[n][0];
			}
		}
		if(cost==2000) {
		System.out.println("TLE");
		}else {
			System.out.println(cost);
		}



	}

}
