macro_rules ! input { ( source = $ s : expr , $ ( $ r : tt ) * ) => { let mut iter = $ s . split_whitespace ( ) ; input_inner ! { iter , $ ( $ r ) * } } ; ( iter = $ iter : ident , $ ( $ r : tt ) * ) => { let s = { use std :: io :: Read ; let mut s = String :: new ( ) ; std :: io :: stdin ( ) . read_to_string ( & mut s ) . unwrap ( ) ; s } ; let mut $ iter = s . split_whitespace ( ) ; input_inner ! { $ iter , $ ( $ r ) * } } ; ( $ ( $ r : tt ) * ) => { let s = { use std :: io :: Read ; let mut s = String :: new ( ) ; std :: io :: stdin ( ) . read_to_string ( & mut s ) . unwrap ( ) ; s } ; let mut iter = s . split_whitespace ( ) ; input_inner ! { iter , $ ( $ r ) * } } ; }
macro_rules ! input_inner { ( $ iter : expr ) => { } ; ( $ iter : expr , ) => { } ; ( $ iter : expr , mut $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let mut $ var = read_value ! ( $ iter , $ t ) ; input_inner ! { $ iter $ ( $ r ) * } } ; ( $ iter : expr , mut $ var : ident $ ( $ r : tt ) * ) => { input_inner ! { $ iter , mut $ var : usize $ ( $ r ) * } } ; ( $ iter : expr , $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let $ var = read_value ! ( $ iter , $ t ) ; input_inner ! { $ iter $ ( $ r ) * } } ; ( $ iter : expr , $ var : ident $ ( $ r : tt ) * ) => { input_inner ! { $ iter , $ var : usize $ ( $ r ) * } } ; }
macro_rules ! read_value { ( $ iter : expr , ( $ ( $ t : tt ) ,* ) ) => { ( $ ( read_value ! ( $ iter , $ t ) ) ,* ) } ; ( $ iter : expr , [ $ t : tt ; $ len : expr ] ) => { ( 0 ..$ len ) . map ( | _ | read_value ! ( $ iter , $ t ) ) . collect ::< Vec < _ >> ( ) } ; ( $ iter : expr , { chars : $ base : expr } ) => { read_value ! ( $ iter , String ) . chars ( ) . map ( | c | ( c as u8 - $ base as u8 ) as usize ) . collect ::< Vec < usize >> ( ) } ; ( $ iter : expr , { char : $ base : expr } ) => { read_value ! ( $ iter , { chars : $ base } ) [ 0 ] } ; ( $ iter : expr , chars ) => { read_value ! ( $ iter , String ) . chars ( ) . collect ::< Vec < char >> ( ) } ; ( $ iter : expr , char ) => { read_value ! ( $ iter , chars ) [ 0 ] } ; ( $ iter : expr , usize1 ) => { read_value ! ( $ iter , usize ) - 1 } ; ( $ iter : expr , $ t : ty ) => { $ iter . next ( ) . unwrap ( ) . parse ::<$ t > ( ) . unwrap ( ) } ; }
use std::ops::{Add, Div, Mul, Neg, Sub};
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct Complex<T> {
    pub re: T,
    pub im: T,
}
impl<T> Complex<T> {
    #[inline]
    pub fn new(re: T, im: T) -> Complex<T> {
        Complex { re: re, im: im }
    }
}
impl<T: Neg<Output = T>> Complex<T> {
    #[inline]
    pub fn conjugate(self) -> Complex<T> {
        Self::new(self.re, -self.im)
    }
}
impl<T: Add<Output = T> + Mul<Output = T>> Complex<T> {
    #[inline]
    pub fn dot(self, other: Self) -> T {
        self.re * other.re + self.im * other.im
    }
}
impl<T: Sub<Output = T> + Mul<Output = T>> Complex<T> {
    #[inline]
    pub fn cross(self, other: Self) -> T {
        self.re * other.im - self.im * other.re
    }
}
impl Complex<f64> {
    #[inline]
    pub fn from_polar(r: f64, theta: f64) -> Self {
        Complex::new(r * theta.cos(), r * theta.sin())
    }
    #[inline]
    pub fn abs(self) -> f64 {
        self.re.hypot(self.im)
    }
    #[inline]
    pub fn unit(self) -> Self {
        self / self.abs()
    }
    #[inline]
    pub fn angle(self) -> f64 {
        self.im.atan2(self.re)
    }
}
impl<T: Add<Output = T>> Add for Complex<T> {
    type Output = Self;
    fn add(self, other: Self) -> Self::Output {
        Self::new(self.re + other.re, self.im + other.im)
    }
}
impl<T: Copy + Add<Output = T>> Add<T> for Complex<T> {
    type Output = Self;
    fn add(self, other: T) -> Self::Output {
        Self::new(self.re + other, self.im + other)
    }
}
impl<T: Sub<Output = T>> Sub for Complex<T> {
    type Output = Self;
    fn sub(self, other: Self) -> Self::Output {
        Self::new(self.re - other.re, self.im - other.im)
    }
}
impl<T: Copy + Sub<Output = T>> Sub<T> for Complex<T> {
    type Output = Self;
    fn sub(self, other: T) -> Self::Output {
        Self::new(self.re - other, self.im - other)
    }
}
impl<T: Copy + Add<Output = T> + Sub<Output = T> + Mul<Output = T>> Mul for Complex<T> {
    type Output = Self;
    fn mul(self, other: Self) -> Self::Output {
        Self::new(
            self.re * other.re - self.im * other.im,
            self.re * other.im + self.im * other.re,
        )
    }
}
impl<T: Copy + Mul<Output = T>> Mul<T> for Complex<T> {
    type Output = Self;
    fn mul(self, other: T) -> Self::Output {
        Self::new(self.re * other, self.im * other)
    }
}
impl<T: Copy + Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T>> Div
    for Complex<T>
{
    type Output = Self;
    fn div(self, other: Self) -> Self::Output {
        let d = other.re * other.re + other.im * other.im;
        Self::new(
            (self.re * other.re + self.im * other.im) / d,
            (self.im * other.re - self.re * other.im) / d,
        )
    }
}
impl<T: Copy + Div<Output = T>> Div<T> for Complex<T> {
    type Output = Self;
    fn div(self, other: T) -> Self::Output {
        Self::new(self.re / other, self.im / other)
    }
}
impl<T: Neg<Output = T>> Neg for Complex<T> {
    type Output = Self;
    fn neg(self) -> Self::Output {
        Self::new(-self.re, -self.im)
    }
}
pub type Point = Complex<f64>;
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub enum CCW {
    #[doc = " a--b--c"]
    OnlineFront = -2,
    #[doc = " a--b-vc"]
    Clockwise = -1,
    #[doc = " a--c--b"]
    OnSegment = 0,
    #[doc = " a--b-^c"]
    CounterClockwise = 1,
    #[doc = " c--a--b"]
    OnlineBack = 2,
}
pub fn ccw(a: Point, b: Point, c: Point) -> CCW {
    let x = b - a;
    let y = c - a;
    if x.cross(y) > 0. {
        CCW::CounterClockwise
    } else if x.cross(y) < 0. {
        CCW::Clockwise
    } else if x.dot(y) < 0. {
        CCW::OnlineBack
    } else if x.abs() < y.abs() {
        CCW::OnlineFront
    } else {
        CCW::OnSegment
    }
}
fn convex_hull(ps: &Vec<Point>) -> Vec<usize> {
    let mut idx = (0..ps.len()).collect::<Vec<_>>();
    idx.sort_by(|&i, &j| {
        ((ps[i].re, ps[i].im)
            .partial_cmp(&(ps[j].re, ps[j].im))
            .unwrap())
    });
    let mut qs = Vec::new();
    for &i in idx.iter().chain(idx.iter().rev().skip(1)) {
        while {
            let k = qs.len();
            k > 1 && ccw(ps[qs[k - 2]], ps[qs[k - 1]], ps[i]) == CCW::Clockwise
        } {
            qs.pop();
        }
        qs.push(i);
    }
    qs.pop();
    qs
}
use std::f64::consts::PI;
const TAU: f64 = PI * 2.;
fn main() {
    input! { n, xy: [(f64, f64); n] };
    let mut ans = vec![0.; n];
    if n == 2 {
        ans = vec![0.5, 0.5];
    } else {
        let ps = (0..n)
            .map(|i| Point::new(xy[i].0, xy[i].1))
            .collect::<Vec<_>>();
        let ch = convex_hull(&ps);
        let m = ch.len();
        for i in 0..m {
            let a = ps[ch[(i + m - 1) % m]];
            let b = ps[ch[i]];
            let c = ps[ch[(i + 1) % m]];
            let d = a - b;
            let e = b - c;
            let theta = (e.angle() - d.angle()).abs();
            let theta = if theta > TAU - theta {
                TAU - theta
            } else {
                theta
            };
            ans[ch[i]] = theta / TAU;
        }
    }
    for i in 0..n {
        println!("{}", ans[i]);
    }
}


Measured memory_bytes: 4604