Cave Explorer

Cut a simple polygon with a line of given direction, keep the largest piece, and minimize that area over all line positions.

Medium7GeometryBinary searchImplementationNo attempts yetTime limit8sMemory limit512 MB

Problem

Mike Smith explores caves all over the world. One day a frightening creature blocked his way. He was scared, but he soon drew his knife and slashed at it. The creature split into parts, only the part with the largest area stayed, and the rest died out at once. Mike slashed a few more times until what was left was small enough for him to pass.

Turn the situation into the following problem. The creature is a simple polygon that may be convex or concave. Mike swings his knife along a straight line and cuts the creature with it. The direction of that line is given in the input, and Mike picks its position freely. One slash breaks the creature into pieces, and only the piece with the largest area stays.

Choose the position of the line so that the remaining area is as small as possible, and report that area. If the line runs through a vertex and two pieces meet at a single point, count them as two separate pieces.

Input

The input holds several datasets. Each dataset has this format.

n
vx vy
x1 y1
...
xn yn

The first line holds the number of vertices nn of the polygon that gives the shape of the creature (3n1003 \le n \le 100). The second line holds two integers vxv_x and vyv_y, the direction vector (vx,vy)(v_x, v_y) of the knife (10000vx,vy10000-10000 \le v_x, v_y \le 10000, vx2+vy2>0v_x^2 + v_y^2 > 0). Each of the next nn lines holds two integers xix_i and yiy_i, the coordinates (xi,yi)(x_i, y_i) of the ii-th vertex (0xi,yi100000 \le x_i, y_i \le 10000).

The vertices come in counterclockwise order. The polygon is always simple: two edges never touch and never cross except at a shared endpoint.

A line holding a single zero ends the input, and that line is not a dataset. The input holds at most 30 datasets.

Output

For each dataset print the smallest possible area of the remaining piece on its own line, with exactly two digits after the decimal point. An area of 2 prints as 2.00. The judge data keeps every answer at least 0.002 away from a value where rounding to two decimals could go either way, so every solution with an absolute error below 10310^{-3} prints the same digits.