N, K, *A = list(map(int, open(0).read().split()))



neg = sorted([-a for a in A if a < 0])

pos = sorted([a for a in A if a >= 0])



def _count_pair_neg(x):

    x = -x

    res = 0



    MAX = len(pos)

    i = 0

    for n in reversed(neg):

        while i < MAX and n * pos[i] < x:

            i += 1

            

        res += MAX - i

    return res





def _count_pair_pos(x):

    res = 0



    # Negative list

    i = 0

    MAX = len(neg)

    for n in reversed(neg):

        if n * n <= x:

            res -= 1

            

        while i < MAX and neg[i] * n <= x:

            i += 1

        res += i

        

    # Positive list

    i = 0

    MAX = len(pos)

    for n in reversed(pos):

        if n * n <= x:

            res -= 1

            

        while i < MAX and pos[i] * n <= x:

            i += 1

        res += i

        

    # Devide by 2 for counting the same pair twice

    res //= 2

    res += len(neg) * len(pos)

    return res





def count_pair(x):

    if x < 0:

        return _count_pair_neg(x)

    

    return _count_pair_pos(x)





# Bounds

lb = 0

ub = 2 * 10 ** 18 + 2



while ub - lb > 1:

    mid = (ub + lb) // 2

    if count_pair(mid - 10 ** 18 - 1) < K:

        lb = mid

    else:

        ub = mid



print((ub - 10 ** 18 - 1))

N, K, *A = list(map(int, open(0).read().split()))



l_pos = sorted(v for v in A if v > 0)

l_neg = sorted(-v for v in A if v < 0)



cnt_pos = len(l_pos)

cnt_neg = len(l_neg)



pair_pos = cnt_pos * (cnt_pos - 1) // 2 + cnt_neg * (cnt_neg - 1) // 2

pair_neg = cnt_pos * cnt_neg

pair_zro = N * (N - 1) // 2 - pair_pos - pair_neg





def solve_neg(n):

    ub = 10 ** 18 + 1

    lb = 0

    while ub - lb > 1:

        mid = (ub + lb) // 2

        

        # Count

        n_pos = len(l_pos)

        cnt = 0

        j = 0

        for v in reversed(l_neg):

            while j < n_pos and v * l_pos[j] < mid:

                j += 1

            cnt += n_pos - j



        if cnt < n:

            ub = mid

        else:

            lb = mid



    return -lb





def solve_pos(n):

    lb = 0

    ub = 10 ** 18 + 1

    while ub - lb > 1:

        cnt = 0

        mid = (ub + lb) // 2



        # Negative count

        n_neg = len(l_neg)

        j = 0

        for v in reversed(l_neg):

            if v ** 2 <= mid:

                cnt -= 1

            while j < n_neg and v * l_neg[j] < mid:

                j += 1

            cnt += j



        # Positive count

        n_pos = len(l_pos)

        j = 0

        for v in reversed(l_pos):

            if v ** 2 <= mid:

                cnt -= 1

            while j < n_pos and v * l_pos[j] < mid:

                j += 1

            cnt += j



        # Remove duplicated counts

        cnt //= 2



        if cnt < n:

            lb = mid

        else:

            ub = mid

            

    return lb





if K <= pair_neg:

    ans = solve_neg(K)

elif K <= pair_neg + pair_zro:

    ans = 0

else:

    ans = solve_pos(K - pair_neg - pair_zro)

print(ans)

N, K, *A = list(map(int, open(0).read().split()))
neg = sorted([-a for a in A if a < 0])
pos = sorted([a for a in A if a >= 0])


def _count_pair_neg(x):
    x = -x
    res = 0
    MAX = len(pos)
    i = 0
    for n in reversed(neg):
        while i < MAX and n * pos[i] < x:
            i += 1
        res += MAX - i
    return res


def _count_pair_pos(x):
    res = 0
    # Negative list
    i = 0
    MAX = len(neg)
    for n in reversed(neg):
        if n * n <= x:
            res -= 1
        while i < MAX and neg[i] * n <= x:
            i += 1
        res += i
    # Positive list
    i = 0
    MAX = len(pos)
    for n in reversed(pos):
        if n * n <= x:
            res -= 1
        while i < MAX and pos[i] * n <= x:
            i += 1
        res += i
    # Devide by 2 for counting the same pair twice
    res //= 2
    res += len(neg) * len(pos)
    return res


def count_pair(x):
    if x < 0:
        return _count_pair_neg(x)
    return _count_pair_pos(x)


# Bounds
lb = 0
ub = 2 * 10**18 + 2
while ub - lb > 1:
    mid = (ub + lb) // 2
    if count_pair(mid - 10**18 - 1) < K:
        lb = mid
    else:
        ub = mid
print((ub - 10**18 - 1))

