import sys

def main():

    input = sys.stdin.readline

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

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



    neg, pos, zero = list(), list(), 0

    for a in A:

        if a < 0: neg.append(a)

        elif a > 0: pos.append(a)

        else: zero += 1

    neg.sort()

    pos.sort()



    #x未満になる組み合わせの個数

    def calc(x):

        result = 0

        if x < 0:

            #負になるのは 正*負, 負*正

            i, j = len(pos)-1, len(neg)-1

            while i >= 0:

                while j >= 0 and pos[i]*neg[j] >= x: j -= 1

                if j < 0: break

                result += j + 1

                i -= 1

        elif x == 0:

            result += len(neg) * len(pos) #負

        else:

            #正*正

            i, j = 0, len(pos)-1

            while i < len(pos):

                while j >= 0 and pos[i]*pos[j] >= x: j -= 1

                if j < 0: break

                result += j + 1

                if pos[i]*pos[i] < x: result -= 1 #同じもの同士を除外

                i += 1

            #負*負

            i, j = len(neg)-1, 0

            while i >= 0:

                while j < len(neg) and neg[i]*neg[j] >= x: j += 1

                if j >= len(neg): break

                result += len(neg) - j

                if neg[i]*neg[i] < x: result -= 1 #同じもの同士を除外

                i -= 1

            result //= 2 #ペアの入れ替え分

            result += len(neg) * len(pos) #負

            result += (len(neg) + len(pos)) * zero + (zero)*(zero-1)//2 #0

        return result

    

    #二分探索

    l, over = -10**18, 10**20+1

    while over - l > 1:

        m = (l+over)//2

        if calc(m) < K: l = m

        else: over = m

    print(l)



if __name__ == '__main__':

    main()
import sys

def main():

    input = sys.stdin.readline

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

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



    neg, pos, zero = list(), list(), 0

    for a in A:

        if a < 0: neg.append(a)

        elif a > 0: pos.append(a)

        else: zero += 1

    neg.sort()

    pos.sort()



    #x未満になる組み合わせの個数

    def calc(x):

        result = 0

        if x < 0:

            #負になるのは 正*負, 負*正

            i, j = len(pos)-1, len(neg)-1

            while i >= 0:

                while j >= 0 and pos[i]*neg[j] >= x: j -= 1

                if j < 0: break

                result += j + 1

                i -= 1

        elif x == 0:

            result += len(neg) * len(pos) #負

        else:

            #正*正

            i, j = 0, len(pos)-1

            while i < len(pos):

                while j >= 0 and pos[i]*pos[j] >= x: j -= 1

                if j < 0: break

                result += j + 1

                if pos[i]*pos[i] < x: result -= 1 #同じもの同士を除外

                i += 1

            #負*負

            i, j = len(neg)-1, 0

            while i >= 0:

                while j < len(neg) and neg[i]*neg[j] >= x: j += 1

                if j >= len(neg): break

                result += len(neg) - j

                if neg[i]*neg[i] < x: result -= 1 #同じもの同士を除外

                i -= 1

            result //= 2 #ペアの入れ替え分

            result += len(neg) * len(pos) #負

            result += (len(neg) + len(pos)) * zero + (zero)*(zero-1)//2 #0

        return result

    

    #二分探索

    l, over = -10**18, 10**18+1

    while over - l > 1:

        m = (l+over)//2

        if calc(m) < K: l = m

        else: over = m

    print(l)



if __name__ == '__main__':

    main()
import sys


def main():
    input = sys.stdin.readline
    N, K = list(map(int, input().split()))
    A = list(map(int, input().split()))
    neg, pos, zero = list(), list(), 0
    for a in A:
        if a < 0:
            neg.append(a)
        elif a > 0:
            pos.append(a)
        else:
            zero += 1
    neg.sort()
    pos.sort()
    # x未満になる組み合わせの個数
    def calc(x):
        result = 0
        if x < 0:
            # 負になるのは 正*負, 負*正
            i, j = len(pos) - 1, len(neg) - 1
            while i >= 0:
                while j >= 0 and pos[i] * neg[j] >= x:
                    j -= 1
                if j < 0:
                    break
                result += j + 1
                i -= 1
        elif x == 0:
            result += len(neg) * len(pos)  # 負
        else:
            # 正*正
            i, j = 0, len(pos) - 1
            while i < len(pos):
                while j >= 0 and pos[i] * pos[j] >= x:
                    j -= 1
                if j < 0:
                    break
                result += j + 1
                if pos[i] * pos[i] < x:
                    result -= 1  # 同じもの同士を除外
                i += 1
            # 負*負
            i, j = len(neg) - 1, 0
            while i >= 0:
                while j < len(neg) and neg[i] * neg[j] >= x:
                    j += 1
                if j >= len(neg):
                    break
                result += len(neg) - j
                if neg[i] * neg[i] < x:
                    result -= 1  # 同じもの同士を除外
                i -= 1
            result //= 2  # ペアの入れ替え分
            result += len(neg) * len(pos)  # 負
            result += (len(neg) + len(pos)) * zero + (zero) * (zero - 1) // 2  # 0
        return result

    # 二分探索
    l, over = -(10**18), 10**20 + 1
    while over - l > 1:
        m = (l + over) // 2
        if calc(m) < K:
            l = m
        else:
            over = m
    print(l)


if __name__ == "__main__":
    main()

import sys


def main():
    input = sys.stdin.readline
    N, K = list(map(int, input().split()))
    A = list(map(int, input().split()))
    neg, pos, zero = list(), list(), 0
    for a in A:
        if a < 0:
            neg.append(a)
        elif a > 0:
            pos.append(a)
        else:
            zero += 1
    neg.sort()
    pos.sort()
    # x未満になる組み合わせの個数
    def calc(x):
        result = 0
        if x < 0:
            # 負になるのは 正*負, 負*正
            i, j = len(pos) - 1, len(neg) - 1
            while i >= 0:
                while j >= 0 and pos[i] * neg[j] >= x:
                    j -= 1
                if j < 0:
                    break
                result += j + 1
                i -= 1
        elif x == 0:
            result += len(neg) * len(pos)  # 負
        else:
            # 正*正
            i, j = 0, len(pos) - 1
            while i < len(pos):
                while j >= 0 and pos[i] * pos[j] >= x:
                    j -= 1
                if j < 0:
                    break
                result += j + 1
                if pos[i] * pos[i] < x:
                    result -= 1  # 同じもの同士を除外
                i += 1
            # 負*負
            i, j = len(neg) - 1, 0
            while i >= 0:
                while j < len(neg) and neg[i] * neg[j] >= x:
                    j += 1
                if j >= len(neg):
                    break
                result += len(neg) - j
                if neg[i] * neg[i] < x:
                    result -= 1  # 同じもの同士を除外
                i -= 1
            result //= 2  # ペアの入れ替え分
            result += len(neg) * len(pos)  # 負
            result += (len(neg) + len(pos)) * zero + (zero) * (zero - 1) // 2  # 0
        return result

    # 二分探索
    l, over = -(10**18), 10**18 + 1
    while over - l > 1:
        m = (l + over) // 2
        if calc(m) < K:
            l = m
        else:
            over = m
    print(l)


if __name__ == "__main__":
    main()

-    l, over = -(10**18), 10**20 + 1 +    l, over = -(10**18), 10**18 + 1