$info1=gets.chomp.split(" ").map(&:to_i)
info2=Array.new($info1[0])
$info1[0].times do|i|
	info2[i]=gets.chomp.split(" ").map(&:to_i)
end
def mysort(_listdata)
	for i in (0..$info1[0]-1)
		indexmin=i
		for j in (i..$info1[0]-1)
			if(_listdata[j][0]<_listdata[indexmin][0])
				indexmin=j
			end
		end
			w=_listdata[i]
			_listdata[i]=_listdata[indexmin]
			_listdata[indexmin]=w
	end
	return _listdata
end
info=mysort(info2)
for i in (0..$info1[0]-1) do
	if($info1[1]>=info[i][1])
		p info[i][0]
		break
	end
	if i==$info1[0]-1
		p 'TLE'
	end
end