program main
  implicit none
  
  integer :: i,j,n,tt,c(100),t(100),chk=0,big = 100000,best
  
  read(*,*)n,tt
  do i = 1, n
    read(*,*)c(i),t(i)
    if (t(i) <= tt) then
      chk = 1
    end if
  end do
  if (chk == 0) then
    write(*,*)'TLE'
    stop
  end do
  
  do i = 1, n
    if (t(i) > tt) then
      cycle
    end if
    if (c(i) < big) then
      big = c(i)
      best = i
    end do
  end do
  write(*,*)best
end program main