409905: GYM103831 D Labyrinth
Description
Vasya is stuck in a labyrinth. The labyrinth is a non-self-intersecting polygon with N vertices and sides parallel to the coordinate axes. In the evening Vasya has a programming practice, so he wants to escape from the labyrinth as quickly as possible. He is at the point (Xs, Ys) inside the labyrinth, and the exit is at the point (Xe, Ye). For simplicity, let us represent Vasya as a square with side of A units. The sides of the square are always parallel to the axes. Vasya is considered to have escaped when his center reaches the exit point. Find the minimal escape time. Vasya's speed is V units/sec. If Vasya cannot escape, output -1.
InputThe first line holds two real numbers Xs and Ys (0 ≤ Xs, Ys ≤ 100). The next line holds two real numbers Xe and Ye (0 ≤ Xe, Ye ≤ 100). The following two lines hold real numbers A and V (0.5 ≤ A, V ≤ 10), respectively. The following lines describe the polygon: a single integer N (1 ≤ N ≤ 100) on a line by itself, and each of the following N lines holds a pair of real numbers, Xi and Yi being the coordinates of a vertex (0 ≤ Xi, Yi ≤ 100). All the reals are guaranteed to give an integer when multiplied by 2.
OutputOutput the answer on a single line. Your answer will be considered correct if its relative error does not exceed 10 - 6.
ScoringPoints for all the tests are awarded independently.
ExampleInput1.5 4.5Output
4.5 1.5
1
1
6
0 0
0 6
3 6
3 3
6 3
6 0
4.472135955