import java.util.Scanner

object Main {
  def main(args: Array[String]) {
    val result = solve(new Scanner(System.in))
    if (result.length > 0) println(result)
  }

  def solve(in: String): String = solve(new Scanner(in))

  def solve(sc: Scanner): String = {
    val N = sc.nextInt
    val T = sc.nextInt
    val ct = Array.fill(N)(sc.nextInt, sc.nextInt)

    val routes = ct.filter(_._2 <= T)
    if (routes.length == 0) "TLE" else
      routes.minBy(_._1)._1.toString
  }
}
