object Main extends App{
  val sc = new java.util.Scanner(System.in)
  val N,T= sc.nextInt
  val list = (1 to N).map(i=>(sc.nextInt,sc.nextInt)).filter(i=>i._2<=T)
  val ans = if(list == Nil){"TLE"}else{list.map(i=>i._1).min}
  println(ans)
}

