a, b = list(map(int,input().split()))

list1=[]

list2=[]

for i in range (a):

     x,y=list(map (int,input().split()))

     list1.append(x)

     list2.append(y)

mini= 0x3f3f3f3f

for i in range (a) :

    if list1[i] < mini and list2[i] <= b :

        mini=list1[i]



if (mini!= 0x3f3f3f3f):

    print(mini)

else :

    print ("TLE")



N,T= [int(x) for x in input().split()]

c=0

t=0

z=0

x=0

mini=0

lcost=[]

ltime=[]

cost=[]

time=[]

for i in range(N):

    c,t=[int(x) for x in input().split()]

    cost.append(c)

    time.append(t)

for i in time:

    z+=1

    if i <= T:

        ltime.append(i)

        lcost.append(cost[z-1])



if ltime==[] and lcost==[]:

    print("TLE")

else:

    

    for i in lcost:

        if x==0:

           mini=i

           x+=1

        if i < mini:

           mini=i

    print(mini)
a, b = list(map(int, input().split()))
list1 = []
list2 = []
for i in range(a):
    x, y = list(map(int, input().split()))
    list1.append(x)
    list2.append(y)
mini = 0x3F3F3F3F
for i in range(a):
    if list1[i] < mini and list2[i] <= b:
        mini = list1[i]
if mini != 0x3F3F3F3F:
    print(mini)
else:
    print("TLE")

N, T = [int(x) for x in input().split()]
c = 0
t = 0
z = 0
x = 0
mini = 0
lcost = []
ltime = []
cost = []
time = []
for i in range(N):
    c, t = [int(x) for x in input().split()]
    cost.append(c)
    time.append(t)
for i in time:
    z += 1
    if i <= T:
        ltime.append(i)
        lcost.append(cost[z - 1])
if ltime == [] and lcost == []:
    print("TLE")
else:
    for i in lcost:
        if x == 0:
            mini = i
            x += 1
        if i < mini:
            mini = i
    print(mini)

-a, b = list(map(int, input().split())) -list1 = [] -list2 = [] -for i in range(a): -    x, y = list(map(int, input().split())) -    list1.append(x) -    list2.append(y) -mini = 0x3F3F3F3F -for i in range(a): -    if list1[i] < mini and list2[i] <= b: -        mini = list1[i] -if mini != 0x3F3F3F3F: +N, T = [int(x) for x in input().split()] +c = 0 +t = 0 +z = 0 +x = 0 +mini = 0 +lcost = [] +ltime = [] +cost = [] +time = [] +for i in range(N): +    c, t = [int(x) for x in input().split()] +    cost.append(c) +    time.append(t) +for i in time: +    z += 1 +    if i <= T: +        ltime.append(i) +        lcost.append(cost[z - 1]) +if ltime == [] and lcost == []: +    print("TLE") +else: +    for i in lcost: +        if x == 0: +            mini = i +            x += 1 +        if i < mini: +            mini = i -else: -    print("TLE")