program ABC112B
    implicit none
    integer(8)::i
    integer(8)::N,T,ci,ti
    integer(8)::result=1100

    read(5,*)N,T

    do i=1,N
        read(5,*)ci,ti
        if(ci<result .and. ti<=T)then
            result=ci
        end if
    end do

    if(result<=1000)then
        print'(i0)',result
    else
        print'(A)',"TLE"
    end if
    
end program ABC112B