#include <bits/stdc++.h>
using namespace std;
inline void Boost() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
const long double eps = 1e-10;
int main() {
  Boost();
  int n;
  cin >> n;
  vector<long double> A(n), B(n);
  for (auto &x : A) cin >> x;
  for (auto &x : B) cin >> x;
  long double lo = 0;
  long double hi = 1000000000;
  long double best = 0;
  while (hi - lo > eps) {
    long double mid = (lo + hi) / 2.0;
    pair<long double, long double> inter = {A[0] - mid * B[0],
                                            A[0] + mid * B[0]};
    for (int i = 1; i < n; ++i) {
      pair<long double, long double> temp = {A[i] - mid * B[i],
                                             A[i] + mid * B[i]};
      inter.first = max(inter.first, temp.first);
      inter.second = min(inter.second, temp.second);
    }
    if (inter.first <= inter.second) {
      best = mid;
      hi = mid;
    } else {
      lo = mid;
    }
  }
  cout << fixed << setprecision(10) << best;
  return 0;
}
