The main road in Bytecity is a straight line from south to north. Conveniently, there are coordinates measured in meters from the southernmost building in north direction.

At some points on the road there are n friends, and i-th of them is standing at the point x_{i} meters and can move with any speed no greater than v_{i} meters per second in any of the two directions along the road: south or north.

You are to compute the minimum time needed to gather all the n friends at some point on the road. Note that the point they meet at doesn't need to have integer coordinate. 


-----Input-----

The first line contains single integer n (2 ≤ n ≤ 60 000) — the number of friends.

The second line contains n integers x_1, x_2, ..., x_{n} (1 ≤ x_{i} ≤ 10^9) — the current coordinates of the friends, in meters.

The third line contains n integers v_1, v_2, ..., v_{n} (1 ≤ v_{i} ≤ 10^9) — the maximum speeds of the friends, in meters per second.


-----Output-----

Print the minimum time (in seconds) needed for all the n friends to meet at some point on the road. 

Your answer will be considered correct, if its absolute or relative error isn't greater than 10^{ - 6}. Formally, let your answer be a, while jury's answer be b. Your answer will be considered correct if $\frac{|a - b|}{\operatorname{max}(1, b)} \leq 10^{-6}$ holds.


-----Examples-----
Input
3
7 1 3
1 2 1

Output
2.000000000000

Input
4
5 10 3 2
2 3 2 4

Output
1.400000000000



-----Note-----

In the first sample, all friends can gather at the point 5 within 2 seconds. In order to achieve this, the first friend should go south all the time at his maximum speed, while the second and the third friends should go north at their maximum speeds.

Difficulty: MEDIUM

Starter code:

Solutions:
n = int(input())
x = list(map(int, input().split()))
v = list(map(int, input().split()))
l = 0
r = 1000000000.0 + 1
for _ in range(1000):
	m = (l + r) * 0.5
	L = -2000000000.0
	R = 2000000000.0
	for i in range(n):
		L = max(L, x[i] - v[i] * m)
		R = min(R, x[i] + v[i] * m)
	if R >= L:
		r = m
	else:
		l = m
print(round((l + r) / 2, 10))


n = int(input())
x = list(map(float, input().split()))
v = list(map(float, input().split()))

def func(Tx):
	nonlocal x
	nonlocal v
	nonlocal n
	times = 0
	for j in range(n):
		times = max(abs(Tx - x[j]) / v[j], times)
	return times
l = min(x)
r = max(x)
ans = float(0)
for i in range(70):
	m1 = (2 * l + r) / 3
	m2 = (2 * r + l) / 3
	if func(m1) < func(m2):
		r = m2
	else:
		l = m1
ans = func((m1 + m2) / 2)
print(ans)


def solve(t, x, v):
	l = [x[i] - v[i] * t for i in range(len(x))]
	r = [x[i] + v[i] * t for i in range(len(x))]
	return 1 if max(l) <= min(r) else 0
n = int(input())
x = list(map(int, input().split()))
v = list(map(int, input().split()))
l = 0
h = 10 ** 9
cnt = 0
while l < h and cnt < 100:
	mid = l + (h - l) / 2
	cnt += 1
	if solve(mid, x, v):
		h = mid
	else:
		l = mid
print(l)


R = lambda : map(int, input().split())

def is_vaid(ps, ss, t):
	(l, r) = (0, max(ps))
	for (p, s) in zip(ps, ss):
		(l, r) = (max(l, p - s * t), min(r, p + s * t))
	return l < r
n = int(input())
(ps, ss) = (list(R()), list(R()))
(l, r) = (0, max(ps))
while r - l > 10 ** (-6):
	m = (l + r) / 2
	if is_vaid(ps, ss, m):
		r = m
	else:
		l = m
print(r)


import sys
input = sys.stdin.readline

def judge(t):
	(L, R) = (-10 ** 18, 10 ** 18)
	for (xi, vi) in zip(x, v):
		L = max(L, xi - t * vi)
		R = min(R, xi + t * vi)
	return L <= R

def binary_search():
	(l, r) = (0, 10 ** 10)
	while r - l >= 1e-07:
		mid = (l + r) / 2
		if judge(mid):
			r = mid
		else:
			l = mid
	return l
