import scala.io.StdIn._
import scala.math._

/**
 * ABC112B
 */
object Main extends App {

  val in = readLine().split(" ").toSeq.map(_.toInt)
  val n = in(0)
  val tr = in(1)

  val c = (0 until n)
    .map(_ => readLine().split(" ").toSeq.map(_.toInt))
    .filter(_(1) <= tr)

  val ans = if (c.isEmpty) "TLE" else c.map(_(0)).min.toString

  println(ans)

}


    