#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(10);
  cout << fixed;
  int n;
  cin >> n;
  vector<int> pos(n);
  vector<double> speed(n);
  for (int i = 0; i < n; ++i) cin >> pos[i];
  for (int i = 0; i < n; ++i) {
    double a;
    cin >> a;
    speed[i] = a;
  }
  double ret = INT_MAX, beg = 0, end = 1000000001;
  while (end - beg > 1e-6) {
    double mid = (beg + end) / 2.0;
    bool ok = false;
    vector<pair<double, int>> v;
    for (int i = 0; i < n; ++i) {
      v.emplace_back(pos[i] - speed[i] * mid, 1);
      v.emplace_back(pos[i] + speed[i] * mid, -1);
    }
    sort(v.begin(), v.end());
    int maxi = 0;
    for (auto& i : v) {
      maxi += i.second;
      if (maxi == n) {
        ok = true;
        ret = min(ret, mid);
        break;
      }
    }
    if (ok)
      end = mid;
    else
      beg = mid;
  }
  cout << ret;
  return 0;
}
