let rec upper_bound l r p =
  if r <= 1 + l
  then l
  else let m = (l + r) / 2 in
       if p m
       then upper_bound m r p
       else upper_bound l m p

let () = Scanf.scanf "%d %d\n" @@ fun n k ->
  let as_ = Array.init n @@ fun _ -> Scanf.scanf "%d " @@ fun a -> a in
  Array.sort compare as_;
  Printf.printf "%d\n" @@ succ @@ upper_bound (-1000000000000000000) 1000000000000000000 @@ fun p ->
    let somme = Array.fold_left ( + ) 0 @@ Array.init n @@ fun i ->
      upper_bound 0 (i + 1) @@ function
        | 0 -> true
        | n -> as_.(i) * as_.(n - 1) <= p in
    somme < k