import java.io.{InputStream, OutputStream, PrintStream}
import java.util.Scanner

object Main {

  def main(args: Array[String]): Unit = {
    val solver = new Solver(System.in, System.out)
    solver.solve()
  }

  class Solver(in: InputStream, out: OutputStream) {
    lazy val input = new Scanner(in)

    lazy val output = new PrintStream(out)

    def solve(): Unit = {
      val Array(n, t) = input.nextLine().split(" ").map(_.toInt)
      val nts = 0.until(n).map { i =>
        val Array(ni, ti) = input.nextLine().split(" ").map(_.toInt )
        (ni, ti)
      }


      val candidates = nts.filter { case (ni, ti) => ti <= t }
      if (candidates.isEmpty) println("TLE")
      else println(candidates.map(_._1).min)
    }

  }

}
