fun main(args: Array<String>) {
    abc112b()
}

fun abc112b() {
    val (n, time) = readLine()!!.split(" ").map { it.toInt() }
    val costTimes = (1..n).map { readLine()!!.split(" ").map { it.toInt() } }
        .map { CostTime(it[0], it[1]) }

    val answer = costTimes.filter { it.time <= time }.minBy { it.cost }?.cost

    println(answer ?: "TLE")
}

class CostTime(val cost: Int, val time: Int)