#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<pair<long double, long double>> a(n);
  for (auto &i : a) {
    cin >> i.first;
  }
  for (auto &i : a) {
    cin >> i.second;
  }
  sort(a.begin(), a.end());
  long double l = 0, r = 1e9;
  while (fabs(r - l) > 1e-8) {
    long double m = (r + l) / 2;
    vector<pair<long double, int>> line;
    for (int i = 0; i < n; ++i) {
      line.push_back({a[i].first - m * a[i].second, -1});
      line.push_back({a[i].first + m * a[i].second, 1});
    }
    sort(line.begin(), line.end());
    int ctr = 0;
    bool fl = false;
    for (auto i : line) {
      ctr -= i.second;
      if (ctr == n) {
        fl = true;
        break;
      }
    }
    if (fl) {
      r = m;
    } else {
      l = m;
    }
  }
  cout.precision(16);
  cout << (l + r) / 2;
  return 0;
}
