program read
implicit none
integer N, K, cnt_num, num_max, num, num_2, num_3
integer,dimension(2*10**9) :: A, B, C
read *, N, K, A(N)
cnt_num = 0
num_max = N*(N - 1)/2
do num = 1, N - 1, 1
	do num_2 = num + 1, N, 1
    	cnt_num = cnt_num + 1
		B(cnt_num) = A(num) * A(num_2)
    end do
end do   

do num_3 = 1, num_max, 1
	if ( B(num_3) < B(num_3+1) ) then
		C(num_3) = B(num_3)
	else
		C(num_3) = B(num_3 + 1)
	end if
end do

print *, C(K)

end program read