Fighting against a Polygonal Monster

You’re fighting against a monster. You have a special weapon that can shoot a laser beam. The laser beam can be seen as a cylinder along the z-axis, So when look from above the XY plane, the laser beam is actually a circle centered at (0,0) (yes, you cannot change the position of center). The monster is a convex polygon (well, you may think of it as a very thin prism) with n vertices surrounding the origin (i.e. (0,0) is strictly inside the monster, not on his boundary). You know that, when the common area of the laser beam and the monster is at least R, the monster dies. Since larger laser beam consumes more power, you’re interested in the minimum radius of the laser beam. Write a program to find the minimum radius. It is guaranteed that (0 ≤ R ≤ A), where A is the area of the monster. Input The input consists at most 10 cases. Each case starts with a single integer n (3 ≤ n ≤ 50) and a floating-point number R followed by n lines of two real numbers: the coordinates of the monster. The points are arranged in counter-clockwise order or clockwise order. The last test case is followed by a single zero, which should not be processed. The meaning of N and R are given in the problem statement. Output For each test case, print the case number and the minimum radius, to 2 decimal places. Inputs will be such that small precision errors will not change the visible output if you use double-precision floating- point numbers. Sample Input 3 1.60 -1 -1 1 -1 01 0 Sample Output Case 1: 0.93