import std.stdio;
import std.algorithm;
import std.conv;
import std.numeric;
import std.math;
import std.string;

void main()
{
	auto tokens = split(chomp(readln()));
	auto N = to!ulong(tokens[0]);
	auto T = to!ulong(tokens[1]);

	ulong c_min;
	c_min = ulong.max;
	foreach (i; 0..N)
	{
		auto tokens1 = split(chomp(readln()));
		auto c = to!ulong(tokens1[0]);
		auto t = to!ulong(tokens1[1]);

		if (t <= T && c < c_min)
		{
			c_min = c;
		}
	}

	if (c_min == ulong.max) writeln("TLE");
	else writeln(c_min);
	stdout.flush();
}