#include <bits/stdc++.h>
using namespace std;
double s[1000000], g[1000000];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  for (int j = 0; j < n; j++) {
    cin >> g[j];
  }
  double l = 0;
  double r = 10000000000;
  for (int ii = 0; ii < 100; ii++) {
    double m = (l + r) / 2;
    double ma = 0;
    double mi = 10000000000;
    for (int i = 0; i < n; i++) {
      ma = max(ma, s[i] - g[i] * m);
      mi = min(mi, s[i] + g[i] * m);
    }
    if (ma <= mi) {
      r = m;
    } else {
      l = m;
    }
  }
  cout.precision(30);
  cout << l;
}
