#DCEPC12H. Height of Expectation

Height of Expectation

Welcome To ICPC! ICPC is a programming competition in which N teams participate every year. Out of N teams, K number of teams has been selected from our college. You know what? K is always a prime number. Coincidence! Before going to ICPC, we want to calculate our expected overall score of our college.

Expected Overall score is defined as expected median value of our college team’s ranks.

 

All the ranks are distinct. Team’s rank value always lies between 1 to N.

Input

First line consists of T, the number of test cases.

Each of the next T lines contains 2 space separated integers N and K.

Output

Output T lines each line containing expected overall score of our college. You should output at least 6 digits after decimal.

Constraints

1<=T<=500

1<=N<=100

1<=K<=10

N>=K

Example

Input:
1
3 3

Output:

</p>
2.0000000