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

plus = []

minus = []

zero = 0

for i in map(int, input().split()):

    if i > 0:

        plus.append(i)

    elif i < 0:

        minus.append(i)

    else:

        zero += 1

plus.sort()

minus.sort(reverse=True)





# [ok, ng) - Maximum

# (ng, ok] - Minimum

# ok が 最終的な答え

ok, ng = -10 ** 19, 10 ** 19

while abs(ok - ng) > 1:

    mid = (ok + ng) // 2

    cnt = 0

    if mid >= 0:

        cnt += len(plus) * len(minus)

        if mid > 0:

            cnt += zero * (zero - 1) // 2 + zero * (N - zero)

            for a in (plus, minus):

                l, r = 0, len(a) - 1

                while l < r:

                    while l < r and a[l] * a[r] >= mid:

                        r -= 1

                    cnt += r - l

                    l += 1

    else:

        r = len(minus) - 1

        for l in range(len(plus)):

            while r >= 0 and plus[l] * minus[r] < mid:

                r -= 1

            cnt += len(minus) - (r + 1)



    if cnt < K:

        ok = mid

    else:

        ng = mid



print(ok)

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

plus = []

minus = []

zero = 0

for i in map(int, input().split()):

    if i > 0:

        plus.append(i)

    elif i < 0:

        minus.append(i)

    else:

        zero += 1

plus.sort()

minus.sort(reverse=True)





def solve(mid):

    global N, K, zero

    cnt = 0

    if mid >= 0:

        cnt += len(plus) * len(minus)

        if mid > 0:

            cnt += zero * (zero - 1) // 2 + zero * (N - zero)

            for L in (plus, minus):

                l, r = 0, len(L) - 1

                while l < r:

                    while l < r and L[l] * L[r] >= mid:

                        r -= 1

                    cnt += r - l

                    l += 1

    else:

        r = len(minus) - 1

        for l in range(len(plus)):

            while r >= 0 and plus[l] * minus[r] < mid:

                r -= 1

            cnt += len(minus) - (r + 1)

    return cnt < K





# [ok, ng) - Maximum

# (ng, ok] - Minimum

# ok が 最終的な答え

ok, ng = -10 ** 19, 10 ** 19

while abs(ok - ng) > 1:

    mid = (ok + ng) // 2

    if solve(mid):

        ok = mid

    else:

        ng = mid



print(ok)

N, K = list(map(int, input().split()))
plus = []
minus = []
zero = 0
for i in map(int, input().split()):
    if i > 0:
        plus.append(i)
    elif i < 0:
        minus.append(i)
    else:
        zero += 1
plus.sort()
minus.sort(reverse=True)
# [ok, ng) - Maximum
# (ng, ok] - Minimum
# ok が 最終的な答え
ok, ng = -(10**19), 10**19
while abs(ok - ng) > 1:
    mid = (ok + ng) // 2
    cnt = 0
    if mid >= 0:
        cnt += len(plus) * len(minus)
        if mid > 0:
            cnt += zero * (zero - 1) // 2 + zero * (N - zero)
            for a in (plus, minus):
                l, r = 0, len(a) - 1
                while l < r:
                    while l < r and a[l] * a[r] >= mid:
                        r -= 1
                    cnt += r - l
                    l += 1
    else:
        r = len(minus) - 1
        for l in range(len(plus)):
            while r >= 0 and plus[l] * minus[r] < mid:
                r -= 1
            cnt += len(minus) - (r + 1)
    if cnt < K:
        ok = mid
    else:
        ng = mid
print(ok)

N, K = list(map(int, input().split()))
plus = []
minus = []
zero = 0
for i in map(int, input().split()):
    if i > 0:
        plus.append(i)
    elif i < 0:
        minus.append(i)
    else:
        zero += 1
plus.sort()
minus.sort(reverse=True)


def solve(mid):
    global N, K, zero
    cnt = 0
    if mid >= 0:
        cnt += len(plus) * len(minus)
        if mid > 0:
            cnt += zero * (zero - 1) // 2 + zero * (N - zero)
            for L in (plus, minus):
                l, r = 0, len(L) - 1
                while l < r:
                    while l < r and L[l] * L[r] >= mid:
                        r -= 1
                    cnt += r - l
                    l += 1
    else:
        r = len(minus) - 1
        for l in range(len(plus)):
            while r >= 0 and plus[l] * minus[r] < mid:
                r -= 1
            cnt += len(minus) - (r + 1)
    return cnt < K


# [ok, ng) - Maximum
# (ng, ok] - Minimum
# ok が 最終的な答え
ok, ng = -(10**19), 10**19
while abs(ok - ng) > 1:
    mid = (ok + ng) // 2
    if solve(mid):
        ok = mid
    else:
        ng = mid
print(ok)

-# [ok, ng) - Maximum -# (ng, ok] - Minimum -# ok が 最終的な答え -ok, ng = -(10**19), 10**19 -while abs(ok - ng) > 1: -    mid = (ok + ng) // 2 + + +def solve(mid): +    global N, K, zero -            for a in (plus, minus): -                l, r = 0, len(a) - 1 +            for L in (plus, minus): +                l, r = 0, len(L) - 1 -                    while l < r and a[l] * a[r] >= mid: +                    while l < r and L[l] * L[r] >= mid: -    if cnt < K: +    return cnt < K + + +# [ok, ng) - Maximum +# (ng, ok] - Minimum +# ok が 最終的な答え +ok, ng = -(10**19), 10**19 +while abs(ok - ng) > 1: +    mid = (ok + ng) // 2 +    if solve(mid):