Sherlock is given $2$ square tiles, initially both of whose sides have length $\boldsymbol{l}$ placed in an $x-y$ plane.  Initially, the bottom left corners of each square are at the origin and their sides are parallel to the axes.  

At $t=0$, both squares start moving along line $y=x$ (along the positive $\boldsymbol{x}$ and $y$) with velocities $\mbox{s1}$ and $\mbox{s2}$.     

For each querydetermine the time at which the overlapping area of tiles is equal to the query value, $\textit{queries}[i]$.  

Note: Assume all distances are in meters, time in seconds and velocities in meters per second.  

Function Description  

Complete the movingTiles function in the editor below.  

movingTiles has the following parameter(s):  

int l: side length for the two squares  
int s1: velocity of square 1
int s2: velocity of square 2
int queries[q]: the array of queries  

Returns  

int[n]: an array of answers to the queries, in order. Each answer will be considered correct if it is at most $\textbf{0.0001}$ away from the true answer.

Input Format 

First line contains integers $l,s1,s2$. 

The next line contains $\textit{q}$, the number of queries. 

Each of the next $\textit{q}$ lines consists of one integer $\textit{queries}[i]$ in one line.

Constraints 

$1\leq l,s1,s2\leq10^9$ 

$1\leq q\leq10^5$ 

$1\leq\textit{queries}[i]\leq L^2$ 

$s1\neq s2$  

Sample Input  

10 1 2
2
50
100

Sample Output  

4.1421
0.0000

Explanation  

For the first case, note that the answer is around 4.1421356237..., so any of the following will be accepted:  

4.1421356237
4.14214
4.14215000
4.1421
4.1422

Difficulty: EASY

Solutions:
import math
S2 = math.sqrt(2)
(a, v1, v2) = map(int, input().split())
leave = a * S2 / abs(v1 - v2)
qs = int(input())
for _ in range(qs):
	area = int(input())
	side = math.sqrt(area)
	frac = (a - side) / a
	print('{:.4f}'.format(frac * leave))


(l, s1, s2) = [int(i) for i in input().split()]
q = int(input())
for i in range(q):
	a = int(input())
	print(format((l - pow(a, 0.5)) * pow(2, 0.5) / abs(s1 - s2), '.4f'))


(l, s, d) = map(int, input().split())
for i in range(int(input())):
	a = int(input())
	ans = (l - a ** 0.5) / abs(s - d) * 2 ** 0.5
	print('%.4f' % ans)


from math import sqrt
(L, s1, s2) = map(int, input().split())
n = int(input())
sqrt2 = sqrt(2)
for _ in range(n):
	q = int(input())
	result = sqrt2 / abs(s1 - s2) * (L - sqrt(q))
	print('{:.4f}'.format(result))


import sys
(L, S1, S2) = list(map(int, sys.stdin.readline().split()))
Q = int(sys.stdin.readline())
for _ in range(Q):
	q = int(sys.stdin.readline())
	print('%.4f' % (2 ** 0.5 * (L - q ** 0.5) / abs(S1 - S2)))


from math import sqrt
s = input().split()
(l, s1, s2) = (int(s[0]), int(s[1]), int(s[2]))
q = int(input())
while q:
	i = int(input())
	a = (2 * l * l) ** (1 / 2) - (2 * i) ** (1 / 2)
	c = a / abs(s1 - s2)
	print('%.4f' % c)
	q -= 1


from math import sqrt
i = input().split()
L = int(i[0])
S1 = int(i[1])
S2 = int(i[2])
q = int(input())

def solve(s1, s2, l, q):
	maxDistance = sqrt(2 * l ** 2)
	s = sqrt(2 * q)
	return abs((maxDistance - s) / (s1 - s2))
[print('%.4f' % solve(S1, S2, L, int(input()))) for x in range(q)]


