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: interview

Starter code:

Solutions:
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)

from sys import stdin
inp=stdin.readline
n=int(inp())
d=[int(x) for x in inp().split()]
v,big,small,t=[int(x) for x in inp().split()],max(d),min(d),0
while(big-small>10**-6):
            t=-1
            mid=(big+small)/2
            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)

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,50
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)

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,40
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)

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,30
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)

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)

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)

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 = int( input() )

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

def calc( p ): # everyone is gathered to point p
  return max( abs( X[ i ] - p ) / V[ i ] for i in range( N ) )

lb, ub = 1.0, 1e9
while ub - lb > 5e-7:
  mid = ( lb + ub ) / 2
  if calc( mid - 4e-7 ) < calc( mid + 4e-7 ):
    ub = mid
  else:
    lb = mid

print( "%.9f" % calc( lb ) )


N = int( input() )

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

def calc( p ): # everyone is gathered to point p
  return max( abs( X[ i ] - p ) / V[ i ] for i in range( N ) )

lb, ub = 1.0, 1e9
while ub - lb > 5e-7:
  mid = ( lb + ub ) / 2
  if calc( mid - 5e-7 ) < calc( mid + 5e-7 ):
    ub = mid
  else:
    lb = mid

print( "%.9f" % calc( lb ) )


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))
    
 



# Binary search

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 - 0.0000001:
    #print('%f, %f' % (p, q))
    m = p + (q-p)/2
    span = verify(m)
    if len(span) > 0:
        q = m
    else:
        p = m
print(p)


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)

def main(n, x, v):
    eps = 1e-7
    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 = 1e9
    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(' ')))))


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,1e9
while r-l>5e-7:
	mid=(l+r)/2
	if (fin(mid-4e-7)<fin(mid+4e-7)):
		r=mid
	else:
		l=mid

print(fin(l))

n = int(input())
x = list(map(int, input().split()))
v = list(map(int, input().split()))
left = 0
right = 10 ** 9
while right - left > 0.0000001:
    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())
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-7:
    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]:
            # print("breaking")
            break
    else:
        va = 0
        t1 = tmid
    if va: t0 = tmid
print(tmid)




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(l,r)
    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)

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)

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)




# Made By Mostafa_Khaled


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())
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)


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(l)
print(f(l))


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=1e9

while (abs(left-right)>5e-7) :
    
    mid=(left+right)/2
    if (fin(mid-4e-6)<fin(mid+4e-6)):
	    right=mid
    else:
	    left=mid
    
    
print(fin(left))


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)