private fun readInts() = readLine()!!.split(" ").map { it.toInt() }.toList()

fun main(args: Array<String>) {
    val (N, T) = readInts()
    val st = (0 until N).map { readInts() }

    println(st.asSequence().map { it[0] to it[1] }.filter { it.second <= T }.minBy { it.first }?.first ?: "TLE")
}