N , T = map(int,(input().split()))
s=[]
for i in range (N) :
    s.append(tuple(map(int,input().split())))
min_cost=s[0][0]
l=0
for i in range (len(s)):
    if s[i][0] <= min_cost:
        if s[i][1] <= T:
            min_cost=s[i][0]
    l+=1
    if l == len (s):
        print(min_cost)

t=0
for i in range(len(s)):
    if s[i][1] >= T:
        t+=1
    if t==len(s):
        print('TLE')