from math import sqrt
(L, s1, s2) = [int(x) for x in input().split()]
sdiff = abs(s2 - s1)
r2 = 2 / sqrt(2)
queries = int(input())
for _ in range(queries):
	area = int(input())
	t = r2 * (L - sqrt(area)) / sdiff
	print('{:.4f}'.format(t))


import math
(l, s1, s2) = [int(i) for i in input().split()]
for _ in range(int(input())):
	Q = int(input())
	val = (l * math.sqrt(2) - math.sqrt(2 * Q)) / abs(s1 - s2)
	print('%.4f' % val)


(l, s1, s2) = [int(i) for i in input().split()]
q = int(input())
s = abs(s1 - s2)
for i in range(q):
	temp = int(input())
	res = (l - pow(temp, 0.5)) * pow(2, 0.5) / s
	print(format(res, '.4f'))


import sys
(L, S1, S2) = list(map(int, sys.stdin.readline().split()))
Q = int(sys.stdin.readline())
for _ in range(Q):
	q = int(sys.stdin.readline())
	print('%.4f' % (2 ** 0.5 * (L - q ** 0.5) / abs(S1 - S2)))


import math
(L, S1, S2) = map(int, input().split())
for i in range(eval(input())):
	q = int(input())
	print('{0:.4f}'.format(float((L - math.sqrt(q)) * math.sqrt(2)) / float(abs(S1 - S2))))


import sys
(L, S1, S2) = list(map(int, sys.stdin.readline().split()))
Q = int(sys.stdin.readline())
for _ in range(Q):
	q = int(sys.stdin.readline())
	print('%.4f' % (2 ** 0.5 * (L - q ** 0.5) / abs(S1 - S2)))


import sys
(L, S1, S2) = list(map(int, sys.stdin.readline().split()))
Q = int(sys.stdin.readline())
for _ in range(Q):
	q = int(sys.stdin.readline())
	print('%.4f' % (2 ** 0.5 * (L - q ** 0.5) / abs(S1 - S2)))


from math import sqrt

def foo(q_i, L, s_a, s_b):
	A = sqrt(2) * sqrt(q_i)
	X = sqrt(2) * L
	D = abs(s_a - s_b)
	return (X - A) / D
(L, s_a, s_b) = [int(x) for x in input().strip().split()]
for q in range(int(input().strip())):
	q_i = int(input().strip())
	print('%0.4f' % foo(q_i, L, s_a, s_b))


import sys
(L, S1, S2) = list(map(int, sys.stdin.readline().split()))
Q = int(sys.stdin.readline())
for _ in range(Q):
	q = int(sys.stdin.readline())
	print('%.4f' % (2 ** 0.5 * (L - q ** 0.5) / abs(S1 - S2)))


import math
(l, s1, s2) = [int(i) for i in input().split()]
for _ in range(int(input())):
	Q = int(input())
	val = (l * math.sqrt(2) - math.sqrt(2 * Q)) / abs(s1 - s2)
	print('%.4f' % val)


[L, S1, S2] = list(map(int, input().strip().split()))
diff = abs(S1 - S2) * 1.0 / 2 ** 0.5
Q = int(input().strip())
for _ in range(Q):
	print('%.4f' % ((L - float(input()) ** 0.5) / diff))


from math import sqrt
(L, S1, S2) = (int(i) for i in input().split())
v = abs(S1 - S2) / sqrt(2)
n = int(input())
for i in range(n):
	q = int(input())
	if q <= L ** 2:
		ans = abs((sqrt(q) - L) / v)
		print('{0:0.4f}'.format(ans))
	else:
		print('never')


import math

def main():
	line = input().split()
	l = int(line[0])
	s1 = int(line[1])
	s2 = int(line[2])
	q = int(input())
	if s1 < s2:
		(s1, s2) = (s2, s1)
	for i in range(q):
		d = int(input())
		if d == l ** 2:
			t = 0
		else:
			t = (d ** 0.5 - l) / ((s2 - s1) * math.cos(math.pi / 4))
		print('%.4f' % t)
main()