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 ≤ 10^9, 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 x_{i} and y_{i} ( - 10^9 ≤ x_{i} ≤ 10^9, 0 ≤ y_{i} ≤ w) — coordinates of i-th polygon point. It is guaranteed that the polygon is non-degenerate.


-----Output-----

Print the single real t — the time the pedestrian needs to croos the road and not to be hit by the bus. The answer is considered correct if its relative or absolute error doesn't exceed 10^{ - 6}.


-----Example-----
Input
5 5 1 2
1 2
3 1
4 3
3 4
1 4

Output
5.0000000000


-----Note-----

Following image describes initial position in the first sample case:

[Image]

Difficulty: HARD
Tags: Geometry

Implementation

Starter code:

Solutions:
(n, w, v, u) = map(int, input().split())
max_t_w = 0
flag = True
for i in range(n):
	(x, y) = map(int, input().split())
	max_t_w = max(max_t_w, x / v - y / u)
	if x / v < y / u:
		flag = False
if flag:
	max_t_w = 0
print(w / u + max_t_w)


gcd = lambda a, b: a if b == 0 else gcd(b, a % b)

def norm(a, b, c):
	k = gcd(gcd(a, b), c)
	return (a // k, b // k, c // k)

def line(A, B):
	a = A[1] - B[1]
	b = B[0] - A[0]
	c = -a * A[0] - b * A[1]
	return norm(a, b, c)

def dist_line(A, l):
	(x, y) = A
	(a, b, c) = l
	d = a * a + b * b
	res = a * x + b * y + c
	return res
read = lambda : map(int, input().split())
(n, w, v, u) = read()
p = [tuple(read()) for i in range(n)]
l = line((0, 0), (v, u))
mind = float('inf')
maxd = -float('inf')
d = 0
for P in p:
	curd = dist_line(P, l)
	maxd = max(maxd, curd)
	mind = min(mind, curd)
	if mind == curd:
		x = (-l[1] * P[1] - l[2]) / l[0]
		d = P[0] - x
ans = w / u
if mind * maxd < 0:
	ans += d / v
print(ans)


rd = lambda : list(map(int, input().split()))
(n, w, v, u) = rd()
p = []
for i in range(n):
	(x, y) = rd()
	p.append([x - y / u * v, x / v, y])
p.sort()
if all((x >= 0 for (x, y, z) in p)) or all((x <= 0 for (x, y, z) in p)):
	print(w / u)
else:
	print(p[-1][1] + (w - p[-1][2]) / u)


(n, w, v, u) = map(int, input().split())
maxwait = 0.0
curr = 1
for i in range(n):
	(x, y) = map(int, input().split())
	maxwait = max(maxwait, x / v - y / u)
	if x / v < y / u:
		curr = 0
if curr == 1:
	maxwait = 0
print(w / u + maxwait)


class vec(object):

	def __init__(self, x, y):
		(self.x, self.y) = (x, y)

	def cross(self, k):
		return self.x * k.y - self.y * k.x

	def dot(self, k):
		return self.x * k.x + self.y * k.y

	def __sub__(self, k):
		return vec(self.x - k.x, self.y - k.y)
(n, w, v, u) = list(map(int, input().split(' ')))
p = vec(v, u)
l = [vec(*list(map(int, input().split(' ')))) for _ in range(n)]
(b, c) = (0, 0)
for i in l:
	if p.cross(i) <= 0:
		c += 1
	if p.cross(i) >= 0:
		b += 1
if b == n or c == n:
	print('%.8f' % (w / u))
	return
r = [l[(i + 1) % n] - l[i] for i in range(n)]
i = 0
while p.cross(r[i % n]) > 0:
	i += 1
while p.cross(r[i % n]) < 0:
	i += 1
i %= n
b = (l[i].cross(p) + v * w) / u / v
print('%.8f' % b)


(n, w, v, u) = list(map(int, input().split()))
v = u / v
l = r = 0
for _ in range(n):
	(x, y) = list(map(int, input().split()))
	y -= v * x
	l = min(l, y)
	r = max(r, y)
print((w - (l if r else 0)) / u)


f = lambda : map(int, input().split())
(n, w, v, u) = f()
k = t = 0
v /= u
for i in range(n):
	(x, y) = f()
	d = x / v - y
	k |= d < 0
	t = max(t, d)
if k:
	w += t
print(w / u)


(n, w, v, u) = map(int, input().split())
(x, y) = list(map(int, input().split()))
razn = ozhid = v * y - x * u
for i in range(1, n):
	(x, y) = map(int, input().split())
	r = v * y - x * u
	if r > razn:
		razn = r
	if r < ozhid:
		ozhid = r
if ozhid >= 0 or razn <= 0:
	print(w / u)
else:
	print(w / u - ozhid / (u * v))


from sys import exit
(n, w, v, u) = map(int, input().split())
versh = []
for i in range(n):
	(a, b) = map(int, input().split())
	versh.append((a, b))
versh.sort(key=lambda x: x[1])
for i in versh:
	if i[0] / v < i[1] / u:
		break
else:
	print(w / u)
	exit()
y = 0
time = 0
for i in versh:
	x = i[0] - time * v
	if x < 0:
		continue
	if x / v >= (i[1] - y) / u:
		time += x / v
		y = i[1]
time += (w - y) / u
print(time)


(n, w, v, u) = map(int, input().split())
ans = 0
flag1 = 0
flag2 = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x / v < y / u:
		flag1 = 1
	if x / v > y / u:
		flag2 = 1
	ans = max(ans, x / v + (w - y) / u)
if flag1 + flag2 == 2:
	print(ans)
else:
	print(w / u)


(n, w, v, u) = [int(x) for x in input().split()]
slant = u / v
(x, y) = [int(x) for x in input().split()]
ul = dr = v * y - u * x
for _ in range(1, n):
	(x, y) = [int(x) for x in input().split()]
	(m, p) = (v * y - u * x, v * y + u * x)
	if m > ul:
		ul = m
	if m < dr:
		dr = m
if ul <= 0 or dr >= 0:
	print(w / u)
else:
	print(w / u - dr / (u * v))


import sys

def main():
	(n, w, v, u) = list(map(int, sys.stdin.readline().split()))
	c = []
	for i in range(n):
		c.append(list(map(int, sys.stdin.readline().split())))
	ymin = 10 ** 9 + 1
	iymin = 0
	ymax = -1
	iymax = 0
	xmax = -1
	ixmax = 0
	for i in range(n):
		if c[i][1] < ymin:
			ymin = c[i][1]
			iymin = i
		if c[i][1] > ymax:
			ymax = c[i][1]
			iymax = i
		if c[i][0] > xmax:
			xmax = c[i][0]
			ixmax = i
	jmin = (iymin - 1 + n) % n
	while ymin == c[jmin][1]:
		jmin = (jmin - 1 + n) % n
	iymin = (jmin + 1) % n
	jmax = (iymax + 1) % n
	while ymax == c[jmax][1]:
		jmax = (jmax + 1) % n
	iymax = (jmax - 1 + n) % n
	jcur = iymin
	ok = True
	finish = (iymax - 1 + n) % n
	while jcur != finish:
		ta = c[jcur][0] / v
		if ta < c[jcur][1] / u:
			ok = False
			break
		jcur = (jcur - 1 + n) % n
	if ok:
		print('%.8f' % (w / u))
		return
	jmin = (iymin + 1) % n
	while ymin == c[jmin][1]:
		jmin = (jmin + 1) % n
	iymin = (jmin - 1 + n) % n
	jmax = (ixmax + 1) % n
	while xmax == c[jmax][0]:
		jmax = (jmax + 1) % n
	ixmax = (jmax - 1 + n) % n
	t = 0
	jcur = iymin
	cury = 0
	finish = (ixmax + 1) % n
	while jcur != finish:
		l = c[jcur][1] - cury
		ta = c[jcur][0] / v
		tp = l / u
		t = max(t + tp, ta)
		cury += l
		jcur = (jcur + 1) % n
	t += (w - cury) / u
	print('%.8f' % t)
main()


import sys
input = sys.stdin.readline

def solve():
	(n, w, v, u) = map(int, input().split())
	mx = int(10000000000000.0)
	Mx = int(-10000000000000.0)
	for i in range(n):
		(x, y) = map(int, input().split())
		xx = x * u - v * y
		mx = min(mx, xx)
		Mx = max(Mx, xx)
	if mx >= 0 or Mx <= 0:
		print(w / u)
	else:
		print((Mx + w * v) / (v * u))
solve()


(n, w, v, u) = list(map(int, input().split()))
versh = []
for i in range(n):
	(a, b) = list(map(int, input().split()))
	versh.append((a, b))
versh.sort(key=lambda x: x[1])
for i in versh:
	if i[0] / v < i[1] / u:
		break
else:
	print(w / u)
	return
y = 0
time = 0
for i in versh:
	x = i[0] - time * v
	if x < 0:
		continue
	if x / v >= (i[1] - y) / u:
		time += x / v
		y = i[1]
time += (w - y) / u
print(time)