#include <bits/stdc++.h>
using namespace std;
long long n, i, x[60009], v[60009];
long double l, r, t, eps, mx, mn;
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) cin >> x[i];
  for (i = 1; i <= n; i++) cin >> v[i];
  r = 1e9;
  eps = 1e-9;
  while (r - l > eps) {
    t = (r + l) / 2.0;
    mx = x[1] - t * v[1];
    mn = x[1] + t * v[1];
    for (i = 2; i <= n; i++) {
      if (mx < x[i] - t * v[i]) mx = x[i] - t * v[i];
      if (mn > x[i] + t * v[i]) mn = x[i] + t * v[i];
    }
    if (mx <= mn)
      r = t;
    else
      l = t;
  }
  cout << fixed << l;
}
