object Main extends App {
  val (_, tLimit) = readLine.split(" ").map(_.toInt) match {
    case Array(nn, tt) => (nn, tt)
  }

  val x: Int = Stream.continually(readLine)
    .takeWhile(_ != null)
    .map(_.split(" ").map(_.toInt) match { case Array(c, t) => (c, t)})
    .filter(_._2 <= tLimit)
    .foldLeft(Int.MaxValue)((acc, h) => if (acc > h._1) h._1 else acc)

  println(if (x == Int.MaxValue) "TLE" else x)
}