import java.util.Scanner;

public class Main {

	private static Scanner scan;

	public static void main(String[] args) {
		scan = new Scanner(System.in);

		String firstInput = scan.nextLine();
		int inputCount = Integer.parseInt(firstInput.substring(0, firstInput.indexOf(" ")));
		int minTime = Integer.parseInt(firstInput.substring(firstInput.indexOf(" ")+1));
		int minCost = 1001;
		for(int i = 0; i < inputCount; i++) {
			String input = scan.nextLine();
			int cost = Integer.parseInt(input.substring(0, input.indexOf(" ")));
			int time = Integer.parseInt(input.substring(input.indexOf(" ")+1));

			if(cost < minCost && time <= minTime) {
				minCost = cost;
			}
		}
		if(minCost < 1001) {
			System.out.println(minCost);
		} else {
			System.out.println("TLE");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	private static Scanner scan;

	public static void main(String[] args) {
		scan = new Scanner(System.in);

		String firstInput = scan.nextLine();
		int inputCount = Integer.parseInt(firstInput.substring(0, firstInput.indexOf(" ")));
		int minTime = Integer.parseInt(firstInput.substring(firstInput.indexOf(" ")+1));
		int minCost = 1001;
		for(int i = 0; i < inputCount; i++) {
			String input = scan.nextLine();
			int cost = Integer.parseInt(input.substring(0, input.indexOf(" ")));
			int time = Integer.parseInt(input.substring(input.indexOf(" ")+1));

			if(cost < minCost && time <= minTime) {
				minCost = cost;
			}
		}
		if(minCost < 1001) {
			System.out.println(minCost);
		} else {
			System.out.println("TLE");
		}
	}
} Main private static Scanner scan; scan public static void main(String[] args) {
		scan = new Scanner(System.in);

		String firstInput = scan.nextLine();
		int inputCount = Integer.parseInt(firstInput.substring(0, firstInput.indexOf(" ")));
		int minTime = Integer.parseInt(firstInput.substring(firstInput.indexOf(" ")+1));
		int minCost = 1001;
		for(int i = 0; i < inputCount; i++) {
			String input = scan.nextLine();
			int cost = Integer.parseInt(input.substring(0, input.indexOf(" ")));
			int time = Integer.parseInt(input.substring(input.indexOf(" ")+1));

			if(cost < minCost && time <= minTime) {
				minCost = cost;
			}
		}
		if(minCost < 1001) {
			System.out.println(minCost);
		} else {
			System.out.println("TLE");
		}
	} main {
		scan = new Scanner(System.in);

		String firstInput = scan.nextLine();
		int inputCount = Integer.parseInt(firstInput.substring(0, firstInput.indexOf(" ")));
		int minTime = Integer.parseInt(firstInput.substring(firstInput.indexOf(" ")+1));
		int minCost = 1001;
		for(int i = 0; i < inputCount; i++) {
			String input = scan.nextLine();
			int cost = Integer.parseInt(input.substring(0, input.indexOf(" ")));
			int time = Integer.parseInt(input.substring(input.indexOf(" ")+1));

			if(cost < minCost && time <= minTime) {
				minCost = cost;
			}
		}
		if(minCost < 1001) {
			System.out.println(minCost);
		} else {
			System.out.println("TLE");
		}
	} scan = new Scanner(System.in) scan new Scanner(System.in) String firstInput = scan.nextLine(); firstInput scan.nextLine() scan.nextLine scan int inputCount = Integer.parseInt(firstInput.substring(0, firstInput.indexOf(" "))); inputCount Integer.parseInt(firstInput.substring(0, firstInput.indexOf(" "))) Integer.parseInt Integer firstInput.substring(0, firstInput.indexOf(" ")) firstInput.substring firstInput 0 firstInput.indexOf(" ") firstInput.indexOf firstInput " " int minTime = Integer.parseInt(firstInput.substring(firstInput.indexOf(" ")+1)); minTime Integer.parseInt(firstInput.substring(firstInput.indexOf(" ")+1)) Integer.parseInt Integer firstInput.substring(firstInput.indexOf(" ")+1) firstInput.substring firstInput firstInput.indexOf(" ")+1 firstInput.indexOf(" ") firstInput.indexOf firstInput " " 1 int minCost = 1001; minCost 1001 for(int i = 0; i < inputCount; i++) {
			String input = scan.nextLine();
			int cost = Integer.parseInt(input.substring(0, input.indexOf(" ")));
			int time = Integer.parseInt(input.substring(input.indexOf(" ")+1));

			if(cost < minCost && time <= minTime) {
				minCost = cost;
			}
		} int i = 0; int i = 0; i 0 i < inputCount i inputCount i++ i++ i {
			String input = scan.nextLine();
			int cost = Integer.parseInt(input.substring(0, input.indexOf(" ")));
			int time = Integer.parseInt(input.substring(input.indexOf(" ")+1));

			if(cost < minCost && time <= minTime) {
				minCost = cost;
			}
		} {
			String input = scan.nextLine();
			int cost = Integer.parseInt(input.substring(0, input.indexOf(" ")));
			int time = Integer.parseInt(input.substring(input.indexOf(" ")+1));

			if(cost < minCost && time <= minTime) {
				minCost = cost;
			}
		} String input = scan.nextLine(); input scan.nextLine() scan.nextLine scan int cost = Integer.parseInt(input.substring(0, input.indexOf(" "))); cost Integer.parseInt(input.substring(0, input.indexOf(" "))) Integer.parseInt Integer input.substring(0, input.indexOf(" ")) input.substring input 0 input.indexOf(" ") input.indexOf input " " int time = Integer.parseInt(input.substring(input.indexOf(" ")+1)); time Integer.parseInt(input.substring(input.indexOf(" ")+1)) Integer.parseInt Integer input.substring(input.indexOf(" ")+1) input.substring input input.indexOf(" ")+1 input.indexOf(" ") input.indexOf input " " 1 if(cost < minCost && time <= minTime) {
				minCost = cost;
			} cost < minCost && time <= minTime cost < minCost cost minCost time <= minTime time minTime {
				minCost = cost;
			} minCost = cost minCost cost if(minCost < 1001) {
			System.out.println(minCost);
		} else {
			System.out.println("TLE");
		} minCost < 1001 minCost 1001 {
			System.out.println(minCost);
		} System.out.println(minCost) System.out.println System.out System System.out minCost {
			System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" String[] args args public class Main {

	private static Scanner scan;

	public static void main(String[] args) {
		scan = new Scanner(System.in);

		String firstInput = scan.nextLine();
		int inputCount = Integer.parseInt(firstInput.substring(0, firstInput.indexOf(" ")));
		int minTime = Integer.parseInt(firstInput.substring(firstInput.indexOf(" ")+1));
		int minCost = 1001;
		for(int i = 0; i < inputCount; i++) {
			String input = scan.nextLine();
			int cost = Integer.parseInt(input.substring(0, input.indexOf(" ")));
			int time = Integer.parseInt(input.substring(input.indexOf(" ")+1));

			if(cost < minCost && time <= minTime) {
				minCost = cost;
			}
		}
		if(minCost < 1001) {
			System.out.println(minCost);
		} else {
			System.out.println("TLE");
		}
	}
} public class Main {

	private static Scanner scan;

	public static void main(String[] args) {
		scan = new Scanner(System.in);

		String firstInput = scan.nextLine();
		int inputCount = Integer.parseInt(firstInput.substring(0, firstInput.indexOf(" ")));
		int minTime = Integer.parseInt(firstInput.substring(firstInput.indexOf(" ")+1));
		int minCost = 1001;
		for(int i = 0; i < inputCount; i++) {
			String input = scan.nextLine();
			int cost = Integer.parseInt(input.substring(0, input.indexOf(" ")));
			int time = Integer.parseInt(input.substring(input.indexOf(" ")+1));

			if(cost < minCost && time <= minTime) {
				minCost = cost;
			}
		}
		if(minCost < 1001) {
			System.out.println(minCost);
		} else {
			System.out.println("TLE");
		}
	}
} Main
import java.util.Scanner;

public class Main {

	private static Scanner scan;

	public static void main(String[] args) {
		scan = new Scanner(System.in);

		String firstInput = scan.nextLine();
		int inputCount = Integer.parseInt(firstInput.substring(0, firstInput.indexOf(" ")));
		int minTime = Integer.parseInt(firstInput.substring(firstInput.indexOf(" ")+1));
		int minCost = 1001;
		for(int i = 0; i < inputCount; i++) {
			String input = scan.nextLine();
			int cost = Integer.parseInt(input.substring(0, input.indexOf(" ")));
			int time = Integer.parseInt(input.substring(input.indexOf(" ")+1));

			if(cost < minCost && time <= minTime) {
				minCost = cost;
			}
		}
		if(minCost < 1001) {
			System.out.println(minCost);
		} else {
			System.out.println("TLE");
		}
	}
}