human
And while Mishka is enjoying her trip...

Chris is a little brown bear. No one knows, where and when he met Mishka, but for a long time they are together (excluding her current trip). However, best friends are important too. John is Chris' best friend.

Once walking with his friend, John gave Chris the following problem:

At the infinite horizontal road of width w, bounded by lines y = 0 and y = w, there is a bus moving, presented as a convex polygon of n vertices. The bus moves continuously with a constant speed of v in a straight Ox line in direction of decreasing x coordinates, thus in time only x coordinates of its points are changing. Formally, after time t each of x coordinates of its points will be decreased by vt.

There is a pedestrian in the point (0, 0), who can move only by a vertical pedestrian crossing, presented as a segment connecting points (0, 0) and (0, w) with any speed not exceeding u. Thus the pedestrian can move only in a straight line Oy in any direction with any speed not exceeding u and not leaving the road borders. The pedestrian can instantly change his speed, thus, for example, he can stop instantly.

Please look at the sample note picture for better understanding.

We consider the pedestrian is hit by the bus, if at any moment the point he is located in lies strictly inside the bus polygon (this means that if the point lies on the polygon vertex or on its edge, the pedestrian is not hit by the bus).

You are given the bus position at the moment 0. Please help Chris determine minimum amount of time the pedestrian needs to cross the road and reach the point (0, w) and not to be hit by the bus.

Input

The first line of the input contains four integers n, w, v, u (3 ≤ n ≤ 10 000, 1 ≤ w ≤ 109, 1 ≤ v, u ≤ 1000) — the number of the bus polygon vertices, road width, bus speed and pedestrian speed respectively.

The next n lines describes polygon vertices in counter-clockwise order. i-th of them contains pair of integers xi and yi ( - 109 ≤ xi ≤ 109, 0 ≤ yi ≤ w) — coordinates of i-th...
The above is tricky. Write me a correct solution in PYTHON.

=====
Give me a Python program to determine minimum amount of time the pedestrian needs to cross the road and reach the point (0, w) and not to be hit by the bus?
assistant
#Here is Python program to determine minimum amount of time the pedestrian needs to cross the road and reach the point (0, w) and not to be hit by the bus.

#!/usr/bin/python

import os
import sys
import itertools
import math

def solve(f):
    n, w, v, u = f.read_int_list()
    p = []
    for _ in xrange(n):
        p.append(f.read_int_list())

    ma_arg = -float('inf')
    mi_arg = float('inf')
    ma = None
    mi = None
    for i, pi in enumerate(p):
        a = math.atan2(pi[1], pi[0])
        if a > ma_arg:
            ma_arg = a
            ma = i
        if a < mi_arg:
            mi_arg = a
            mi = i

    if p[ma][0] > 0 and p[ma][1]*1.0/p[ma][0] <= u*1.0/v:
        return 1.0*w / u
    elif p[mi][0] <= 0 or p[mi][1]*1.0/p[mi][0] >= u*1.0/v:
        return 1.0*w / u

    i = ma
    while True:
        if p[i][0] > 0 and p[i][1]*1.0/p[i][0] <= u*1.0/v: break
        i = (i+1)%n
        if i == ma: raise

    auv = math.atan2(u,v)
    while True:
        a = math.atan2(p[(i+1)%n][1]-p[i][1], p[(i+1)%n][0]-p[i][0])
        if a < -math.pi or a >= auv:
            return 1.0*(w - p[i][1]) / u + 1.0*p[i][0] / v
        i = (i+1)%n

class Reader(object):
    def __init__(self, filename=None):
        self.test_mode = filename is not None
        self.cases = 1
        self.buffer = []
        if self.test_mode:
            with open(filename) as f:
                blank_flg = False
                for line in f:
                    line = line.strip()
                    if line:
                        self.buffer.append(line)
                        blank_flg = False
                    else:
                        if not blank_flg: self.cases += 1
                        blank_flg = True

    def __readline(self):
        return self.buffer.pop(0) if self.test_mode else raw_input()

    def read_int(self):
        return int(self.__readline())
    def read_float(self):
        return float(self.__readline())
    def read_long(self):
        return long(self.__readline())
    def read_str(self):
        return self.__readline()

    def read_int_list(self):
        return [int(item) for item in self.__readline().split()]
    def...