object Main extends App {
  val Array(n, t) = readLine.split(" ").map(_.toInt)
  val cts = for (_ <- 1 to n) yield {
    val Array(c, t) = readLine.split(" ").map(_.toInt)
    (c, t)
  }

  val filteredCts = cts.filter(ct => {
    val c_ = ct._1
    val t_ = ct._2
    t_ <= t
  })
  val ans =
    if (filteredCts.isEmpty) "TLE"
    else filteredCts.minBy(ct => ct._1)._1

  println(ans)
}