
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		// ABC11X_A();
		ABC11X_B();
		// ABC11X_C();
		// ABC11X_D();
	}

	private static void ABC11X_A() {
		Scanner scanner = null;
		int nenrei = 0;

		try {
			scanner = new Scanner(System.in);
			nenrei = scanner.nextInt();

			switch (nenrei) {
			case 1:
				System.out.println("Hello World");
				break;
			case 2:
				int numA = scanner.nextInt();
				int numB = scanner.nextInt();
				System.out.println(numA + numB);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_B() {
		Scanner scanner = null;
		int numN = 0;
		int numT = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			numT = scanner.nextInt();

			int[] costArray = new int[numN];
			int[] timeArray = new int[numN];
			int minCost = Integer.MAX_VALUE;
			for (int i = 0; i < numN; i++) {
				costArray[i] = scanner.nextInt();
				timeArray[i] = scanner.nextInt();
				if (numT >= timeArray[i] && minCost > costArray[i]) {
					minCost = costArray[i];
				}
			}

			if (minCost == Integer.MAX_VALUE) {
				System.out.println("TLE");
			} else {
				System.out.println(minCost);
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_C() {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_D() {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		// ABC11X_A();
		ABC11X_B();
		// ABC11X_C();
		// ABC11X_D();
	}

	private static void ABC11X_A() {
		Scanner scanner = null;
		int nenrei = 0;

		try {
			scanner = new Scanner(System.in);
			nenrei = scanner.nextInt();

			switch (nenrei) {
			case 1:
				System.out.println("Hello World");
				break;
			case 2:
				int numA = scanner.nextInt();
				int numB = scanner.nextInt();
				System.out.println(numA + numB);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_B() {
		Scanner scanner = null;
		int numN = 0;
		int numT = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			numT = scanner.nextInt();

			int[] costArray = new int[numN];
			int[] timeArray = new int[numN];
			int minCost = Integer.MAX_VALUE;
			for (int i = 0; i < numN; i++) {
				costArray[i] = scanner.nextInt();
				timeArray[i] = scanner.nextInt();
				if (numT >= timeArray[i] && minCost > costArray[i]) {
					minCost = costArray[i];
				}
			}

			if (minCost == Integer.MAX_VALUE) {
				System.out.println("TLE");
			} else {
				System.out.println(minCost);
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_C() {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_D() {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} Main public static void main(String[] args) {

		// ABC11X_A();
		ABC11X_B();
		// ABC11X_C();
		// ABC11X_D();
	} main {

		// ABC11X_A();
		ABC11X_B();
		// ABC11X_C();
		// ABC11X_D();
	} ABC11X_B() ABC11X_B String[] args args private static void ABC11X_A() {
		Scanner scanner = null;
		int nenrei = 0;

		try {
			scanner = new Scanner(System.in);
			nenrei = scanner.nextInt();

			switch (nenrei) {
			case 1:
				System.out.println("Hello World");
				break;
			case 2:
				int numA = scanner.nextInt();
				int numB = scanner.nextInt();
				System.out.println(numA + numB);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} ABC11X_A {
		Scanner scanner = null;
		int nenrei = 0;

		try {
			scanner = new Scanner(System.in);
			nenrei = scanner.nextInt();

			switch (nenrei) {
			case 1:
				System.out.println("Hello World");
				break;
			case 2:
				int numA = scanner.nextInt();
				int numB = scanner.nextInt();
				System.out.println(numA + numB);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int nenrei = 0; nenrei 0 try {
			scanner = new Scanner(System.in);
			nenrei = scanner.nextInt();

			switch (nenrei) {
			case 1:
				System.out.println("Hello World");
				break;
			case 2:
				int numA = scanner.nextInt();
				int numB = scanner.nextInt();
				System.out.println(numA + numB);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			nenrei = scanner.nextInt();

			switch (nenrei) {
			case 1:
				System.out.println("Hello World");
				break;
			case 2:
				int numA = scanner.nextInt();
				int numB = scanner.nextInt();
				System.out.println(numA + numB);
				break;
			default:
				break;
			}

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) nenrei = scanner.nextInt() nenrei scanner.nextInt() scanner.nextInt scanner switch (nenrei) {
			case 1:
				System.out.println("Hello World");
				break;
			case 2:
				int numA = scanner.nextInt();
				int numB = scanner.nextInt();
				System.out.println(numA + numB);
				break;
			default:
				break;
			} nenrei case 1: 1 case 1: System.out.println("Hello World") System.out.println System.out System System.out "Hello World" break; case 2: 2 case 2: int numA = scanner.nextInt(); numA scanner.nextInt() scanner.nextInt scanner int numB = scanner.nextInt(); numB scanner.nextInt() scanner.nextInt scanner System.out.println(numA + numB) System.out.println System.out System System.out numA + numB numA numB break; default: default: break; private static void ABC11X_B() {
		Scanner scanner = null;
		int numN = 0;
		int numT = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			numT = scanner.nextInt();

			int[] costArray = new int[numN];
			int[] timeArray = new int[numN];
			int minCost = Integer.MAX_VALUE;
			for (int i = 0; i < numN; i++) {
				costArray[i] = scanner.nextInt();
				timeArray[i] = scanner.nextInt();
				if (numT >= timeArray[i] && minCost > costArray[i]) {
					minCost = costArray[i];
				}
			}

			if (minCost == Integer.MAX_VALUE) {
				System.out.println("TLE");
			} else {
				System.out.println(minCost);
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} ABC11X_B {
		Scanner scanner = null;
		int numN = 0;
		int numT = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			numT = scanner.nextInt();

			int[] costArray = new int[numN];
			int[] timeArray = new int[numN];
			int minCost = Integer.MAX_VALUE;
			for (int i = 0; i < numN; i++) {
				costArray[i] = scanner.nextInt();
				timeArray[i] = scanner.nextInt();
				if (numT >= timeArray[i] && minCost > costArray[i]) {
					minCost = costArray[i];
				}
			}

			if (minCost == Integer.MAX_VALUE) {
				System.out.println("TLE");
			} else {
				System.out.println(minCost);
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int numN = 0; numN 0 int numT = 0; numT 0 try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			numT = scanner.nextInt();

			int[] costArray = new int[numN];
			int[] timeArray = new int[numN];
			int minCost = Integer.MAX_VALUE;
			for (int i = 0; i < numN; i++) {
				costArray[i] = scanner.nextInt();
				timeArray[i] = scanner.nextInt();
				if (numT >= timeArray[i] && minCost > costArray[i]) {
					minCost = costArray[i];
				}
			}

			if (minCost == Integer.MAX_VALUE) {
				System.out.println("TLE");
			} else {
				System.out.println(minCost);
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			numT = scanner.nextInt();

			int[] costArray = new int[numN];
			int[] timeArray = new int[numN];
			int minCost = Integer.MAX_VALUE;
			for (int i = 0; i < numN; i++) {
				costArray[i] = scanner.nextInt();
				timeArray[i] = scanner.nextInt();
				if (numT >= timeArray[i] && minCost > costArray[i]) {
					minCost = costArray[i];
				}
			}

			if (minCost == Integer.MAX_VALUE) {
				System.out.println("TLE");
			} else {
				System.out.println(minCost);
			}

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numN = scanner.nextInt() numN scanner.nextInt() scanner.nextInt scanner numT = scanner.nextInt() numT scanner.nextInt() scanner.nextInt scanner int[] costArray = new int[numN]; costArray new int[numN] numN int[] timeArray = new int[numN]; timeArray new int[numN] numN int minCost = Integer.MAX_VALUE; minCost Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0; i < numN; i++) {
				costArray[i] = scanner.nextInt();
				timeArray[i] = scanner.nextInt();
				if (numT >= timeArray[i] && minCost > costArray[i]) {
					minCost = costArray[i];
				}
			} int i = 0; int i = 0; i 0 i < numN i numN i++ i++ i {
				costArray[i] = scanner.nextInt();
				timeArray[i] = scanner.nextInt();
				if (numT >= timeArray[i] && minCost > costArray[i]) {
					minCost = costArray[i];
				}
			} {
				costArray[i] = scanner.nextInt();
				timeArray[i] = scanner.nextInt();
				if (numT >= timeArray[i] && minCost > costArray[i]) {
					minCost = costArray[i];
				}
			} costArray[i] = scanner.nextInt() costArray[i] costArray i scanner.nextInt() scanner.nextInt scanner timeArray[i] = scanner.nextInt() timeArray[i] timeArray i scanner.nextInt() scanner.nextInt scanner if (numT >= timeArray[i] && minCost > costArray[i]) {
					minCost = costArray[i];
				} numT >= timeArray[i] && minCost > costArray[i] numT >= timeArray[i] numT timeArray[i] timeArray i minCost > costArray[i] minCost costArray[i] costArray i {
					minCost = costArray[i];
				} minCost = costArray[i] minCost costArray[i] costArray i 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 private static void ABC11X_C() {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} ABC11X_C {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int lineAB = 0; lineAB 0 try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) lineAB = scanner.nextInt() lineAB scanner.nextInt() scanner.nextInt scanner System.out.println() System.out.println System.out System System.out private static void ABC11X_D() {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} ABC11X_D {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int lineAB = 0; lineAB 0 try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) lineAB = scanner.nextInt() lineAB scanner.nextInt() scanner.nextInt scanner System.out.println() System.out.println System.out System System.out public class Main {

	public static void main(String[] args) {

		// ABC11X_A();
		ABC11X_B();
		// ABC11X_C();
		// ABC11X_D();
	}

	private static void ABC11X_A() {
		Scanner scanner = null;
		int nenrei = 0;

		try {
			scanner = new Scanner(System.in);
			nenrei = scanner.nextInt();

			switch (nenrei) {
			case 1:
				System.out.println("Hello World");
				break;
			case 2:
				int numA = scanner.nextInt();
				int numB = scanner.nextInt();
				System.out.println(numA + numB);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_B() {
		Scanner scanner = null;
		int numN = 0;
		int numT = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			numT = scanner.nextInt();

			int[] costArray = new int[numN];
			int[] timeArray = new int[numN];
			int minCost = Integer.MAX_VALUE;
			for (int i = 0; i < numN; i++) {
				costArray[i] = scanner.nextInt();
				timeArray[i] = scanner.nextInt();
				if (numT >= timeArray[i] && minCost > costArray[i]) {
					minCost = costArray[i];
				}
			}

			if (minCost == Integer.MAX_VALUE) {
				System.out.println("TLE");
			} else {
				System.out.println(minCost);
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_C() {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_D() {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} public class Main {

	public static void main(String[] args) {

		// ABC11X_A();
		ABC11X_B();
		// ABC11X_C();
		// ABC11X_D();
	}

	private static void ABC11X_A() {
		Scanner scanner = null;
		int nenrei = 0;

		try {
			scanner = new Scanner(System.in);
			nenrei = scanner.nextInt();

			switch (nenrei) {
			case 1:
				System.out.println("Hello World");
				break;
			case 2:
				int numA = scanner.nextInt();
				int numB = scanner.nextInt();
				System.out.println(numA + numB);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_B() {
		Scanner scanner = null;
		int numN = 0;
		int numT = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			numT = scanner.nextInt();

			int[] costArray = new int[numN];
			int[] timeArray = new int[numN];
			int minCost = Integer.MAX_VALUE;
			for (int i = 0; i < numN; i++) {
				costArray[i] = scanner.nextInt();
				timeArray[i] = scanner.nextInt();
				if (numT >= timeArray[i] && minCost > costArray[i]) {
					minCost = costArray[i];
				}
			}

			if (minCost == Integer.MAX_VALUE) {
				System.out.println("TLE");
			} else {
				System.out.println(minCost);
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_C() {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_D() {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		// ABC11X_A();
		ABC11X_B();
		// ABC11X_C();
		// ABC11X_D();
	}

	private static void ABC11X_A() {
		Scanner scanner = null;
		int nenrei = 0;

		try {
			scanner = new Scanner(System.in);
			nenrei = scanner.nextInt();

			switch (nenrei) {
			case 1:
				System.out.println("Hello World");
				break;
			case 2:
				int numA = scanner.nextInt();
				int numB = scanner.nextInt();
				System.out.println(numA + numB);
				break;
			default:
				break;
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_B() {
		Scanner scanner = null;
		int numN = 0;
		int numT = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();
			numT = scanner.nextInt();

			int[] costArray = new int[numN];
			int[] timeArray = new int[numN];
			int minCost = Integer.MAX_VALUE;
			for (int i = 0; i < numN; i++) {
				costArray[i] = scanner.nextInt();
				timeArray[i] = scanner.nextInt();
				if (numT >= timeArray[i] && minCost > costArray[i]) {
					minCost = costArray[i];
				}
			}

			if (minCost == Integer.MAX_VALUE) {
				System.out.println("TLE");
			} else {
				System.out.println(minCost);
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_C() {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private static void ABC11X_D() {
		Scanner scanner = null;
		int lineAB = 0;

		try {
			scanner = new Scanner(System.in);
			lineAB = scanner.nextInt();

			System.out.println();

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
}