Circles and Segments
Alexei has a sheet of paper where he has drawn both a circle and an n-gon. He is interested in finding the shortest possible segment that can connect the circle to the n-gon, as well as determining how many such shortest segments exist.
Note: If the shortest distance between the circle and the n-gon is 0, then the number of "minimal" segments corresponds to the number of tangents and intersections between the n-gon and the circle.
Input
The first line of the input specifies n, the number of vertices of the n-gon, where 3 ≤ n ≤ 100. The n-gon is neither degenerate nor self-intersecting. The next n lines provide the coordinates of the vertices of the n-gon, listed in the order they are traversed (the direction of traversal is arbitrary). The final line contains three integers X, Y, R, representing the coordinates and radius of the circle, with absolute values not exceeding 100.
Output
The output should be a single line containing two numbers separated by a space. The first number is the shortest distance from the circle to the n-gon, expressed as a real number with precision up to three decimal places. The second number is the count of "minimal" segments.