Crane Balancing

No attempts yetTime limit1sMemory limit128 MB

Problem

A crane cross section is a polygon resting on the xx-axis. Each 1×11 \times 1 unit of area weighs 1 kg.

Extra weight is attached at the first polygon vertex. Find the range of attachable weight (in kg) for which the crane does not topple left or right. Print a..b\lfloor a \rfloor .. \lceil b \rceil for range [a,b][a,b], or a..inf\lfloor a \rfloor .. inf for [a,)[a,\infty). Print unstable if no weight works.

Input

  • nn (3n1003 \le n \le 100): number of vertices.
  • Next nn lines: xi,yix_i, y_i. Weight attaches at the first vertex; at least two vertices have y=0y=0.

Output

Stable weight range, or unstable.