function split(s,delim)
         local a = {}
         local pat = "(.-)" .. delim .. "()"
         local lastPos
         for w,z in string.gmatch(s, pat) do
             table.insert(a, w);
             lastPos=z
         end
         table.insert(a, string.sub(s, lastPos));
         return a
end



e1 = io.read()
e2 = split(e1," ")
N = tonumber(e2[1])
T = tonumber(e2[2])

max = 2000
ans = max
cnt = 0
while cnt < N do
      e3 = io.read()
      e4 = split(e3," ")
      c = tonumber(e4[1])
      t = tonumber(e4[2])
      if t <= T and c <= ans then
         ans = c
      end
      cnt = cnt + 1
end

if ans >= max then
  print("TLE")
else
  print(ans)
end
