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

c = [0] * n

t = [0] * n

for i in range(n):

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

intime = []

for i in range(n):

    if t[i] <= limit:

        intime.append(i)

minn = 100000

for i in intime:

    if c[i] < minn:

        minn = c[i]

if intime == []:

    print('TLE')

else:

    print(minn)
n, time = list(map(int, input().split()))

path = [tuple(map(int, input().split())) for _ in range(n)]

mincost = 10 ** 9

for c, t in path:

    if t <= time:

        mincost = min(mincost, c)

if mincost == 10 ** 9:

    print('TLE')

else:

    print(mincost)
n, limit = list(map(int, input().split()))
c = [0] * n
t = [0] * n
for i in range(n):
    c[i], t[i] = list(map(int, input().split()))
intime = []
for i in range(n):
    if t[i] <= limit:
        intime.append(i)
minn = 100000
for i in intime:
    if c[i] < minn:
        minn = c[i]
if intime == []:
    print("TLE")
else:
    print(minn)

n, time = list(map(int, input().split()))
path = [tuple(map(int, input().split())) for _ in range(n)]
mincost = 10**9
for c, t in path:
    if t <= time:
        mincost = min(mincost, c)
if mincost == 10**9:
    print("TLE")
else:
    print(mincost)

-n, limit = list(map(int, input().split())) -c = [0] * n -t = [0] * n -for i in range(n): -    c[i], t[i] = list(map(int, input().split())) -intime = [] -for i in range(n): -    if t[i] <= limit: -        intime.append(i) -minn = 100000 -for i in intime: -    if c[i] < minn: -        minn = c[i] -if intime == []: +n, time = list(map(int, input().split())) +path = [tuple(map(int, input().split())) for _ in range(n)] +mincost = 10**9 +for c, t in path: +    if t <= time: +        mincost = min(mincost, c) +if mincost == 10**9: -    print(minn) +    print(mincost)