#include<stdio.h>

int main()
{
	int n, T, c, t, min = 2000;
	scanf("%d%d", &n, &T);

	for (int i = 0; i < n; ++i)
	{
		scanf("%d%d", &c, &t);
		if (t <= T && c < min)
			min = c;
	}
	if (min == 2000)
		printf("TLE\n");
	else
		printf("%d\n", min);

	return 0;
}