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

ww=[]

min=x[1]

flag=0

min2=100000





for i in range(x[0]):

    ww.append([])

    ww[i] = list(map(int, input().split()))

    if ww[i][1]<=min:

        if ww[i][0]<min2:

            min2=ww[i][0]







    else:

       flag+=1

if flag== x[0]:

    print("TLE")

else:

    print(min2)

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

l =[]

for index in range(N):

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

    l .append([n,t])

ans = []

for elt in l :

    if elt[1]<=T :

        ans.append(elt[0])

if ans == []:

    print("TLE")

else:

    print((min(ans)))

x = list(map(int, input().split()))
ww = []
min = x[1]
flag = 0
min2 = 100000
for i in range(x[0]):
    ww.append([])
    ww[i] = list(map(int, input().split()))
    if ww[i][1] <= min:
        if ww[i][0] < min2:
            min2 = ww[i][0]
    else:
        flag += 1
if flag == x[0]:
    print("TLE")
else:
    print(min2)

N, T = list(map(int, input().split()))
l = []
for index in range(N):
    n, t = list(map(int, input().split()))
    l.append([n, t])
ans = []
for elt in l:
    if elt[1] <= T:
        ans.append(elt[0])
if ans == []:
    print("TLE")
else:
    print((min(ans)))

-x = list(map(int, input().split())) -ww = [] -min = x[1] -flag = 0 -min2 = 100000 -for i in range(x[0]): -    ww.append([]) -    ww[i] = list(map(int, input().split())) -    if ww[i][1] <= min: -        if ww[i][0] < min2: -            min2 = ww[i][0] -    else: -        flag += 1 -if flag == x[0]: +N, T = list(map(int, input().split())) +l = [] +for index in range(N): +    n, t = list(map(int, input().split())) +    l.append([n, t]) +ans = [] +for elt in l: +    if elt[1] <= T: +        ans.append(elt[0]) +if ans == []: -    print(min2) +    print((min(ans)))