let () = Scanf.scanf "%d\n" @@ fun n ->
  let xys =
    Array.init n @@ fun _ ->
      Scanf.scanf "%d %d\n" @@ fun x y -> (x, y) in
  Array.sort (fun (x, y) (x', y') ->
    compare
      (atan2 (float_of_int y) (float_of_int x))
      (atan2 (float_of_int y') (float_of_int x'))) xys;
  let xacc = Array.make (2 * n + 1) 0 in
  let yacc = Array.make (2 * n + 1) 0 in
  for i = 0 to 2 * n - 1 do
    let x, y = xys.(i mod n) in
    xacc.(i + 1) <- x + xacc.(i);
    yacc.(i + 1) <- y + yacc.(i)
  done;
  Printf.printf "%.15f" @@
  sqrt @@
  float_of_int @@
  Array.fold_left (Array.fold_left max) min_int @@
  Array.init n @@ fun i ->
    Array.init (n + 1) @@ fun w ->
      let x = xacc.(i + w) - xacc.(i) in
      let y = yacc.(i + w) - yacc.(i) in
      x * x + y * y