n = int(input())
x = list(map(int, input().split()))
v = list(map(int, input().split()))
print(binary_search())


n = int(input())
x = list(map(float, input().split()))
v = list(map(float, input().split()))

def f(x0):
	nonlocal x
	nonlocal v
	nonlocal n
	d = 0
	for i in range(n):
		d = max(d, abs(x0 - x[i]) / v[i])
	return d
l = 0
r = max(x) + 10
for i in range(85):
	m1 = (l + l + r) / 3
	m2 = (l + r + r) / 3
	if f(m1) > f(m2):
		l = m1
	else:
		r = m2
print(f(l))


from sys import stdin
inp = stdin.readline
n = int(inp())
d = [int(x) for x in inp().split()]
(v, big, small, t, c) = ([int(x) for x in inp().split()], max(d), min(d), 0, 25)
while c:
	(mid, c, t) = ((big + small) / 2, c - 1, -1)
	for i in range(n):
		if abs(d[i] - mid) / v[i] > t:
			t = abs(d[i] - mid) / v[i]
			x = d[i]
	if x > mid:
		small = mid
	else:
		big = mid
print(t)


f = int(input())
coords = list(map(int, input().split()))
speeds = list(map(int, input().split()))
lo = min(coords)
hi = max(coords)

def calcTime(mid, speeds, coords):
	return max([abs(mid - x) / speeds[i] for (i, x) in enumerate(coords)])
minSoFar = 10 ** 12
count = 0
(ts, te) = (calcTime(lo, speeds, coords), calcTime(hi, speeds, coords))
while count < 80:
	count += 1
	mid = lo + (hi - lo) / 2
	mp = calcTime(mid, speeds, coords)
	mid2 = mid + (hi - mid) / 2
	mp2 = calcTime(mid2, speeds, coords)
	if mp2 < mp:
		lo = mid
	else:
		hi = mid2
	minSoFar = min(minSoFar, mp, mp2)
print('{0:.9f}'.format(minSoFar))


N = int(input())
X = list(map(int, input().split()))
V = list(map(int, input().split()))

def calc(p):
	return max((abs(X[i] - p) / V[i] for i in range(N)))
(lb, ub) = (1.0, 1000000000.0)
while ub - lb > 5e-07:
	mid = (lb + ub) / 2
	if calc(mid - 4e-07) < calc(mid + 4e-07):
		ub = mid
	else:
		lb = mid
print('%.9f' % calc(lb))


n = int(input())
x = list(map(int, input().split()))
v = list(map(int, input().split()))
l = 0
r = 10 ** 9 + 1
while r - l > 10 ** (-7):
	mid = (r - l) / 2 + l
	tl = [x[i] - v[i] * mid for i in range(n)]
	tr = [x[i] + v[i] * mid for i in range(n)]
	Ml = tl[0]
	for i in range(1, n):
		Ml = max(Ml, tl[i])
	mr = tr[0]
	for i in range(1, n):
		mr = min(mr, tr[i])
	if mr >= Ml:
		r = mid
	else:
		l = mid
print(r)


def iscontained(a, b):
	l = max(a[0], b[0])
	r = min(a[1], b[1])
	return (l < r, (l, r))

def solve(p, v, n):
	iter = 0
	l = 0.0
	r = 1000000010.0
	tupl = [0] * 60001
	while iter < 60:
		flag = True
		m = (l + r) / 2
		intersect = (p[0] - v[0] * m, p[0] + v[0] * m)
		for i in range(1, n):
			tupl[i] = (p[i] - v[i] * m, p[i] + v[i] * m)
			(lap, intersect) = iscontained(intersect, tupl[i])
			if not lap:
				flag = False
				break
		if not flag:
			l = m
		else:
			r = m
		iter = iter + 1
	print('%.9f' % l)
n = int(input())
pos = list()
vel = list()
for i in map(float, input().split()):
	pos.append(i)
for i in map(float, input().split()):
	vel.append(i)
solve(pos, vel, n)


def f(t):
	a = (x[0] - v[0] * t) * 1.0
	b = (x[n - 1] + v[n - 1] * t) * 1.0
	for i in range(n):
		if x[i] - v[i] * t > a:
			a = x[i] - v[i] * t
		if x[i] + v[i] * t < b:
			b = x[i] + v[i] * t
	return a <= b
