import java.util.*

fun main(args: Array<String>) {
    val scn = Scanner(System.`in`)
    val restriction: List<Int> = scn.nextLine().split(" ").map { it -> it.toInt() }

    data class DataPoint(val cost: Int, val time: Int)

    val dataPoints: MutableList<DataPoint> = arrayListOf()
    for (i in 0..(restriction[0] - 1)) {
        val line: List<Int> = scn.nextLine().split(" ").map { it -> it.toInt() }

        dataPoints.add(DataPoint(line[0], line[1]))
    }
    val filteredCost = dataPoints.asSequence().filter {
        it.time <= restriction[1]
    }.map {
        it.cost
    }.toList()
    if (filteredCost.isEmpty()) {
        println("TLE")
    } else {
        println(filteredCost.min())
    }

}