Typing Contest

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

Teacher Docriz is planning to select some students in his class for a typing contest.

There are nn students in the class. The ii-th classmate's initial typing speed is s_is\_i and the typing noise is f_if\_i. However, when several students are selected to compete, their total typing speed is not the sum of everyone's initial typing speed, because the noise each person makes affects others.

Specifically, if students 1,2,3,,k1, 2, 3, \ldots, k form a team, the actual typing speed of student 11 is s_1(1f_1f_2f_1f_3f_1f_k)s\_1 \cdot (1 - f\_1 f\_2 - f\_1 f\_3 - \ldots - f\_1 f\_k), the actual typing speed of student 22 is s_2(1f_2f_1f_2f_3f_2f_k)s\_2 \cdot (1 - f\_2 f\_1 - f\_2 f\_3 - \ldots - f\_2 f\_k), and so on.

Teacher Docriz wants to form a team so that the total typing speed is as large as possible. Please help him calculate the maximum typing speed he could possibly achieve.

입력

The first line contains an integer TT (1T20001 \leq T \leq 2000), the number of test cases. Then TT test cases follow.

The first line of each test case contains a single integer nn (1n1001 \leq n \leq 100), the number of students.

Then nn lines follow, each line contains two numbers s_is\_i, f_if\_i (1s_i10121 \leq s\_i \leq 10^{12}, 0f_i10 \leq f\_i \leq 1), where s_is\_i is an integer and f_if\_i is a real number with exactly two decimal places.

It is guaranteed that n2000\sum n \leq 2000.

출력

For each test case, output a line with a single real number: the maximum typing speed that teacher Docriz can achieve. Keep your answers to exactly 99 decimal places after the decimal point.

It is guaranteed that the answer is absolutely precise when 99 decimal places are used, so only the answers that coincide with the model solution are accepted, so please ensure the accuracy of your output.