import java.io.*;
import java.util.*;
import java.util.stream.*;

public class Main {
	private static BufferedReader br = null;
	
	public static void main(String[] args) {
		String[] strs = read(1)[0].split(" ");
		int n = Integer.parseInt(strs[0]);
		int t = Integer.parseInt(strs[1]);
		
		strs = read(n);
		
		int minCost = Integer.MAX_VALUE;
		for (String str : strs) {
			String[] strs2 = str.split(" ");
			int c = Integer.parseInt(strs2[0]);
			int t2 = Integer.parseInt(strs2[1]);
			
			if (t2 <= t && c < minCost) {
				minCost = c;
			}
		}
		
		if (minCost == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
	
	private static void close() {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java import java.util.stream.*; stream.* java.util public class Main {
	private static BufferedReader br = null;
	
	public static void main(String[] args) {
		String[] strs = read(1)[0].split(" ");
		int n = Integer.parseInt(strs[0]);
		int t = Integer.parseInt(strs[1]);
		
		strs = read(n);
		
		int minCost = Integer.MAX_VALUE;
		for (String str : strs) {
			String[] strs2 = str.split(" ");
			int c = Integer.parseInt(strs2[0]);
			int t2 = Integer.parseInt(strs2[1]);
			
			if (t2 <= t && c < minCost) {
				minCost = c;
			}
		}
		
		if (minCost == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
	
	private static void close() {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	}
} Main private static BufferedReader br = null; br null public static void main(String[] args) {
		String[] strs = read(1)[0].split(" ");
		int n = Integer.parseInt(strs[0]);
		int t = Integer.parseInt(strs[1]);
		
		strs = read(n);
		
		int minCost = Integer.MAX_VALUE;
		for (String str : strs) {
			String[] strs2 = str.split(" ");
			int c = Integer.parseInt(strs2[0]);
			int t2 = Integer.parseInt(strs2[1]);
			
			if (t2 <= t && c < minCost) {
				minCost = c;
			}
		}
		
		if (minCost == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	} main {
		String[] strs = read(1)[0].split(" ");
		int n = Integer.parseInt(strs[0]);
		int t = Integer.parseInt(strs[1]);
		
		strs = read(n);
		
		int minCost = Integer.MAX_VALUE;
		for (String str : strs) {
			String[] strs2 = str.split(" ");
			int c = Integer.parseInt(strs2[0]);
			int t2 = Integer.parseInt(strs2[1]);
			
			if (t2 <= t && c < minCost) {
				minCost = c;
			}
		}
		
		if (minCost == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	} String[] strs = read(1)[0].split(" "); strs read(1)[0].split(" ") read(1)[0].split read(1)[0] read(1) read 1 0 " " int n = Integer.parseInt(strs[0]); n Integer.parseInt(strs[0]) Integer.parseInt Integer strs[0] strs 0 int t = Integer.parseInt(strs[1]); t Integer.parseInt(strs[1]) Integer.parseInt Integer strs[1] strs 1 strs = read(n) strs read(n) read n int minCost = Integer.MAX_VALUE; minCost Integer.MAX_VALUE Integer Integer.MAX_VALUE for (String str : strs) {
			String[] strs2 = str.split(" ");
			int c = Integer.parseInt(strs2[0]);
			int t2 = Integer.parseInt(strs2[1]);
			
			if (t2 <= t && c < minCost) {
				minCost = c;
			}
		} String str strs {
			String[] strs2 = str.split(" ");
			int c = Integer.parseInt(strs2[0]);
			int t2 = Integer.parseInt(strs2[1]);
			
			if (t2 <= t && c < minCost) {
				minCost = c;
			}
		} {
			String[] strs2 = str.split(" ");
			int c = Integer.parseInt(strs2[0]);
			int t2 = Integer.parseInt(strs2[1]);
			
			if (t2 <= t && c < minCost) {
				minCost = c;
			}
		} String[] strs2 = str.split(" "); strs2 str.split(" ") str.split str " " int c = Integer.parseInt(strs2[0]); c Integer.parseInt(strs2[0]) Integer.parseInt Integer strs2[0] strs2 0 int t2 = Integer.parseInt(strs2[1]); t2 Integer.parseInt(strs2[1]) Integer.parseInt Integer strs2[1] strs2 1 if (t2 <= t && c < minCost) {
				minCost = c;
			} t2 <= t && c < minCost t2 <= t t2 t c < minCost c minCost {
				minCost = c;
			} minCost = c minCost c if (minCost == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		} minCost == Integer.MAX_VALUE minCost Integer.MAX_VALUE Integer Integer.MAX_VALUE {
			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 private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	} read {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	} List<String> strList = new ArrayList<>(); strList new ArrayList<>() try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		} catch (IOException e) {
		} IOException e {
		} {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			} br == null br null {
				br = new BufferedReader(new InputStreamReader(System.in));
			} br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			} int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
				strList.add(br.readLine());
			} {
				strList.add(br.readLine());
			} strList.add(br.readLine()) strList.add strList br.readLine() br.readLine br return strList.toArray(new String[0]); strList.toArray(new String[0]) strList.toArray strList new String[0] 0 int len len private static void close() {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	} close {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	} try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		} catch (IOException e) {
		} IOException e {
		} {
			if (br != null) {
				br.close();
			}
		} if (br != null) {
				br.close();
			} br != null br null {
				br.close();
			} br.close() br.close br public class Main {
	private static BufferedReader br = null;
	
	public static void main(String[] args) {
		String[] strs = read(1)[0].split(" ");
		int n = Integer.parseInt(strs[0]);
		int t = Integer.parseInt(strs[1]);
		
		strs = read(n);
		
		int minCost = Integer.MAX_VALUE;
		for (String str : strs) {
			String[] strs2 = str.split(" ");
			int c = Integer.parseInt(strs2[0]);
			int t2 = Integer.parseInt(strs2[1]);
			
			if (t2 <= t && c < minCost) {
				minCost = c;
			}
		}
		
		if (minCost == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
	
	private static void close() {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	}
} public class Main {
	private static BufferedReader br = null;
	
	public static void main(String[] args) {
		String[] strs = read(1)[0].split(" ");
		int n = Integer.parseInt(strs[0]);
		int t = Integer.parseInt(strs[1]);
		
		strs = read(n);
		
		int minCost = Integer.MAX_VALUE;
		for (String str : strs) {
			String[] strs2 = str.split(" ");
			int c = Integer.parseInt(strs2[0]);
			int t2 = Integer.parseInt(strs2[1]);
			
			if (t2 <= t && c < minCost) {
				minCost = c;
			}
		}
		
		if (minCost == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
	
	private static void close() {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	}
} Main
import java.io.*;
import java.util.*;
import java.util.stream.*;

public class Main {
	private static BufferedReader br = null;
	
	public static void main(String[] args) {
		String[] strs = read(1)[0].split(" ");
		int n = Integer.parseInt(strs[0]);
		int t = Integer.parseInt(strs[1]);
		
		strs = read(n);
		
		int minCost = Integer.MAX_VALUE;
		for (String str : strs) {
			String[] strs2 = str.split(" ");
			int c = Integer.parseInt(strs2[0]);
			int t2 = Integer.parseInt(strs2[1]);
			
			if (t2 <= t && c < minCost) {
				minCost = c;
			}
		}
		
		if (minCost == Integer.MAX_VALUE) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}
	}
	
	private static String[] read(int len) {
		List<String> strList = new ArrayList<>();
		
		try {
			if (br == null) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			
			for (int i = 0; i < len; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
		
		return strList.toArray(new String[0]);
	}
	
	private static void close() {
		try {
			if (br != null) {
				br.close();
			}
		} catch (IOException e) {
		}
	}
}