n = int(input())
x = list(map(int, input().split()))
v = list(map(int, input().split()))
inf = 1000000000.0
l = 0
r = inf
while r - l > 1e-06:
	m = (l + r) / 2
	if f(m):
		r = m
	else:
		l = m
print(r)


from math import isclose
n = int(input())
x = list(map(int, input().split()))
v = list(map(int, input().split()))
xx = list(((x[i], v[i]) for i in range(n)))
xx.sort()
(l, h) = (xx[0][0], xx[-1][0])
m = (h + l) / 2
while not isclose(l, h):
	m = (h + l) / 2
	t = abs(m - xx[0][0]) / xx[0][1]
	(a, b) = (True, t)
	for i in range(1, n):
		t2 = abs(m - xx[i][0]) / xx[i][1]
		if not isclose(t, t2):
			s = False
			if t2 > b:
				b = t2
				a = bool(xx[i][0] < m)
	if a:
		h = m
	else:
		l = m
print(max((abs(m - xx[i][0]) / xx[i][1] for i in range(n))))


def main(n, x, v):
	eps = 1e-07

	def f(p):
		nonlocal n, x, v
		t = 0.0
		for i in range(n):
			t = max(t, abs(x[i] - p) / v[i])
		return t
	low = 0
	high = 1000000000.0
	while low + eps < high:
		mid = (high + low) / 2
		midd = (mid + high) / 2
		if f(mid) < f(midd):
			high = midd
		else:
			low = mid
	return f(low)
print(main(int(input()), list(map(int, input().split(' '))), list(map(int, input().split(' ')))))


import math

def binS():
	l = 0
	r = 100000000000000
	for i in range(100):
		mid = (l + r) / 2
		if f(mid):
			r = mid
		else:
			l = mid
	print(r)

def f(s):
	lmax = -1 * math.inf
	rmin = math.inf
	for i in range(n):
		lmax = max(lmax, a[i] - v[i] * s)
		rmin = min(rmin, a[i] + v[i] * s)
		if lmax > rmin:
			return False
	return True
n = int(input())
a = list(map(int, input().split()))
v = list(map(int, input().split()))
binS()


import os
import sys
from io import BytesIO, IOBase
import threading
from bisect import bisect_right
from math import gcd, log
from collections import Counter, defaultdict, deque
from pprint import pprint
from itertools import permutations
from bisect import bisect_left
import heapq

def main(tnum):
	n = int(input())
	arr = list(map(int, input().split()))
	brr = list(map(int, input().split()))
	for i in range(n):
		arr[i] = (arr[i], brr[i])
	arr.sort()
	for i in range(n):
		brr[i] = arr[i][1]
		arr[i] = arr[i][0]
	l = 0
	r = 2 * 10 ** 9
	while r - l >= 10 ** (-6):
		mid = l + (r - l) / 2
		pos = 2 * 10 ** 9
		i = 0
		bol = True
		while i < n:
			if arr[i] > pos:
				break
			pos = min(arr[i] + mid * brr[i], pos)
			i += 1
		for j in range(i, n):
			if arr[j] - brr[j] * mid > pos:
				bol = False
		if bol:
			r = mid
		else:
			l = mid
	print(l)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(1):
	main(_ + 1)


def check(f, speed, t):
	inter = (f[0] - speed[0] * t, f[0] + speed[0] * t)
	for i in range(1, len(f)):
		cur = (f[i] - speed[i] * t, f[i] + speed[i] * t)
		if cur[0] > inter[1] or inter[0] > cur[1]:
			return False
		else:
			inter = (max(cur[0], inter[0]), min(cur[1], inter[1]))
	return True

def binsearch(fr, sp):
	inf = 0
	sup = 10 ** 10
	while sup - inf > 10 ** (-6):
		if check(fr, sp, (sup + inf) / 2):
			sup = (sup + inf) / 2
		else:
			inf = (sup + inf) / 2
	return inf if check(fr, sp, inf) else sup
n = int(input())
x = list(map(int, input().split()))
v = list(map(int, input().split()))
print(binsearch(x, v))


