import math



N, T = list(map(int, input().split()))



c_list = []

for i in range(N):

    c1, t1=[int(i) for i in input().split()]

    if t1 <= T:

        c_list.append(c1)



if not c_list:

    print('TLE')

else:

    print((min(c_list)))

n, T = list(map(int, input().split()))

ans = 1003

for _ in range(n):

    c, t = list(map(int, input().split()))

    if t <= T:

        ans = min(ans, c)



print(('TLE' if ans == 1003 else ans))

import math

N, T = list(map(int, input().split()))
c_list = []
for i in range(N):
    c1, t1 = [int(i) for i in input().split()]
    if t1 <= T:
        c_list.append(c1)
if not c_list:
    print("TLE")
else:
    print((min(c_list)))

n, T = list(map(int, input().split()))
ans = 1003
for _ in range(n):
    c, t = list(map(int, input().split()))
    if t <= T:
        ans = min(ans, c)
print(("TLE" if ans == 1003 else ans))

-import math - -N, T = list(map(int, input().split())) -c_list = [] -for i in range(N): -    c1, t1 = [int(i) for i in input().split()] -    if t1 <= T: -        c_list.append(c1) -if not c_list: -    print("TLE") -else: -    print((min(c_list))) +n, T = list(map(int, input().split())) +ans = 1003 +for _ in range(n): +    c, t = list(map(int, input().split())) +    if t <= T: +        ans = min(ans, c) +print(("TLE" if ans == 1003 else ans))