#BRI. Bridge

Bridge

Find a place to build a bridge over the river, so as to minimize total cost of the route between two cities A and B, located on opposite sides of the river.

Input

There is a single positive integer T on the first line of input (equal to about 100000). It stands for the number of test cases to follow. Each test case is exactly one line, containing six integers a, b, c, h, s1 and s2 (0 < a, b, c, h, s1, s2 < 100), separated by spaces. a - the distance from city A to the river (the length of segment AE in the figure), b - the distance from city B to the river (the length of segment FG in the figure), c - the distance between A and B along the axis parallel to the river (the length of segment BF in the figure) and h - the width of the river (EG in the figure). s1 and s2 are the costs of unit of road and bridge respectively.

Output

For each test case your program should write a single number to the standard output, equal to the minimal total cost of the route between A and B, accurate up to two digits after the decimal dot.

Example

Input:

1
1 1 1 1 1 1


Output:

3.16