import Control.Monad

main :: IO ()
main = do
  [n,t] <- getInts
  xs <- replicateM n $ do
          [c,t] <- getInts
          return (c,t)
  putStrLn $ maybe "TLE" show $ solve t xs

getInts :: IO [Int]
getInts = map read . words <$> getLine

solve :: Int -> [(Int,Int)] -> Maybe Int
solve t xs = case [c | (c,t') <- xs, t' <= t] of
              [] -> Nothing
              ys -> Just $ minimum ys

