fun main(args: Array<String>) {
    val (n, t) = readLine()!!.split(" ").map(String::toInt)
    (1..n).map {
        readLine()!!.split(" ").map(String::toInt).let { if (it[1] > t) 1111 else it[0] }
    }.run { print(if (min()!! > 1000) "TLE" else min()) }
}