Problem:
Score : 600 points

Problem Statement

There are N holes in a two-dimensional plane. The coordinates of the i-th hole are (x_i,y_i).

Let R=10^{10^{10^{10}}}. Ringo performs the following operation:

Randomly choose a point from the interior of a circle of radius R centered at the origin, and put Snuke there. Snuke will move to the hole with the smallest Euclidean distance from the point, and fall into that hole. If there are multiple such holes, the hole with the smallest index will be chosen.

For every i (1 \leq i \leq N), find the probability that Snuke falls into the i-th hole.

Here, the operation of randomly choosing a point from the interior of a circle of radius R is defined as follows:

Pick two real numbers x and y independently according to uniform distribution on [-R,R].

If x^2+y^2\leq R^2, the point (x,y) is chosen. Otherwise, repeat picking the real numbers x,y until the condition is met.

Constraints

2 \leq N \leq 100

|x_i|,|y_i| \leq 10^6(1\leq i\leq N)

All given points are pairwise distinct.

All input values are integers.

Input

Input is given from Standard Input in the following format:

N
x_1 y_1
:
x_N y_N

Output

Print N real numbers. The i-th real number must represent the probability that Snuke falls into the i-th hole.

The output will be judged correct when, for all output values, the absolute or relative error is at most 10^{-5}.

Sample Input 1

2
0 0
1 1

Sample Output 1

0.5
0.5

If Ringo put Snuke in the region x+y\leq 1, Snuke will fall into the first hole. The probability of this happening is very close to 0.5.
Otherwise, Snuke will fall into the second hole, the probability of which happening is also very close to 0.5.

Sample Input 2

5
0 0
2 8
4 5
2 6
3 10

Sample Output 2

0.43160120892732328768
0.03480224363653196956
0.13880483535586193855
0.00000000000000000000
0.39479171208028279727

Solution in Julia (0.5.0) (judge verdict: Accepted)

parseInt(x) = parse(Int, x)
parseMap(x::Array{SubString{String},1}) = map(parseInt, x)
inpr(v1::Tuple{Int,Int},v2::Tuple{Int,Int})=v1[1]*v2[1]+v1[2]*v2[2]
norm(v1::Tuple{Int,Int})=sqrt(v1[1]^2+v1[2]^2)
calc(v1::Tuple{Int,Int},v2::Tuple{Int,Int})=inpr(v1,v2)/(norm(v1)*norm(v2))

function accos(x::Float64)
	if x<-1.0
		3.141592653589793
	elseif x<1.0
		acos(x)
	else
		0.0
	end
end

function main()
	n = readline() |> parseInt
	a = Tuple{Int,Int,Int}[(0,0,0) for i in 1:n]
	for i in 1:n
		x,y = readline() |> split |> parseMap
		a[i] = (x,y,i)
	end
	b = copy(a)
	a = sort(a,by=x->(x[1],x[2]))
	vg = zeros(Float64,n,n,n)
	for i in 1:n
		for j in 1:n-1
			for k in j:n
				v1 = (a[j][1]-a[i][1],a[j][2]-a[i][2])
				v2 = (a[k][1]-a[i][1],a[k][2]-a[i][2])
				val = accos(calc(v1,v2))
				vg[i,j,k] = val
				vg[i,k,j] = val
			end
		end
	end
	cf = Int[1]
	v1 = (0,-1)
	xc = 0
	theta = 0.0
	for i in 2:n
		v2 = (a[i][1]-a[1][1],a[i][2]-a[1][2])
		val = acos(calc(v1,v2))
		if theta<val
			theta = val
			xc = i
		end
	end
	bbxc = 1
	v1 = (a[1][1]-a[xc][1],a[1][2]-a[xc][2])
	push!(cf,xc)
	while xc != 1
		bxc = xc
		theta = 0.0
		for i in 1:n
			if i != bxc
				if theta<vg[bxc,bbxc,i]
					theta = vg[bxc,bbxc,i]
					xc = i
				end
			end
		end
		if xc==bxc
			push!(cf,1)
			break
		end
		bbxc = bxc
		v1 = (a[bxc][1]-a[xc][1],a[bxc][2]-a[xc][2])
		push!(cf,xc)
	end
	nc = zeros(Float64,n)
	l = length(cf)
	nc[a[cf[1]][3]] = 0.5*(pi-vg[cf[1],cf[2],cf[l-1]])/pi
	for i in 2:l-1
		nc[a[cf[i]][3]] = 0.5*(pi-vg[cf[i],cf[i+1],cf[i-1]])/pi
	end
	for i in 1:n
		println(nc[i])
	end
end

main()