### BUGGY CODE ###

# 解説放送の改変
# aを負0正に分けて処理

def main():
    from bisect import bisect_left

    def bs_kth_lt_0():
        inf = 10 ** 18 + 1

        def negative(e):
            ok, ng = len(p), -1
            while abs(ng - ok) > 1:
                mid = (ng + ok) // 2
                if p[mid] * e > -cand:
                    ok = mid
                else:
                    ng = mid
            return len(p) - ok
            # [ok,n)の区間が
            # a[ok] * e < cand を満たす
            # 区間の長さ n - ok = 積がcand未満という条件を満たす候補数になる
            # 同じもの同士のペアやペアの二重計上があるので、あとで減らす

        ok, ng = -inf, 0
        while abs(ng - ok) > 1:
            cand = (ng + ok) // 2
            tot = sum(negative(e) for e in m)
            if tot < k:
                ok = cand
            else:
                ng = cand
        return ok

    def bs_kth_gt_0():
        inf = 10 ** 18 + 1

        def positive(e, lis):
            ok, ng = -1, len(lis)
            while abs(ng - ok) > 1:
                mid = (ng + ok) // 2
                if lis[mid] * e < cand:
                    ok = mid
                else:
                    ng = mid
            return ok + 1
            # [0,ok]の区間が
            # a[ok] * e < cand を満たす
            # ok は 0-indexed なので 1-indexed に直すと、
            # 区間の長さ = 積がcand未満という条件を満たす候補数になる
            # 同じもの同士のペアやペアの二重計上があるので、あとで減らす

        def is_ok(cand):
            tot = 0
            for lis in (m, p):
                for e in lis:
                    tot += positive(e, lis)
                    if e * e < cand:
                        tot -= 1  # 同じもの同士のペアを減らす
            tot //= 2  # (1,2),(2,1)のような同一ペアの二重計上を減らす
            return tot < k

        ok, ng = 0, inf
        while abs(ng - ok) > 1:
            cand = (ng + ok) // 2
            if is_ok(cand):
                ok = cand
            else:
                ng = cand
        return ok

    n, k = map(int, input().split())
    *a, = sorted(map(int, input().split()))

    i = bisect_left(a, 0)
    j = bisect_left(a, 1)
    m, z, p = a[:i], a[i:j], a[j:]

    *m, = sorted(-x for x in m)  # 正に符号変換して昇順ソート

    cnt_m = len(m) * len(p)
    cnt_z = len(z) * (len(z) - 1) // 2 + len(z) * (n - len(z))

    if k <= cnt_m:
        # k番目の値は負
        ans = bs_kth_lt_0()
        print(ans)
        return

    elif k <= cnt_m + cnt_z:
        # k番目の値は0
        print(0)
        return
    else:
        # k番目の値は正
        k -= cnt_m + cnt_z  # 正の値の中での順位に直す

        ans = bs_kth_gt_0()
        print(ans)
        return


if __name__ == '__main__':
    main()


### FIXED CODE ###

# https://maspypy.com/atcoder-%E5%8F%82%E5%8A%A0%E6%84%9F%E6%83%B3-2019-02-16abc-155#toc3
# https://atcoder.jp/contests/abc155/submissions/10152895
# 写経


# 条件を満たす要素を抽出
# ndarray[条件式]

def binary_search(*, ok, ng, func):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if func(mid):
            ok = mid
        else:
            ng = mid
    return ok


def main():
    import sys
    import numpy as np

    inf = 10 ** 18 + 1
    input = sys.stdin.readline

    N, K = map(int, input().split())
    A = np.array(input().split(), dtype=np.int64)

    A.sort()

    zero = A[A == 0]
    pos = A[A > 0]
    neg = A[A < 0]

    def count(x):
        """
        定数cに対して Ai*Aj<=c となる(i,j)の数え上げ
        順序制約 i<j -> 順序制約のない(i,j)からi==jの場合の個数を引いて2で割る
        iを固定して a=Ai とする
        a=0
            ax=0(<=c?),解なしまたは任意のx
        a>0
            ax<=c
            <-> x<=c/a
            <-> x<=c//a
        a<0
            ax<=c
            <-> (-a)x>=(-c)

            否定をとり,aの対候補全体=Nから引く

            (-a)x<(-c)
            <-> (-a)x<=(-c-1)
            <-> x<=(-c-1)//(-a)
        """
        cnt = 0
        if x >= 0:
            cnt += zero.size * N  # (a:=0)*v<=x
        cnt += np.searchsorted(a=A, v=x // pos, side='right').sum()  # (a:>0)*v<=x
        cnt += (N - np.searchsorted(a=A, v=(-x - 1) // (-neg), side='right')).sum()  # (a:<0)*v<=x
        cnt -= ((A * A) <= x).sum()  # i==j
        assert cnt % 2 == 0
        return cnt // 2

    ans = binary_search(
        ng=-inf,
        ok=inf,
        func=lambda x: count(x) >= K
    )

    print(ans)


if __name__ == '__main__':
    main()