n = int(input())
(a, b) = [[int(x) for x in input().split()] for y in range(2)]

def ok(t):
	(l, r) = (0, 1 << 30)
	for x in range(n):
		l = max(a[x] - b[x] * t, l)
		r = min(a[x] + b[x] * t, r)
	return l <= r
(lo, hi) = (0, 1 << 30)
for i in range(65):
	m = (lo + hi) / 2
	if ok(m):
		hi = m
	else:
		lo = m
print('%.10f' % hi)


def coun(aa):
	c = 0
	for i in range(n):
		c = max(c, abs(cor[i] - aa) / spe[i])
	return c
n = int(input())
cor = list(map(int, input().split()))
spe = list(map(int, input().split()))
l = 1
r = 1000000000
while abs(r - l) > 5e-07:
	mid = (l + r) / 2
	if coun(mid - 4e-06) < coun(mid + 4e-06):
		r = mid
	else:
		l = mid
print(coun(r))


n = int(input())
x = [int(x) for x in input().split()]
v = [int(x) for x in input().split()]

def fin(h):
	return max((abs(h - x[i]) / v[i] for i in range(n)))
(l, r) = (1.0, 1000000000.0)
while r - l > 5e-07:
	mid = (l + r) / 2
	if fin(mid - 4e-07) < fin(mid + 4e-07):
		r = mid
	else:
		l = mid
print(fin(l))


def inputIntegerArray():
	return list(map(int, input().split(' ')))

def time(t, pos, speed):
	maxleft = 0
	minright = 1000000000
	for i in range(0, len(pos)):
		distance = speed[i] * t
		left = pos[i] - distance
		right = pos[i] + distance
		maxleft = max(maxleft, left)
		minright = min(minright, right)
	if maxleft <= minright:
		return True
	else:
		return False
n = inputIntegerArray()
pos = inputIntegerArray()
speed = inputIntegerArray()
left = 0.0
right = 1000000000.0
for i in range(0, 64):
	m = left + (right - left) / 2
	if time(m, pos, speed):
		right = m
	else:
		left = m
print(left)


(n, x, v) = (int(input()), list(map(int, input().split())), list(map(int, input().split())))
(t1, t2) = (0, 10 ** 9)
while t1 + 10 ** (-6) < t2:
	t3 = (t1 + t2) / 2
	(l, r) = (1, 10 ** 9)
	for (xi, vi) in zip(x, v):
		(l, r) = (max(l, xi - vi * t3), min(r, xi + vi * t3))
	if l <= r:
		t2 = t3
	else:
		t1 = t3
print(t2)


n = int(input())
l = list(map(int, input().split()))
l1 = list(map(int, input().split()))

def fin(a):
	k = 0
	for i in range(n):
		k = max(abs(l[i] - a) / l1[i], k)
	return k
left = 1
right = 1000000000.0
while abs(left - right) > 5e-07:
	mid = (left + right) / 2
	if fin(mid - 4e-06) < fin(mid + 4e-06):
		right = mid
	else:
		left = mid
print(fin(left))


n = int(input())
pos = list(map(int, input().split()))
v = list(map(int, input().split()))
t0 = 0
t1 = max(1, (max(pos) - min(pos)) / 2)
while t1 - t0 > 1e-07:
	tmid = (t0 + t1) / 2
	inter = [pos[0] - v[0] * tmid, pos[0] + v[0] * tmid]
	va = 1
	for i in range(1, n):
		a = pos[i] - v[i] * tmid
		b = pos[i] + v[i] * tmid
		if a < inter[0] and b > inter[1]:
			continue
		if inter[0] <= a <= inter[1]:
			inter[0] = max(inter[0], a)
		if inter[0] <= b <= inter[1]:
			inter[1] = min(inter[1], b)
		if b < inter[0] or a > inter[1]:
			break
	else:
		va = 0
		t1 = tmid
	if va:
		t0 = tmid
print(tmid)


n = int(input())
X = list(map(int, input().split()))
V = list(map(int, input().split()))
l = 0
r = 10 ** 9 + 100
while r - l >= 10 ** (-7):
	t = (l + r) / 2
	l2 = 0
	r2 = 10 ** 9
	for i in range(n):
		(a, b) = (X[i] - t * V[i], X[i] + t * V[i])
		r2 = min(b, r2)
		l2 = max(l2, a)
	if l2 <= r2:
		r = t
	else:
		l = t
