object Main extends App {
  val NT = io.StdIn.readLine.split(' ').map(_.toInt)
  val N = NT.head
  val T = NT.last
  val cts = (1 to N).map(i => io.StdIn.readLine.split(' ').map(_.toInt))

  val candidates = cts.filter(cti => cti(1) <= T)

  val out = if (candidates.isEmpty) "TLE" else candidates.map(_.head).min

  println(out)
}