### BUGGY CODE ###

import sys
import bisect
input = sys.stdin.readline

def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))

    minus, plus, zero = [], [], 0
    for i in range(n):
        if a[i] < 0:
            minus.append(a[i])
        elif a[i] > 0:
            plus.append(a[i])
        else:
            zero += 1
    
    minus_count = len(minus) * len(plus)
    zero_count = zero * (zero - 1) // 2 + zero * (len(minus) + len(plus))

    minus.sort()
    plus.sort()

    if k <= minus_count:
        l, r = -int(1e18), 0
        while r-l > 1:
            value = (r + l) // 2
            count = 0
            for v in minus:
                border = 0
                while border < len(plus) and v * plus[len(plus)-border-1] <= value:
                    border += 1 
                count += border

            if count >= k:
                r = value
            else:
                l = value

        ans = r

    elif k <= zero_count + minus_count:
        ans = 0
        
    else:
        l, r = 0, int(1e18)
        count_default = minus_count + zero_count
        while r-l > 1:
            value = (r + l) // 2
            count = 0
            
            border = 0
            for v in minus:
                while border < len(minus) and v * minus[-border-1] <= value:
                    border += 1
                count += border
                if border > 0 and v >= minus[-border]:
                    count -= 1
            
            border = 0
            for v in plus:
                while border < len(plus) and v * plus[-border-1] > value:
                    border += 1
                count += len(plus) - border
                if border < len(plus) and v <= plus[-border-1]:
                    count -= 1

            count //= 2
            count += count_default

            if count >= k:
                r = value
            else:
                l = value
        ans = r

    print(ans)

    
if __name__ == "__main__":
    main()



### FIXED CODE ###

import sys
import bisect
input = sys.stdin.readline

def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))

    minus, plus, zero = [], [], 0
    for i in range(n):
        if a[i] < 0:
            minus.append(a[i])
        elif a[i] > 0:
            plus.append(a[i])
        else:
            zero += 1
    
    minus_count = len(minus) * len(plus)
    zero_count = zero * (zero - 1) // 2 + zero * (len(minus) + len(plus))

    minus.sort()
    plus.sort()

    if k <= minus_count:
        l, r = -int(1e18), 0
        while r-l > 1:
            value = (r + l) // 2
            count = 0
            border = 0
            for v in minus:
                while border < len(plus) and v * plus[border] > value:
                    border += 1 
                count += len(plus) - border

            if count >= k:
                r = value
            else:
                l = value

        ans = r

    elif k <= zero_count + minus_count:
        ans = 0
        
    else:
        l, r = 0, int(1e18)
        count_default = minus_count + zero_count
        while r-l > 1:
            value = (r + l) // 2
            count = 0
            
            border = 0
            for v in minus:
                while border < len(minus) and v * minus[-border-1] <= value:
                    border += 1
                count += border
                if border > 0 and v >= minus[-border]:
                    count -= 1
            
            border = 0
            for v in plus:
                while border < len(plus) and v * plus[-border-1] > value:
                    border += 1
                count += len(plus) - border
                if border < len(plus) and v <= plus[-border-1]:
                    count -= 1

            count //= 2
            count += count_default

            if count >= k:
                r = value
            else:
                l = value
        ans = r
        
    print(ans)

    
if __name__ == "__main__":
    main()