wifi-routers

IIIT Hyderabad is planning to install Wifi Routers in the campus to make it fully Wifi-enabled. 
Now each Wifi Router can only transmit data to a user or another WiFi Router only if the distance between Router and the receiving user/router is not more than R. 
Each Wifi Router has the same range R. A Wifi Router can get data from ground network or another Wifi Router. The aim here is that all the users get the data.

You have to find the minimal value of R that will ensure that all users get the data even if only one WiFi router is connected with ground network.

Input:

First line contains T, the number of testcase. 

For each testcase:
First line contains N, the number of WiFi Routers and M, the number of users.

Each of the next N lines contain (x,y) denoting the coordinates of the WifiRouters in the 2D plane. Next M lines denote the coordinates of the users.

Output:

Print the distance R rounded off to 6 decimal digits.

Constraints:

1 ≤ T ≤ 10

1 ≤ N,M ≤ 100 

0 ≤ x,y ≤ 100 

No two routers/users occupy the same place.

SAMPLE INPUT
1
1 2
1 1
0 0
0 2

SAMPLE OUTPUT
1.414214

Source: hackerearth | Difficulty: HARD


Solutions: