#include <bits/stdc++.h>
using namespace std;
bool shared(vector<pair<double, double>>& v) {
  if (v.empty()) return false;
  pair<double, double> c = v[0];
  int n = v.size();
  for (int i = 1; i < n; ++i) {
    if (v[i].second < c.first || v[i].first > c.second) return false;
    if (c.first <= v[i].first && v[i].second <= c.second) {
      c = v[i];
      continue;
    }
    if (c.first <= v[i].first && c.second >= v[i].first &&
        c.second <= v[i].second) {
      c.first = v[i].first;
      continue;
    }
    if (v[i].first <= c.first && c.first <= v[i].second &&
        c.second >= v[i].second) {
      c.second = v[i].second;
      continue;
    }
  }
  return true;
}
vector<pair<double, double>> cx(vector<pair<double, double>> x,
                                vector<double>& vel, double t) {
  int n = x.size();
  for (int i = 0; i < n; ++i) {
    x[i].first -= vel[i] * t;
    x[i].second += vel[i] * t;
  }
  return x;
}
int main() {
  int n, el;
  cin >> n;
  vector<pair<double, double>> x;
  vector<double> vel;
  for (int i = 0; i < n; ++i) {
    cin >> el;
    x.push_back(make_pair(el, el));
  }
  for (int i = 0; i < n; ++i) {
    cin >> el;
    vel.push_back(el);
  }
  double lo = 0.0, hi = 1e9;
  while (lo <= hi && abs(lo - hi) >= 5e-7) {
    double mid = (lo + hi) / 2;
    auto nx = cx(x, vel, mid);
    if (shared(nx))
      hi = mid;
    else
      lo = mid;
  }
  printf("%.8lf\n", lo);
}
