
object Main extends App {
  import scala.io.StdIn._

  val Array(n, tLimit) = readLine.trim.split(' ').map(_.toInt)
  val routes = Array.tabulate(n){_ ⇒
    val Array(c, t) = readLine.trim.split(' ').map(_.toInt)
    (c, t)
  }
  println(
    routes.filter(_._2 <= tLimit).let(a ⇒ if (a.nonEmpty) a.minBy(_._1)._1 else "TLE")
  )
  implicit class ScopeFunc[T](value: T){
    def let[A](func: T ⇒ A): A = func(value)
    def also(func: T ⇒ Unit): T = {
      func(value)
      value
    }
  }
}