#include <bits/stdc++.h>
using namespace std;
int n, x[60000], v[60000];
pair<long double, long double> intersection(pair<long double, long double> p1,
                                            pair<long double, long double> p2) {
  return make_pair(max(p1.first, p2.first), min(p1.second, p2.second));
}
bool works(long double time) {
  pair<long double, long double> curr = make_pair(0, 1000000000);
  for (int i = 0; i < (n); i++) {
    pair<long double, long double> next = make_pair(
        (long double)x[i] - time * v[i], (long double)x[i] + time * v[i]);
    curr = intersection(curr, next);
  }
  if (curr.second < curr.first) return false;
  return true;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < (n); i++) cin >> x[i];
  for (int i = 0; i < (n); i++) cin >> v[i];
  long double lo = 0;
  long double hi = 1000000000;
  for (int counter = 0; counter < (60); counter++) {
    long double mid = (lo + hi) / 2;
    if (works(mid))
      hi = mid;
    else
      lo = mid;
  }
  cout << fixed << setprecision(9) << lo << "\n";
  return 0;
}
