import std.stdio, std.range, std.random, std.conv, std.string;
import std.algorithm.comparison, std.algorithm.iteration, std.algorithm.mutation, std.algorithm.searching, std.algorithm.sorting;

void main()
{
    int[] input = readln().strip.split().to!(int[]);
    int N = input[0];
    int T = input[1];

    int minCost = int.max;
    foreach(i; 0..N) {
        input = readln().strip.split.to!(int[]);
        if(input[1] <= T)
        {
            minCost = min(minCost, input[0]);
        }
    }
    if(minCost == int.max)
    {
        writeln("TLE");
        return;
    }
    writeln(minCost);
}