import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String line = scanner.nextLine();
		String[] row = line.split(" ");
		int n = Integer.parseInt(row[0]);
		int t = Integer.parseInt(row[1]);

		int minCost = 1001;
		for (int i = 0; i < n; i++) {
			String line2 = scanner.nextLine();
			String[] row2 = line2.split(" ");
			int cost = Integer.parseInt(row2[0]);
			int time = Integer.parseInt(row2[1]);

			if (time <= t && cost < minCost) {
				minCost = cost;
			}
		}
		if (minCost > 1000) {
			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 scanner = new Scanner(System.in);
		String line = scanner.nextLine();
		String[] row = line.split(" ");
		int n = Integer.parseInt(row[0]);
		int t = Integer.parseInt(row[1]);

		int minCost = 1001;
		for (int i = 0; i < n; i++) {
			String line2 = scanner.nextLine();
			String[] row2 = line2.split(" ");
			int cost = Integer.parseInt(row2[0]);
			int time = Integer.parseInt(row2[1]);

			if (time <= t && cost < minCost) {
				minCost = cost;
			}
		}
		if (minCost > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}

	}

} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String line = scanner.nextLine();
		String[] row = line.split(" ");
		int n = Integer.parseInt(row[0]);
		int t = Integer.parseInt(row[1]);

		int minCost = 1001;
		for (int i = 0; i < n; i++) {
			String line2 = scanner.nextLine();
			String[] row2 = line2.split(" ");
			int cost = Integer.parseInt(row2[0]);
			int time = Integer.parseInt(row2[1]);

			if (time <= t && cost < minCost) {
				minCost = cost;
			}
		}
		if (minCost > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}

	} main {
		Scanner scanner = new Scanner(System.in);
		String line = scanner.nextLine();
		String[] row = line.split(" ");
		int n = Integer.parseInt(row[0]);
		int t = Integer.parseInt(row[1]);

		int minCost = 1001;
		for (int i = 0; i < n; i++) {
			String line2 = scanner.nextLine();
			String[] row2 = line2.split(" ");
			int cost = Integer.parseInt(row2[0]);
			int time = Integer.parseInt(row2[1]);

			if (time <= t && cost < minCost) {
				minCost = cost;
			}
		}
		if (minCost > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}

	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String line = scanner.nextLine(); line scanner.nextLine() scanner.nextLine scanner String[] row = line.split(" "); row line.split(" ") line.split line " " int n = Integer.parseInt(row[0]); n Integer.parseInt(row[0]) Integer.parseInt Integer row[0] row 0 int t = Integer.parseInt(row[1]); t Integer.parseInt(row[1]) Integer.parseInt Integer row[1] row 1 int minCost = 1001; minCost 1001 for (int i = 0; i < n; i++) {
			String line2 = scanner.nextLine();
			String[] row2 = line2.split(" ");
			int cost = Integer.parseInt(row2[0]);
			int time = Integer.parseInt(row2[1]);

			if (time <= t && cost < minCost) {
				minCost = cost;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String line2 = scanner.nextLine();
			String[] row2 = line2.split(" ");
			int cost = Integer.parseInt(row2[0]);
			int time = Integer.parseInt(row2[1]);

			if (time <= t && cost < minCost) {
				minCost = cost;
			}
		} {
			String line2 = scanner.nextLine();
			String[] row2 = line2.split(" ");
			int cost = Integer.parseInt(row2[0]);
			int time = Integer.parseInt(row2[1]);

			if (time <= t && cost < minCost) {
				minCost = cost;
			}
		} String line2 = scanner.nextLine(); line2 scanner.nextLine() scanner.nextLine scanner String[] row2 = line2.split(" "); row2 line2.split(" ") line2.split line2 " " int cost = Integer.parseInt(row2[0]); cost Integer.parseInt(row2[0]) Integer.parseInt Integer row2[0] row2 0 int time = Integer.parseInt(row2[1]); time Integer.parseInt(row2[1]) Integer.parseInt Integer row2[1] row2 1 if (time <= t && cost < minCost) {
				minCost = cost;
			} time <= t && cost < minCost time <= t time t cost < minCost cost minCost {
				minCost = cost;
			} minCost = cost minCost cost if (minCost > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		} minCost > 1000 minCost 1000 {
			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 scanner = new Scanner(System.in);
		String line = scanner.nextLine();
		String[] row = line.split(" ");
		int n = Integer.parseInt(row[0]);
		int t = Integer.parseInt(row[1]);

		int minCost = 1001;
		for (int i = 0; i < n; i++) {
			String line2 = scanner.nextLine();
			String[] row2 = line2.split(" ");
			int cost = Integer.parseInt(row2[0]);
			int time = Integer.parseInt(row2[1]);

			if (time <= t && cost < minCost) {
				minCost = cost;
			}
		}
		if (minCost > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}

	}

} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String line = scanner.nextLine();
		String[] row = line.split(" ");
		int n = Integer.parseInt(row[0]);
		int t = Integer.parseInt(row[1]);

		int minCost = 1001;
		for (int i = 0; i < n; i++) {
			String line2 = scanner.nextLine();
			String[] row2 = line2.split(" ");
			int cost = Integer.parseInt(row2[0]);
			int time = Integer.parseInt(row2[1]);

			if (time <= t && cost < minCost) {
				minCost = cost;
			}
		}
		if (minCost > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String line = scanner.nextLine();
		String[] row = line.split(" ");
		int n = Integer.parseInt(row[0]);
		int t = Integer.parseInt(row[1]);

		int minCost = 1001;
		for (int i = 0; i < n; i++) {
			String line2 = scanner.nextLine();
			String[] row2 = line2.split(" ");
			int cost = Integer.parseInt(row2[0]);
			int time = Integer.parseInt(row2[1]);

			if (time <= t && cost < minCost) {
				minCost = cost;
			}
		}
		if (minCost > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(minCost);
		}

	}

}
