program tle
  implicit none
  integer :: n, t
  integer :: ci, ti
  integer :: i, min
  read(*,*) n, t
  min = 1001
  do i = 1, n
     read(*,*) ci, ti
     if (ti .le. t .and. ci .lt. min) min = ci
  end do
  if (min .ne. 1001) then
     write(*,'(i0)') min
  else
     write(*,'(a)') "TLE"
  end if
  stop
end program tle