Rafting Design

Time limit1sMemory limit128 MB

Problem

Heehyun, the designer of a new rafting project, drew two polygons so that the outer polygon completely contains the inner one, then turned the empty space between them into a rafting track.

Now the size of the circular tube that will float along the track must be decided. The tube has to move and rotate freely all the way around the track, so it must not get stuck anywhere. Heehyun wants the tube to be as large as possible, but if it is too large it will jam in a narrow part of the track.

Find the maximum radius of a circular tube that can travel freely all the way around the track (the region between the two polygons).

Input

The first line contains the number of test cases $T$ ($1 \le T \le 100$).

Each test case is given as follows.

  • The first line contains the number of vertices of the inner polygon $n_i$ ($3 \le n_i \le 100$), followed by $n_i$ lines, each containing the coordinates $x$ $y$ of a vertex given in order along the polygon.
  • The next line contains the number of vertices of the outer polygon $n_o$ ($3 \le n_o \le 100$), followed by $n_o$ lines, each containing the coordinates $x$ $y$ of a vertex given in order.

All coordinates are integers with absolute value at most $1000$. The vertices of each polygon are given in clockwise or counterclockwise order. The two polygons neither overlap nor touch, and the outer polygon always completely contains the inner one.

Output

For each test case, print the maximum radius of a circular tube that can move freely around the track, rounded to exactly six digits after the decimal point, one per line.