import java.util.Scanner;

class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int time = sc.nextInt();
		int c[] = new int[n];
		int t[] = new int[n];
		int min = -1;
		for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
			if (t[i] <= time && (c[i] < min || min == -1))
				min = c[i];
		}
		System.out.println(min==-1 ? "TLE\n" : min);
	}
} import java.util.Scanner; Scanner java.util class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int time = sc.nextInt();
		int c[] = new int[n];
		int t[] = new int[n];
		int min = -1;
		for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
			if (t[i] <= time && (c[i] < min || min == -1))
				min = c[i];
		}
		System.out.println(min==-1 ? "TLE\n" : min);
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int time = sc.nextInt();
		int c[] = new int[n];
		int t[] = new int[n];
		int min = -1;
		for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
			if (t[i] <= time && (c[i] < min || min == -1))
				min = c[i];
		}
		System.out.println(min==-1 ? "TLE\n" : min);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int time = sc.nextInt();
		int c[] = new int[n];
		int t[] = new int[n];
		int min = -1;
		for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
			if (t[i] <= time && (c[i] < min || min == -1))
				min = c[i];
		}
		System.out.println(min==-1 ? "TLE\n" : min);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int time = sc.nextInt(); time sc.nextInt() sc.nextInt sc int c[] = new int[n]; c new int[n] n int t[] = new int[n]; t new int[n] n int min = -1; min -1 1 for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
			if (t[i] <= time && (c[i] < min || min == -1))
				min = c[i];
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
			if (t[i] <= time && (c[i] < min || min == -1))
				min = c[i];
		} {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
			if (t[i] <= time && (c[i] < min || min == -1))
				min = c[i];
		} c[i] = sc.nextInt() c[i] c i sc.nextInt() sc.nextInt sc t[i] = sc.nextInt() t[i] t i sc.nextInt() sc.nextInt sc if (t[i] <= time && (c[i] < min || min == -1))
				min = c[i]; t[i] <= time && (c[i] < min || min == -1) t[i] <= time t[i] t i time (c[i] < min || min == -1) c[i] < min c[i] c i min min == -1 min -1 1 min = c[i] min c[i] c i System.out.println(min==-1 ? "TLE\n" : min) System.out.println System.out System System.out min==-1 ? "TLE\n" : min min==-1 min -1 1 "TLE\n" min String args[] args
import java.util.Scanner;

class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int time = sc.nextInt();
		int c[] = new int[n];
		int t[] = new int[n];
		int min = -1;
		for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
			if (t[i] <= time && (c[i] < min || min == -1))
				min = c[i];
		}
		System.out.println(min==-1 ? "TLE\n" : min);
	}
}