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 rec lower_bound l r p =
  if r <= 1 + l
  then r
  else let m = (l + r) / 2 in
       if p m
       then lower_bound l m p
       else lower_bound m r 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 (-1100000000000000000) 1100000000000000000 @@ fun p ->
    let somme = Array.fold_left ( + ) 0 @@ Array.init n @@ fun i ->
      if 0 <= as_.(i) then
        upper_bound 0 (i + 1) @@ function
          | 0 -> true
          | n -> as_.(i) * as_.(n - 1) <= p
      else
        ( - ) i @@ lower_bound (-1) i @@ fun n ->
          if n = i
          then true
          else as_.(i) * as_.(n) <= p in
    somme < k