program main
     implicit none
     integer n,time
     integer i
     integer,allocatable,dimension(:)::c,t
     integer::cmin=1000,tmax=0
     read(*,*)n,time
     allocate(c(n),t(n))
     do i=1,n
          read(*,*)c(i),t(i)
     enddo
     do i=1,n
          if(t(i)<=time .and. cmin>=c(i))cmin=c(i)
     enddo
     if(cmin/=1000)then
          write(*,"(I0)")cmin
     else
          write(*,"(A3)")"TLE"
     endif
end program main
