fun main(args:Array<String>):Unit{
    val line1 = readLine()!!.trim().split(' ').map(String::toInt)
    val n = line1[0]
    val timeLimit = line1[1]
    var result = 1001
    for(i in 1..n){
        val line = readLine()!!.trim().split(' ').map(String::toInt)
        val c = line[0]
        val t = line[1]
        if(t<=timeLimit){
            if(c<result)result=c
        }
    }
    if(result<=1000) println(result) else println("TLE")
}