#include <bits/stdc++.h>
using namespace std;
int n;
int const N = 60000;
int const T = 1e9 + 3;
int x[N];
int v[N];
int l[N];
int r[N];
double error = 1e-6;
bool ok(double time) {
  double maxl = 0, minr = T;
  for (int i = (0); i < (n); ++i) {
    maxl = max(maxl, (double)x[i] - v[i] * time);
    minr = min(minr, (double)x[i] + v[i] * time);
  }
  if (maxl <= minr) return 1;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(numeric_limits<double>::max_digits10);
  cin >> n;
  for (int i = (0); i < (n); ++i) {
    cin >> x[i];
  }
  for (int i = (0); i < (n); ++i) {
    cin >> v[i];
  }
  double lef = 0, rig = T, mid = 10, prev = 0;
  double now = abs(mid - prev) / max(mid, 1.0);
  while (now > error) {
    prev = mid;
    mid = (lef + rig) / 2;
    if (ok(mid)) {
      rig = mid;
    } else {
      lef = mid;
    }
    now = abs(mid - prev) / max(mid, 1.0);
  }
  cout << mid << endl;
  return 0;
}
