fun main(args: Array<String>) {

    // input
    val (N, T) = readLine()!!.split(" ")
            .map { s -> s.toInt() }

    var minCost = Int.MAX_VALUE
    var minTime = T
    var isPathExist = false
    for (i in 1..N) {
        val (cost, time) = readLine()!!.split(" ")
                .map { s -> s.toInt() }
        if (time <= minTime && cost < minCost) {
            minCost = cost
            isPathExist = true
        }
    }
    if (isPathExist) {
        println(minCost)
    } else {
        println("TLE")
    }

}