Euclid

아직 제출이 없습니다시간 제한15초메모리 제한512 MB

문제

Alexander the Great is dead, and there is no legitimate heir. The empire is going to be divided into pieces between his generals. Nobody wants to start a bloody war, as they were friends just a while ago, so the generals are trying to invent some fair ways to draw the borders. 

The empire could be represented as a rectangle on a plane with sides parallel to the coordinate axes. There are NN generals situated in different points inside this rectangle. Their first idea was to give everybody an area that is closer to him than to any other general. However, those of them who are now somewhere in the Middle East desert sharply rejected this way of division.

Next, the generals came up with an idea to ask a famous scientist how to distribute the land. They chose Euclid, as he was an outstanding mathematician of the ancient times. His first suggestion was to give everybody an area that is farther from him than from any other general. Help them to check this idea, calculate for each general the area of the land he will receive according to this distribution rule. Actually, generals are not interested in the precise values of the areas itself, but what is the percentage each general is going to receive.

입력

The first line of the input describes an empire by two pairs of integers LL, DD, and RR, UU, denoting bottom left and upper right corners of the rectangle respectively (0L,R,U,D1060 \leq |L|, |R|, |U|, |D| \leq 10^6, L<RL < R, D<UD < U).

The second line contains a single integer NN, the number of generals who want to cut a piece from the great legacy (1N100,0001 \leq N \leq 100\\,000).

The next NN lines describe the locations of generals. Each of these lines contains x_ix\_i and y_iy\_i --- coordinates of the point on a plane where ii-th general is located (Lx_iRL \leq x\_i \leq R, Dy_iUD \leq y\_i \leq U). All the points are distinct.

출력

Print NN lines, ii-th of them containing a single real value, denoting the share of ii-th general, which is defined as the area of the part that ii-th general will own according to the distribution suggested by Euclid, divided by the total area of the great empire. Your answer will be considered correct if its absolute error does not exceed 10610^{-6}.

Formally, if your answer for some general is AA and the jury's answer is BB, the checker will accept your answer if AB106|A-B| \leq 10^{-6}.

힌트

The picture corresponds to the example case.