import scala.io.{StdIn => in}

object Main extends App {
  val Array(n, t) = in.readLine.split(" ").map(_.toInt);

  val res = Iterator.continually(in.readLine)
    .take(n)
    .map(_.split(" ").map(_.toInt))
    .filter(a => a(1) <= t)
    .toArray

  val ans = if(res.nonEmpty) res.sortBy(_(0)).head(0) else "TLE"
  println(ans)
}