#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e5 + 1;
const long long INF = 1e12 + 1;
const long long MOD = 1e9 + 9;
const long double EPS = 1e-12;
const long double PI = acos(-1);
const long long XX[] = {0, 0, 1, -1};
const long long YY[] = {1, -1, 0, 0};
const long long ALPH = 31;
void bye() {
  cout << "\n";
  exit(0);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> g(n), v(n);
  for (int i = 0; i < n; i++) {
    cin >> g[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  long double l = 0, r = 1e9;
  for (int tmp = 0; tmp < 100; tmp++) {
    long double mid = (l + r) / 2;
    long double ml = 0, mr = 1e9;
    for (int i = 0; i < n; i++) {
      ml = max(ml, (long double)g[i] - mid * (long double)v[i]);
      mr = min(mr, (long double)g[i] + mid * (long double)v[i]);
    }
    if (ml <= mr) {
      r = mid;
    } else {
      l = mid;
    }
  }
  cout << fixed << setprecision(10);
  cout << r;
  bye();
}
