#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long x[60001], y[60001];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i];
  for (int i = 0; i < n; i++) cin >> y[i];
  double l = 0, r = 1e9 + 100;
  for (int j = 0; j < 150; j++) {
    double m = (l + r) / 2.0;
    double mn = -3e18, mx = 3e18;
    for (int i = 0; i < n; i++) {
      mn = max(mn, x[i] - y[i] * m);
      mx = min(mx, x[i] + y[i] * m);
    }
    if (mx > mn)
      r = m;
    else
      l = m;
  }
  cout.precision(30);
  cout << r;
  return 0;
}
