Sherlock is given square tiles, initially both of whose sides have length placed in an plane; so that the bottom left corner of each square coincides with the the origin and their sides are parallel to the axes.
At , both squares start moving along line (along the positive and ) with velocities and .
For each query of form , Sherlock has to report the time at which the overlapping area of tiles is equal to .
Note: Assume all distances in meter, time in seconds and velocities in meter per second unless otherwise specified.
First line contains integers . Next line contains , the number of queries. Each of the next lines consists of one integer in one line.
For each query, print the required answer in one line. Your answer will be considered correct if it is at most away from the true answer. See the explanation for more details.
10 1 2
For the first case, note that the answer is around 4.1421356237..., so any of the following will be accepted: