fun main(args: Array<String>) {
    val (N,T)= readLine()!!.split(" ").map(String::toInt)
    var minCost=1001;
    repeat(N){
        val (c,t)= readLine()!!.split(" ").map(String::toInt)
        if(t<=T && c<minCost){
            minCost=c;
        }
    }

    if(minCost!=1001) {
        println(minCost)
    }else{
        println("TLE")
    }


}