N, K, *A = list(map(int, open(0).read().split()))
l_pos = sorted(v for v in A if v > 0)
l_neg = sorted(-v for v in A if v < 0)
cnt_pos = len(l_pos)
cnt_neg = len(l_neg)
pair_pos = cnt_pos * (cnt_pos - 1) // 2 + cnt_neg * (cnt_neg - 1) // 2
pair_neg = cnt_pos * cnt_neg
pair_zro = N * (N - 1) // 2 - pair_pos - pair_neg


def solve_neg(n):
    ub = 10**18 + 1
    lb = 0
    while ub - lb > 1:
        mid = (ub + lb) // 2
        # Count
        n_pos = len(l_pos)
        cnt = 0
        j = 0
        for v in reversed(l_neg):
            while j < n_pos and v * l_pos[j] < mid:
                j += 1
            cnt += n_pos - j
        if cnt < n:
            ub = mid
        else:
            lb = mid
    return -lb


def solve_pos(n):
    lb = 0
    ub = 10**18 + 1
    while ub - lb > 1:
        cnt = 0
        mid = (ub + lb) // 2
        # Negative count
        n_neg = len(l_neg)
        j = 0
        for v in reversed(l_neg):
            if v**2 <= mid:
                cnt -= 1
            while j < n_neg and v * l_neg[j] < mid:
                j += 1
            cnt += j
        # Positive count
        n_pos = len(l_pos)
        j = 0
        for v in reversed(l_pos):
            if v**2 <= mid:
                cnt -= 1
            while j < n_pos and v * l_pos[j] < mid:
                j += 1
            cnt += j
        # Remove duplicated counts
        cnt //= 2
        if cnt < n:
            lb = mid
        else:
            ub = mid
    return lb


if K <= pair_neg:
    ans = solve_neg(K)
elif K <= pair_neg + pair_zro:
    ans = 0
else:
    ans = solve_pos(K - pair_neg - pair_zro)
print(ans)

-neg = sorted([-a for a in A if a < 0]) -pos = sorted([a for a in A if a >= 0]) +l_pos = sorted(v for v in A if v > 0) +l_neg = sorted(-v for v in A if v < 0) +cnt_pos = len(l_pos) +cnt_neg = len(l_neg) +pair_pos = cnt_pos * (cnt_pos - 1) // 2 + cnt_neg * (cnt_neg - 1) // 2 +pair_neg = cnt_pos * cnt_neg +pair_zro = N * (N - 1) // 2 - pair_pos - pair_neg -def _count_pair_neg(x): -    x = -x -    res = 0 -    MAX = len(pos) -    i = 0 -    for n in reversed(neg): -        while i < MAX and n * pos[i] < x: -            i += 1 -        res += MAX - i -    return res +def solve_neg(n): +    ub = 10**18 + 1 +    lb = 0 +    while ub - lb > 1: +        mid = (ub + lb) // 2 +        # Count +        n_pos = len(l_pos) +        cnt = 0 +        j = 0 +        for v in reversed(l_neg): +            while j < n_pos and v * l_pos[j] < mid: +                j += 1 +            cnt += n_pos - j +        if cnt < n: +            ub = mid +        else: +            lb = mid +    return -lb -def _count_pair_pos(x): -    res = 0 -    # Negative list -    i = 0 -    MAX = len(neg) -    for n in reversed(neg): -        if n * n <= x: -            res -= 1 -        while i < MAX and neg[i] * n <= x: -            i += 1 -        res += i -    # Positive list -    i = 0 -    MAX = len(pos) -    for n in reversed(pos): -        if n * n <= x: -            res -= 1 -        while i < MAX and pos[i] * n <= x: -            i += 1 -        res += i -    # Devide by 2 for counting the same pair twice -    res //= 2 -    res += len(neg) * len(pos) -    return res +def solve_pos(n): +    lb = 0 +    ub = 10**18 + 1 +    while ub - lb > 1: +        cnt = 0 +        mid = (ub + lb) // 2 +        # Negative count +        n_neg = len(l_neg) +        j = 0 +        for v in reversed(l_neg): +            if v**2 <= mid: +                cnt -= 1 +            while j < n_neg and v * l_neg[j] < mid: +                j += 1 +            cnt += j +        # Positive count +        n_pos = len(l_pos) +        j = 0 +        for v in reversed(l_pos): +            if v**2 <= mid: +                cnt -= 1 +            while j < n_pos and v * l_pos[j] < mid: +                j += 1 +            cnt += j +        # Remove duplicated counts +        cnt //= 2 +        if cnt < n: +            lb = mid +        else: +            ub = mid +    return lb -def count_pair(x): -    if x < 0: -        return _count_pair_neg(x) -    return _count_pair_pos(x) - - -# Bounds -lb = 0 -ub = 2 * 10**18 + 2 -while ub - lb > 1: -    mid = (ub + lb) // 2 -    if count_pair(mid - 10**18 - 1) < K: -        lb = mid -    else: -        ub = mid -print((ub - 10**18 - 1)) +if K <= pair_neg: +    ans = solve_neg(K) +elif K <= pair_neg + pair_zro: +    ans = 0 +else: +    ans = solve_pos(K - pair_neg - pair_zro) +print(ans)