Theft at World Bank
##### Submissions: 1046   Accuracy: 5.23%   Difficulty: Easy   Marks: 2

The world’s most successful thief ever, Albert Spaggiari was planning for his biggest theft ever on the world bank. He decides to carry a sack, which can carry a maximum of C kgs. The day finally arrives, also arrives Albert at the gates of the bank. Luckily, there wasn’t any guard on the gate. He enters the locker and was amazed to see large blocks of gold. This also made him worry a bit, as it was difficult to carry such blocks and this can reduce the amount of gold he can carry. All the blocks have some profit value associated with them.(i.e. that much profit will be earned by using that block fully). So, he calls his friend and asks him to bring a gas cutter. His friend came after sometime, and they both start to collect and cut the blocks according to their needs. The story isn’t over yet, Albert hates symmetry, so he can’t use blocks whose weight is a perfect square.

Now, you need to find out the maximum profit that he can earn.

Input:
The first line of input contains T denoting number of test cases. The first line of each test case contains two integers N and C, denoting the number of blocks and the capacity of Albert’s sack. Next line contains N space separated pairs contain 2 integers each, Wi and Pi, denoting the weight and profit of the ith block.

Output:
For each test case output a single line containing the maximum profit that he can earn(with a precision of 10-3).

Constraints:
1<= T <= 100
1<= N <= 103
1<=C<=1018
1<=Wi<=109
1<=Pi<=109

Example:
Input:

2
3 10
4 8 5 5 7 4
2 3
1 2 3 4

Output:
7.857
4.000

Explanation:
In first test case as first block’s weight 4, is a perfect square, he can’t use this block. Now with the remaining blocks the most optimal way is to use 2nd block completely and cut 5kg piece from the 3rd block to get a total profit of 5+2.857=7.857.