// -*- coding:utf-8-unix -*-

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn meguru_search<T, F>(v: &Vec<T>, f: F) -> usize where
    F: Fn(usize)->bool {
    let mut left = -1;
    let mut right = v.len() as i32;
    while right - left > 1 {
        let mid = left + (right - left) / 2;
        if f(mid as usize) { right = mid; }
        else { left = mid; }
    }
    right as usize
}

fn lower_bound<T: std::cmp::PartialOrd>(v: &Vec<T>, key: &T) -> usize {
    meguru_search(v, |mid| v[mid] >= *key)
}

fn upper_bound<T: std::cmp::PartialOrd>(v: &Vec<T>, key: &T) -> usize {
    meguru_search(v, |mid| v[mid] > *key)
}

fn count_minus(v: &Vec<i64>, l: usize, u: usize, x: i64) -> usize {
    let n = v.len();
    let mut m = 0;
    let mut sum = 0;
    'ploop: for p in u..n {
        loop {
            if v[m] * v[p] >= x {
                break;
            }
            m += 1;
            if m >= l {
                break 'ploop;
            }
        }
        sum += l - m;
    }
    return sum;
}

fn count_plus(v: &Vec<i64>, l: usize, u: usize, x: i64) -> usize {
    let n = v.len();
    let mut m = u;
    let mut sum = 0;
    'ploop: for p in (u..n).rev() {
        loop {
            if v[m] * v[p] >= x {
                break;
            }
            m += 1;
            if m >= n {
                break 'ploop;
            }
        }
        sum += n - m;
    }
    let mut msum = 0;
    m = l-1;
    'mloop: for p in 0..l {
        loop {
            if v[m] * v[p] >= x {
                break;
            }
            if m <= 0 {
                break 'mloop;
            }
            m -= 1;
        }
        msum += m+1;
    }
    let mut ps = 0;
    for i in 0..n {
        if v[i] != 0 && v[i] * v[i] >= x {
            ps += 1;
        }
    }
    return (sum + msum - ps) / 2;
}

fn main() {
    input! {
        n: usize,
        k: usize,
        a: [i64; n]
    }
    let mut a: Vec<i64> = a;
    a.sort();
    let l = lower_bound(&a, &0);
    let u = upper_bound(&a, &0);
    let ten: i64 = 10;
    let minus = l*(n-u);
    let zero = (u-l)*(n-u+l) + if u>l {(u-l)*(u-l-1)/2} else {0};
    if k <= minus {
        let mut left = -ten.pow(18);
        let mut right = 0;
        while right - left > 1 {
            let mid = left + (right - left) / 2;
            if count_minus(&a, l, u, mid) <= minus-k { right = mid; }
            else { left = mid; }
        }
        println!("{}", left);
    } else if k <= minus + zero {
        println!("0");
    } else {
        let mut left = 0;
        let mut right = ten.pow(18);
        while right - left > 1 {
            let mid = left + (right - left) / 2;
            if count_plus(&a, l, u, mid) <= n*(n-1)/2-k { right = mid; }
            else { left = mid; }
        }
        println!("{}", left);
    }
}

Measured memory_bytes: 6396