God! Save me#1575

God! Save me

1 second
128 megabytes
Easy

You are in a room with doors. If you open door , after x_i hours you will either reach a safe place or return to the same room. Calculate the expected time (in hours) after which you can escape the room to a safe place.

Input

The first line contains the number of tests.

The first line of each test contains the number of doors (0 < n < 100).

Each of the next lines contains two numbers: x_i (0 < |x_i| < 25) and p_i (0 \le p_i \le 1).

  • If x_i is positive, it is the time after which you reach a safe place.

  • If x_i is negative, |x_i| is the time after which you return to the room.

Here, p_i is the probability of opening the -th door. The sum of all p_i equals .

Output

For each test, print its number, a colon, a space, and then:

  • the phrase God! Save me if it is impossible to escape the room,

  • or the expected time , to decimal places, after which you can escape the room to a safe place.

Examples

Example 1

Loading
Loading