Under construction

Still being built. Things may change

Meltdown

Time limit1sMemory limit128 MB

Summary
A polygon is lowered into a dissolving liquid at speed v while its sides erode at speed c; find when the liquid first reaches a given interior point.
Level

Hard8 of 10

Topics
Geometry, Binary search, Simulation
Solved
No attempts yet

Problem

A polygon is lowered from the air into a liquid at a constant speed of vv metres per minute. The liquid dissolves the polygon from all of its sides at a constant speed of cc metres per minute. Given a point (x,y)(x, y) inside the polygon that moves together with the polygon, determine when the liquid first reaches that point.

The border between the air and the liquid always has yy-coordinate 00, and the liquid eats away at the polygon from its sides in two dimensions. The polygon does not rotate as it is lowered, and at time 00 it is not yet touching the liquid.

Unlike the polygon, which is flat (two-dimensional), the liquid exists in three dimensions, so it seeps into concave cavities of the polygon. For example, if the polygon is 'cup-shaped', the liquid can get 'inside' the cup.

Input

The input consists of several test cases.

The first line of each test case contains five integers NN, xx, yy, vv, and cc, where 3≤N≤303 \le N \le 30, −100≤x≤100-100 \le x \le 100, 1≤y≤1001 \le y \le 100, and 1≤c<v≤101 \le c < v \le 10.

Each of the next NN lines contains one vertex of the polygon. The ii-th line contains two integers xx and yy (−100≤x≤100-100 \le x \le 100, 1≤y≤1001 \le y \le 100).

The vertices are given in counter-clockwise order. The border of the polygon does not intersect or touch itself, and the point (x,y)(x, y) lies strictly inside the polygon (it is not on the border).

The input is terminated by a line containing 0 0 0 0 0. These zeros are not a test case and must not be processed.

Output

For each test case, output the first time, in minutes, that the liquid reaches the specified point, rounded to four decimal places.

Examples1

  1. Example 1

    Input
    4 0 50 2 1
    -1 10
    1 10
    1 90
    -1 90
    0 0 0 0 0
    
    Expected output
    25.8660