print(l)


n = int(input())
k = list(map(int, input().split()))
s = list(map(int, input().split()))

def t_s(j, u):
	while u - j > 1e-06:
		f = (u - j) / 3
		x2 = t_p(j + f)
		x3 = t_p(u - f)
		if x2 < x3:
			u = j + 2 * f
		else:
			j = j + f
	return t_p((j + u) / 2)

def t_p(p):
	return max((abs(p - k[i]) / s[i] for i in range(n)))
r = 0
t = 10000000000.0
for p in k:
	r = max(p, r)
	t = min(p, t)
print(t_s(t, r))


n = int(input())
x = list(map(int, input().split()))
v = list(map(int, input().split()))
left = 0
right = 10 ** 9
while right - left > 1e-07:
	mid = (left + right) / 2
	a = min(x)
	b = max(x)
	for i in range(n):
		a = max(a, x[i] - v[i] * mid)
		b = min(b, x[i] + v[i] * mid)
	if a > b:
		left = mid
	else:
		right = mid
print('%.7f' % right)


n = int(input())
x = [int(x) for x in input().strip().split(' ')]
v = [int(x) for x in input().strip().split(' ')]
p = 0
q = 1.0 * (max(x) - min(x)) / min(v)

def verify(t):
	span = [-M, M]
	for i in range(n):
		tmp = (x[i] - v[i] * t, x[i] + v[i] * t)
		if tmp[0] > span[1] or tmp[1] < span[0]:
			return []
		span = [max(span[0], tmp[0]), min(span[1], tmp[1])]
	return span
M = max(x)
while p < q - 1e-07:
	m = p + (q - p) / 2
	span = verify(m)
	if len(span) > 0:
		q = m
	else:
		p = m
print(p)


n = int(input())
x = list(map(int, input().split()))
v = list(map(int, input().split()))

def intersection_of_line_segments(a, b):
	l1 = a[0]
	r1 = a[1]
	l2 = b[0]
	r2 = b[1]
	l3 = max(l1, l2)
	r3 = min(r1, r2)
	return [l3, r3]

def f(t, x, v, n):
	d = intersection_of_line_segments([x[0] - t * v[0], x[0] + t * v[0]], [x[1] - t * v[1], x[1] + t * v[1]])
	for i in range(2, n):
		if d[0] <= d[1]:
			d = intersection_of_line_segments(d, [x[i] - t * v[i], x[i] + t * v[i]])
		else:
			return False
	return d[0] <= d[1]
l = 0
r = 1000000000.0
while r - l > 1e-06:
	t = (r + l) / 2
	if f(t, x, v, n):
		r = t
	else:
		l = t
print(r)


import math
num_friends = int(input())
locations = list(map(lambda x: int(x), input().split()))
speeds = list(map(lambda x: int(x), input().split()))
minimum = 0
maximum = max(locations)
golden = (1 + math.sqrt(5)) / 2
midpoint1 = maximum - maximum / golden
midpoint2 = maximum / golden
while minimum + 1e-07 < maximum:
	time_to_mid1 = 0
	time_to_mid2 = 0
	for i in range(0, num_friends):
		time_to_mid1 = max(time_to_mid1, abs(locations[i] - midpoint1) / speeds[i])
		time_to_mid2 = max(time_to_mid2, abs(locations[i] - midpoint2) / speeds[i])
	if time_to_mid1 < time_to_mid2:
		maximum = midpoint2
		midpoint2 = midpoint1
		midpoint1 = maximum - (maximum - minimum) / golden
	else:
		minimum = midpoint1
		midpoint1 = midpoint2
		midpoint2 = minimum + (maximum - minimum) / golden
time_to_min = 0
for i in range(0, num_friends):
	time_to_min = max(time_to_min, (locations[i] - minimum) / speeds[i])
print(time_to_min)


n = int(input())
x = list(map(int, input().split()))
v = list(map(int, input().split()))

def ternaria(x, v, n, d_1, d_2):
	t_1 = max([abs(x[i] - d_1) / v[i] for i in range(n)])
	t_2 = max([abs(x[i] - d_2) / v[i] for i in range(n)])
	if t_1 < t_2:
		return (False, t_1)
	return (True, t_2)
