//  ____            _                  _                       _       _
// |  _ \ _   _ ___| |_    ___ _ __   | |_ ___ _ __ ___  _ __ | | __ _| |_ ___
// | |_) | | | / __| __|  / __| '_ \  | __/ _ \ '_ ` _ \| '_ \| |/ _` | __/ _ \
// |  _ <| |_| \__ \ |_  | (__| |_) | | ||  __/ | | | | | |_) | | (_| | ||  __/
// |_| \_\\__,_|___/\__|  \___| .__/___\__\___|_| |_| |_| .__/|_|\__,_|\__\___|
//                            |_| |_____|               |_|

//https://github.com/manta1130/Competitive_Programming_Template_Rust

#[macro_use]
mod input {

    use std;
    use std::io;

    const SPLIT_DELIMITER: char = ' ';

    #[macro_export]
    #[allow(unused_macros)]
    macro_rules! input {
    ( $($x:expr ),*) => {
        {
            let temp_str = input_line_str();
            let mut split_result_iter = temp_str.split_whitespace();
                $(
                let buf_split_result = split_result_iter.next();
                let buf_split_result = buf_split_result.unwrap();
                    ($x) = buf_split_result.parse().unwrap();
                )*
        }
    };
}

    #[allow(dead_code)]
    pub fn input_line_str() -> String {
        let mut s = String::new();
        io::stdin().read_line(&mut s).unwrap();
        s.trim().to_string()
    }

    #[allow(dead_code)]
    pub fn p<T>(t: T)
    where
        T: std::fmt::Display,
    {
        println!("{}", t);
    }

    #[allow(dead_code)]
    pub fn input_vector2d<T>(line: usize) -> Vec<Vec<T>>
    where
        T: std::str::FromStr,
    {
        let mut v: Vec<Vec<T>> = Vec::new();

        for _ in 0..line {
            let vec_line = input_vector();
            v.push(vec_line);
        }
        v
    }

    #[allow(dead_code)]
    pub fn input_vector<T>() -> Vec<T>
    where
        T: std::str::FromStr,
    {
        let mut v: Vec<T> = Vec::new();

        let s = input_line_str();
        let split_result = s.split(SPLIT_DELIMITER);
        for z in split_result {
            let buf = match z.parse() {
                Ok(r) => r,
                Err(_) => panic!("Parse Error"),
            };
            v.push(buf);
        }
        v
    }

    #[allow(dead_code)]
    pub fn input_vector_row<T>(n: usize) -> Vec<T>
    where
        T: std::str::FromStr,
    {
        let mut v = Vec::with_capacity(n);
        for _ in 0..n {
            let buf = match input_line_str().parse() {
                Ok(r) => r,
                Err(_) => panic!("Parse Error"),
            };
            v.push(buf);
        }
        v
    }

    pub trait ToCharVec {
        fn to_charvec(&self) -> Vec<char>;
    }

    impl ToCharVec for String {
        fn to_charvec(&self) -> Vec<char> {
            self.to_string().chars().collect::<Vec<_>>()
        }
    }
}

mod vectools {

///C++のupper_boundと同等の実装
pub fn upper_bound<T>(v: &Vec<T>, k: T) -> usize
where
    T: PartialOrd,
{
    let mut from = 0;
    let mut to = v.len();

    while to - from > 1 {
        let mid = (from + to) / 2;
        if v[mid] <= k {
            from = mid;
        } else {
            to = mid;
        }
    }
    if v[from] > k {
        from
    } else {
        to
    }
}

///C++のlower_boundと同等の実装
pub fn lower_bound<T>(v: &Vec<T>, k: T) -> usize
where
    T: PartialOrd,
{
    let mut from = 0;
    let mut to = v.len();

    while to - from > 1 {
        let mid = (from + to) / 2;
        if v[mid] < k {
            from = mid;
        } else {
            to = mid;
        }
    }

    if v[from] < k {
        to
    } else {
        from
    }
}

///次の順列を求める。
pub fn next_permutation<T>(v: &mut Vec<T>) -> bool
where
    T: PartialOrd,
{
    let mut pivot = v.len() - 1;
    loop {
        if pivot == 0 {
            return false;
        }
        if v[pivot] > v[pivot - 1] {
            pivot -= 1;
            break;
        }
        pivot -= 1;
    }
    let mut pivot_swap = v.len() - 1;
    while v[pivot] >= v[pivot_swap] {
        pivot_swap -= 1;
    }
    v.swap(pivot, pivot_swap);
    v[pivot + 1..].reverse();
    true
}

}

use input::*;
use vectools::*;
fn bs(plus: &Vec<isize>, minus: &Vec<isize>, k: isize) -> usize {
    let mut res = 0;
    if k >= 0 {
        for (z, i) in plus.iter().enumerate() {
            if *i == 0 {
                if k == 0 {
                    res += plus.len() - z - 1 + minus.len();
                }
                continue;
            }
            let buf = (k + i - 1) / i;
            let r = lower_bound(plus, buf);
            res += plus.len() - r;
            if z >= r {
                res -= z - r + 1;
            }
        }
        for (z, i) in minus.iter().enumerate() {
            let buf = (k + i - 1) / i;
            let r = lower_bound(minus, buf);
            res += minus.len() - r;
            if z >= r {
                res -= z - r + 1;
            }
        }
    } else {
        if plus.len() != 0 {
            res += (plus.len() * (plus.len() - 1)) / 2;
        }
        if minus.len() != 0 {
            res += (minus.len() * (minus.len() - 1)) / 2;
        }
        let k = -1 * k;
        if minus.len() != 0 {
            for i in plus {
                if *i == 0 {
                    res += minus.len();
                    continue;
                }
                let buf = k / i;
                res += upper_bound(minus, buf);
            }
        }
    }
    res
}

fn main() {
    let (n, k): (usize, usize);
    input!(n, k);
    let a = input_vector::<isize>();
    let mut plus = vec![];
    let mut minus = vec![];
    for i in a {
        if i >= 0 {
            plus.push(i);
        } else {
            minus.push(-1 * i);
        }
    }
    plus.sort();
    minus.sort();

    let mut ok = isize::min_value() / 3;
    let mut ng = isize::max_value() / 3;
    while ng - ok > 1 {
        let mid = (ok + ng) / 2;
        if bs(&plus, &minus, mid) < (n * (n - 1)) / 2 - k + 1 {
            ng = mid;
        } else {
            ok = mid;
        }
    }
    println!("{}", ok);
}



Measured memory_bytes: 9968