output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N K
      A_1 A_2 \dots A_N
attempt: from bisect import bisect_left, bisect_right
  
  n, k = [int(s) for s in input().split()]
  
  a_list = [int(s) for s in input().split()]
  a_list.sort()
  
  li = bisect_left(a_list, 0)
  ri = bisect_right(a_list, 0)
  
  a_list_1 = a_list[:li]
  a_list_1_num = len(a_list_1)
  # print(a_list_1)
  a_list_2 = a_list[li:ri]
  a_list_2_num = len(a_list_2)
  # print(a_list_2)
  a_list_3 = a_list[ri:]
  a_list_3_num = len(a_list_3)
  # print(a_list_3)
  
  ans = None
  
  temp_num = a_list_1_num * a_list_3_num
  if k > temp_num:
      k -= temp_num
  else:
      i, j = divmod(k - 1, a_list_3_num)
      ans = a_list_1[i] * a_list_3[j - 1]
  
  if ans is None:
      temp_num = int(
          a_list_2_num * (a_list_1_num + (a_list_2_num - 1) / 2 + a_list_3_num)
      )
      if k > temp_num:
          k -= temp_num
      else:
          ans = 0
  
  if ans is None:
      a_list_1 = [-num for num in a_list_1]
      a_list_1.reverse()
      # print(a_list_1)
  
      if a_list_1_num > 1:
          temp_1 = a_list_1.pop(0)
          a_list_1_num -= 1
      else:
          temp_1 = a_list_3[-1] + 1
  
      if a_list_3_num > 1:
          temp_3 = a_list_3.pop(0)
          a_list_3_num -= 1
      else:
          temp_3 = a_list_1[-1] + 1
  
      for _ in range(a_list_1_num + a_list_3_num):
          # print(k, temp_1, temp_3)
          if temp_1 < temp_3:
              if k > a_list_1_num:
                  k -= a_list_1_num
  
                  if a_list_1_num > 1:
                      temp_1 = a_list_1.pop(0)
                      a_list_1_num -= 1
                  else:
                      temp_1 = a_list_3[-1] + 1
  
                  continue
  
              ans = temp_1 * a_list_1[k - 1]
              break
          elif temp_1 > temp_3:
              if a_list_3_num == 0:
                  a_list_3.append(a_list_1[-1] + 1)
                  continue
  
              if k > a_list_3_num:
                  k -= a_list_3_num
  
                  if a_list_3_num > 1:
                      temp_3 = a_list_3.pop(0)
                      a_list_3_num -= 1
                  else:
                      temp_3 = a_list_1[-1] + 1
  
                  continue
  
              ans = temp_3 * a_list_3[k - 1]
              break
          elif temp_1 == temp_3:
              if k > a_list_1_num + a_list_3_num:
                  k -= a_list_1_num + a_list_3_num
  
                  if a_list_1_num > 1:
                      temp_1 = a_list_1.pop(0)
                      a_list_1_num -= 1
                  else:
                      temp_1 = a_list_3[-1] + 1
  
                  if a_list_3_num > 1:
                      temp_3 = a_list_3.pop(0)
                      a_list_3_num -= 1
                  else:
                      temp_3 = a_list_1[-1] + 1
  
                  continue
  
              temp_list = [temp_1 * num for num in a_list_1] + [
                  temp_3 * num for num in a_list_3
              ]
              temp_list.sort()
  
              ans = temp_list[k - 1]
              break
  
  print(ans)
  
problem_description: Statement
  
  We have N integers A_1, A_2, ..., A_N.
  
  There are \frac{N(N-1)}{2} ways to choose two of them and form a pair. If we
  compute the product of each of those pairs and sort the results in ascending
  order, what will be the K-th number in that list?
samples: [{"input": "4 3\n    3 3 -4 -2", "output": "-6\n    \n\nThere are six ways to form a pair. The products of those pairs are 9, -12, -6,\n-12, -6, 8.\n\nSorting those numbers in ascending order, we have -12, -12, -6, -6, 8, 9. The\nthird number in this list is -6.\n\n* * *"}, {"input": "10 40\n    5 4 3 2 -1 0 0 0 0 0", "output": "6\n    \n\n* * *"}, {"input": "30 413\n    -170202098 -268409015 537203564 983211703 21608710 -443999067 -937727165 -97596546 -372334013 398994917 -972141167 798607104 -949068442 -959948616 37909651 0 886627544 -20098238 0 -948955241 0 -214720580 277222296 -18897162 834475626 0 -425610555 110117526 663621752 0", "output": "448283280358331064"}]