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 cost[] = new int[n];
		int time[] = new int[n];
		for (int i = 0; i < n; i++) {
			cost[i] = sc.nextInt();
			time[i] = sc.nextInt();
		}
		int ans = getMinCostKeiro(n, t, cost, time);
		if (ans == 1001)
			System.out.println("TLE");
		else
			System.out.println(ans);
	}

	public static int getMinCostKeiro(int n, int t, int[] cost, int[] time) {
		int minCostKeiro = 1001;
		for (int i = 0; i < n; i++) {
			if (cost[i] < minCostKeiro && time[i] <= t)
				minCostKeiro = cost[i];
		}
		return minCostKeiro;
	}
} 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 cost[] = new int[n];
		int time[] = new int[n];
		for (int i = 0; i < n; i++) {
			cost[i] = sc.nextInt();
			time[i] = sc.nextInt();
		}
		int ans = getMinCostKeiro(n, t, cost, time);
		if (ans == 1001)
			System.out.println("TLE");
		else
			System.out.println(ans);
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int t = sc.nextInt();
		int cost[] = new int[n];
		int time[] = new int[n];
		for (int i = 0; i < n; i++) {
			cost[i] = sc.nextInt();
			time[i] = sc.nextInt();
		}
		int ans = getMinCostKeiro(n, t, cost, time);
		if (ans == 1001)
			System.out.println("TLE");
		else
			System.out.println(ans);
	}

	public static int getMinCostKeiro(int n, int t, int[] cost, int[] time) {
		int minCostKeiro = 1001;
		for (int i = 0; i < n; i++) {
			if (cost[i] < minCostKeiro && time[i] <= t)
				minCostKeiro = cost[i];
		}
		return minCostKeiro;
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int t = sc.nextInt();
		int cost[] = new int[n];
		int time[] = new int[n];
		for (int i = 0; i < n; i++) {
			cost[i] = sc.nextInt();
			time[i] = sc.nextInt();
		}
		int ans = getMinCostKeiro(n, t, cost, time);
		if (ans == 1001)
			System.out.println("TLE");
		else
			System.out.println(ans);
	}

	public static int getMinCostKeiro(int n, int t, int[] cost, int[] time) {
		int minCostKeiro = 1001;
		for (int i = 0; i < n; i++) {
			if (cost[i] < minCostKeiro && time[i] <= t)
				minCostKeiro = cost[i];
		}
		return minCostKeiro;
	}
} 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 cost[] = new int[n];
		int time[] = new int[n];
		for (int i = 0; i < n; i++) {
			cost[i] = sc.nextInt();
			time[i] = sc.nextInt();
		}
		int ans = getMinCostKeiro(n, t, cost, time);
		if (ans == 1001)
			System.out.println("TLE");
		else
			System.out.println(ans);
	}

	public static int getMinCostKeiro(int n, int t, int[] cost, int[] time) {
		int minCostKeiro = 1001;
		for (int i = 0; i < n; i++) {
			if (cost[i] < minCostKeiro && time[i] <= t)
				minCostKeiro = cost[i];
		}
		return minCostKeiro;
	}
}