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[] c = new int[n];
		int[] t = new int[n];
		for(int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		int minCost = 1001;
		for(int i = 0; i < n; i++) {
			if(t[i] <= T && c[i] < minCost) {
				minCost = c[i];
			}
		}
		if(minCost == 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	}
} 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[] c = new int[n];
		int[] t = new int[n];
		for(int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		int minCost = 1001;
		for(int i = 0; i < n; i++) {
			if(t[i] <= T && c[i] < minCost) {
				minCost = c[i];
			}
		}
		if(minCost == 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int T = sc.nextInt();
		int[] c = new int[n];
		int[] t = new int[n];
		for(int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		int minCost = 1001;
		for(int i = 0; i < n; i++) {
			if(t[i] <= T && c[i] < minCost) {
				minCost = c[i];
			}
		}
		if(minCost == 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int T = sc.nextInt();
		int[] c = new int[n];
		int[] t = new int[n];
		for(int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		int minCost = 1001;
		for(int i = 0; i < n; i++) {
			if(t[i] <= T && c[i] < minCost) {
				minCost = c[i];
			}
		}
		if(minCost == 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	} 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[] c = new int[n]; c new int[n] n int[] t = new int[n]; t new int[n] n for(int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		} {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		} 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 int minCost = 1001; minCost 1001 for(int i = 0; i < n; i++) {
			if(t[i] <= T && c[i] < minCost) {
				minCost = c[i];
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if(t[i] <= T && c[i] < minCost) {
				minCost = c[i];
			}
		} {
			if(t[i] <= T && c[i] < minCost) {
				minCost = c[i];
			}
		} if(t[i] <= T && c[i] < minCost) {
				minCost = c[i];
			} t[i] <= T && c[i] < minCost t[i] <= T t[i] t i T c[i] < minCost c[i] c i minCost {
				minCost = c[i];
			} minCost = c[i] minCost c[i] c i if(minCost == 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		} minCost == 1001 minCost 1001 {
			System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(minCost);
		} System.out.println(minCost) System.out.println System.out System System.out minCost 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[] c = new int[n];
		int[] t = new int[n];
		for(int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		int minCost = 1001;
		for(int i = 0; i < n; i++) {
			if(t[i] <= T && c[i] < minCost) {
				minCost = c[i];
			}
		}
		if(minCost == 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int T = sc.nextInt();
		int[] c = new int[n];
		int[] t = new int[n];
		for(int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		int minCost = 1001;
		for(int i = 0; i < n; i++) {
			if(t[i] <= T && c[i] < minCost) {
				minCost = c[i];
			}
		}
		if(minCost == 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	}
} 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[] c = new int[n];
		int[] t = new int[n];
		for(int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		int minCost = 1001;
		for(int i = 0; i < n; i++) {
			if(t[i] <= T && c[i] < minCost) {
				minCost = c[i];
			}
		}
		if(minCost == 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	}
}