import itertools

import math

import fractions

import functools

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

pair = []

for i in range(n):

    ci, ti = list(map(int, input().split()))

    pair.append([ci, ti])



c = 1001

for i in range(n):

    if pair[i][1] <= t:

        c = min(c,pair[i][0])



if c == 1001:

    print("TLE")

else: print(c)
import itertools

import math

import fractions

import functools

import copy



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

c= []

t = []

for i in range(N):

     ci, ti = list(map(int, input().split()))

     c.append(ci)

     t.append(ti)



cost = 10**10

for i in range(N):

    if t[i] <= T:

        cost = min(cost,c[i])

if cost == 10**10:

    print("TLE")

else:print(cost)
import itertools
import math
import fractions
import functools

n, t = list(map(int, input().split()))
pair = []
for i in range(n):
    ci, ti = list(map(int, input().split()))
    pair.append([ci, ti])
c = 1001
for i in range(n):
    if pair[i][1] <= t:
        c = min(c, pair[i][0])
if c == 1001:
    print("TLE")
else:
    print(c)

import itertools
import math
import fractions
import functools
import copy

N, T = list(map(int, input().split()))
c = []
t = []
for i in range(N):
    ci, ti = list(map(int, input().split()))
    c.append(ci)
    t.append(ti)
cost = 10**10
for i in range(N):
    if t[i] <= T:
        cost = min(cost, c[i])
if cost == 10**10:
    print("TLE")
else:
    print(cost)

+import copy -n, t = list(map(int, input().split())) -pair = [] -for i in range(n): +N, T = list(map(int, input().split())) +c = [] +t = [] +for i in range(N): -    pair.append([ci, ti]) -c = 1001 -for i in range(n): -    if pair[i][1] <= t: -        c = min(c, pair[i][0]) -if c == 1001: +    c.append(ci) +    t.append(ti) +cost = 10**10 +for i in range(N): +    if t[i] <= T: +        cost = min(cost, c[i]) +if cost == 10**10: -    print(c) +    print(cost)