program main
implicit None
	integer::n,tm,i,a
	integer,allocatable::c(:),t(:)
	
	read *,n,tm
	
	allocate(c(n))
	allocate(t(n))
	
	do i = 1,n
		read *,c(i),t(i)
	enddo
	
	a = 1001
	
	do i = 1,n
		if(c(i) <= a)then
			if(t(i) <= tm)then
				a = c(i)
			endif
		endif
	enddo
	
	if (a == 1001)then
		print 101,"TLE"
		else
		print 102,a
	endif
	
101 format(a)
102 format(i0)
end program main