The Dance Shaman Nikiteofl leads a procession of dancing tribesmen, mentally preparing them for the intellectual ritual known as the "erudite-quartet."
Beginning at the point with coordinates , Nikiteofl guides the procession northward, gradually turning east, moving clockwise along a quarter circle with a radius of . He then continues, moving clockwise through a quarter circle with a radius of , and similarly with radii , , and so forth (refer to the figure).

In the prairie where this dance occurs, there are baobabs. For each baobab, determine the minimum distance from it to the dancing procession, assuming the dance continues indefinitely.
The first line of the input contains a natural number , which does not exceed . Each of the following lines contains two real numbers x_i and y_i, which do not exceed 10^6 in absolute value—these are the coordinates of the baobabs (the axis points east, and the axis points north). All coordinates are provided with no more than three decimal places.
Output lines, each showing the distance from a baobab to the dancing procession, with an absolute or relative precision of up to 10^{-6}.
Example 1