#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long> > v;
int main() {
  long long n;
  cin >> n;
  long long a[n], b[n];
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    b[i] = x;
    ;
  }
  sort(v.begin(), v.end());
  double l = 0, r = 1e9;
  for (int i = 0; i <= 333; i++) {
    double md = (l + r) / 2;
    double tmn = 1e9, tmx = -1e9;
    for (int j = 0; j < n; j++) {
      tmn = min(tmn, a[j] + b[j] * md);
      tmx = max(tmx, a[j] - b[j] * md);
    }
    if (tmn <= tmx)
      l = md;
    else
      r = md;
  }
  cout << setprecision(7) << l << endl;
}
