object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val N, T = sc.nextInt()
  val min = List
    .fill(N)(sc.nextInt() -> sc.nextInt())
    .filter(_._2 <= T)
    .minByOption(_._1)
  println(min.map(_._1).getOrElse("TLE"))
}
