let pi x = 2.0 *. acos 0.0 *. x
let () =
  Scanf.scanf "%d" @@ fun n ->
  let a = Array.init n (fun i -> Scanf.scanf " %f %f" (fun x y -> i,x,y)) in
  Array.init n (fun i ->
    let _, x, y = a.(i) in
    let f o pr = Array.fold_left (fun (l, u) (j, x', y') ->
      if i = j then l, u else
      let rad = mod_float (o +. pi 1.0 +. atan2 (y' -. y) (x' -. x)) (pi 2.0) in
      max l (rad -. pi 0.5), min u (rad +. pi 0.5)
    ) pr a in
    let l0, u0 = f 0.0 (pi 0.5, pi 1.5) in
    let l1, u1 = f (pi 1.0) (pi 0.5, pi 1.5) in
    ( max 0.0 (u0-.l0) +. max 0.0 (u1-.l1) ) /. pi 2.0
  ) |> Array.iter (Printf.printf "%.10f\n")