(a, b, t) = (0, max(x), None)
for _ in range(90):
	(d_1, d_2) = ((2 * a + b) / 3, (a + 2 * b) / 3)
	(izquierda, t) = ternaria(x, v, n, d_1, d_2)
	if izquierda:
		a = d_1
	else:
		b = d_2
print(t)


from __future__ import print_function
from collections import *
from sys import stdin
from math import *
g = lambda : stdin.readline().strip()
gl = lambda : g().split()
gil = lambda : [int(var) for var in gl()]
gfl = lambda : [float(var) for var in gl()]
gcl = lambda : list(g())
gbs = lambda : [int(var) for var in g()]
mod = int(1000000000.0) + 7
inf = float('inf')
(n,) = gil()
(p, v) = (gil(), gil())

def inter(l, r, m, n):
	if l > m:
		return inter(m, n, l, r)
	return (max(l, m), min(r, n))

def isPos(t):
	d = v[0] * t
	(l, r) = (p[0] - d, p[0] + d)
	for i in range(1, n):
		d = v[i] * t
		(l, r) = inter(l, r, p[i] - d, p[i] + d)
		if r < l:
			return False
	return r >= l
(d, l, r) = (1e-07, 0, 2000000000.0)
ans = None
while l <= r:
	mid = (l + r) / 2
	if isPos(mid):
		r = mid - d
		ans = mid
	else:
		l = mid + d
print(round(ans, 6))


n = int(input())
x = [int(i) for i in input().split()]
v = [int(i) for i in input().split()]
l = 0
r = 500000000
while l < r:
	if abs(l - r) < 1e-06:
		break
	mid = (l + r) / 2.0
	L = x[0] - v[0] * mid
	R = x[0] + v[0] * mid
	for i in range(1, n):
		if x[i] - v[i] * mid > L:
			L = x[i] - v[i] * mid
		if x[i] + v[i] * mid < R:
			R = x[i] + v[i] * mid
	if abs(L - R) < 1e-07:
		break
	if L <= R:
		r = mid
	else:
		l = mid + 1e-07
print('{:.6f}'.format(round(l, 6)))


n = int(input())
x = list(map(int, input().split()))
v = list(map(int, input().split()))
(l, r) = (0, 10 ** 10)
t = (l + r) / 2
while r - l >= 10 ** (-6):
	t = (l + r) / 2
	max_l = -float('inf')
	min_r = float('inf')
	for i in range(n):
		left = x[i] - v[i] * t
		right = x[i] + v[i] * t
		max_l = max(max_l, left)
		min_r = min(min_r, right)
	if max_l <= min_r:
		r = t
	else:
		l = t
print(t)


n = int(input())
l = [int(i) for i in input().split()]
v = [int(i) for i in input().split()]
lo = 0
hi = 10903475946967965

def check(t):
	seg = []
	for i in range(n):
		reachl = v[i] * t
		reachr = v[i] * t
		seg.append([l[i] - v[i] * t, l[i] + v[i] * t])
	refa = seg[0][0]
	refy = seg[0][1]
	if t == 1.0000000066886872:
		print(seg)
	for i in range(n):
		currx = seg[i][0]
		curry = seg[i][1]
		if currx < refa and curry < refa:
			return 0
		if currx > refy and curry > refy:
			return 0
		refa = max(refa, currx)
		refy = min(refy, curry)
	return 1
while lo <= hi:
	mi = (lo + hi) / 2
	a = check(mi)
	if a:
		ans = mi
		hi = mi - 1e-07
	else:
		lo = mi + 1e-07
print(ans)


n = int(input())
xs = list(map(int, input().split()))
vs = list(map(int, input().split()))
l = 0
r = max(xs) - min(xs) + 1
for i in range(50):
	m = (r + l) / 2
	lev = 0
	prav = 1000000000
	for j in range(n):
		prav = min(prav, xs[j] + vs[j] * m)
		lev = max(lev, xs[j] - vs[j] * m)
		if prav < lev:
			break
	if prav < lev:
		l = m
	else:
		r = m
print((l + r) / 2)