program time_limit_exceeded
  implicit none
  integer :: n, l, c, t, i, a = 1001
  read(*,*) n, l
  do i = 1, n
    read(*,*) c, t
    if (t <= l) a = min(a,c)
  end do
  if (a == 1001) then
    write(*,'(a)') "TLE"
  else
    write(*,'(i0)') a
  end if
end program time_limit_exceeded