object Main extends App {
  val Seq(n, t) = Range(0, 2).map(_ => scala.io.StdIn.readInt)
  val cts = Range(0, n).map(_ => (scala.io.StdIn.readInt, scala.io.StdIn.readInt))
  println(cts.sorted.find(_._2 <= t).fold(_ => "TLE", _.toString))
}
