### BUGGY CODE ###

import bisect

N, K = map(int, input().split())
A = list(map(int, input().split()))

A.sort()
Nn = bisect.bisect_left(A, 0) # 負の数の数
Nz = bisect.bisect_left(A, 1) - Nn # 0の数
Np = N - Nn - Nz # 正の数の数
An = A[:Nn]
Ap = A[Nn+Nz:]


if Nn*Np >= K: # 答えが負の数
  left = -10**18-1 # False
  right = -1 # True
  n = Nn*Np - K # midより大きくなるのがn個より多いとmid以下のペアがK個以上にならない
  while left+1 < right:
    mid = (left+right) // 2
    i = j = 0
    c = 0
    while i < Nn and j < Np:
      if An[i]*Ap[j] > mid:
        c += 1
        j += 1
        if j >= Np:
          c += (Nn - 1 - i)*Np
      else:
        c += j
        i += 1
      if c > n:
        break
    if c > n:
      left = mid
    else:
      right = mid
  ans = right 
elif Nn*Np + Nz*(Nn+Np) + Nz*(Nz-1)//2 >= K: # 答えが0
  ans = 0
else: # 答えが正
  An = [-an for an in An][::-1]
  N = Nn*(Nn-1)//2 + Np*(Np-1)//2 # 積が正となる組合せ
  k = K - Nn*Np - Nz*(Nn+Np) - Nz*(Nz-1)//2 # 正の数の中でk番目に小さい数が答え
  n = N - k
  left = 0 # False
  right = 10**18 + 1 # True
  while left+1 < right:
    mid = (left+right) // 2
    i = 0
    j = Nn - 1
    c = 0
    while i < j:
      if An[i]*An[j] > mid:
        c += 1
        j -= 1
      else:
        c += Nn - 1 - j
        i += 1
      if i == j:
          c += (Nn-i-1)*(Nn-i-2) // 2
      if c > n:
        break
    
    if c > n:
      left = mid
    else:
      i = 0
      j = Np - 1
      while i < j:
        if Ap[i]*Ap[j] > mid:
          c += 1
          j -= 1
        else:
          c += Np - 1 - j
          i += 1
        if i == j:
            c += (Np-i-1)*(Np-i-2) // 2
        if c > n:
          break
      if c > n:
        left = mid
      else:
        right = mid
  ans = right


print(ans)

### FIXED CODE ###

import bisect

N, K = map(int, input().split())
A = list(map(int, input().split()))

A.sort()
Nn = bisect.bisect_left(A, 0) # 負の数の数
Nz = bisect.bisect_left(A, 1) - Nn # 0の数
Np = N - Nn - Nz # 正の数の数
An = A[:Nn]
Ap = A[Nn+Nz:]


if Nn*Np >= K: # 答えが負の数
  left = -10**18-1 # False
  right = -1 # True
  n = Nn*Np - K # midより大きくなるのがn個より多いとmid以下のペアがK個以上にならない
  while left+1 < right:
    mid = (left+right) // 2
    i = j = 0
    c = 0
    while i < Nn and j < Np:
      if An[i]*Ap[j] > mid:
        c += 1
        j += 1
        if j >= Np:
          c += (Nn - 1 - i)*Np
      else:
        c += j
        i += 1
      if c > n:
        break
    if c > n:
      left = mid
    else:
      right = mid
  ans = right 
elif Nn*Np + Nz*(Nn+Np) + Nz*(Nz-1)//2 >= K: # 答えが0
  ans = 0
else: # 答えが正
  An = [-an for an in An][::-1]
  N = Nn*(Nn-1)//2 + Np*(Np-1)//2 # 積が正となる組合せ
  k = K - Nn*Np - Nz*(Nn+Np) - Nz*(Nz-1)//2 # 正の数の中でk番目に小さい数が答え
  n = N - k
  left = 0 # False
  right = 10**18 + 1 # True
  while left+1 < right:
    mid = (left+right) // 2
    i = 0
    j = Nn - 1
    c = 0
    while i < j:
      if An[i]*An[j] > mid:
        c += 1
        j -= 1
      else:
        c += Nn - 1 - j
        i += 1
      if i == j:
          c += (Nn-i-1)*(Nn-i-2) // 2
      if c > n:
        break
    
    if c > n:
      left = mid
    else:
      i = 0
      j = Np - 1
      while i < j:
        if Ap[i]*Ap[j] > mid:
          c += 1
          j -= 1
        else:
          c += Np - 1 - j
          i += 1
        if i == j:
            c += (Np-i-1)*(Np-i-2) // 2
        if c > n:
          break
      if c > n:
        left = mid
      else:
        right = mid
  ans = right


print(ans)