#include <bits/stdc++.h>
using namespace std;
const int inf = INT_MAX;
const int N = (int)2e5 + 5;
const long long oo = (long long)1e18 + 9;
const int mod = (int)1e9 + 7;
void INPUT() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int v[60000 + 5], x[60000 + 5], n;
bool solve(double t) {
  double l = 0, r = 1000000000;
  for (int i = 0; i < n; i++) {
    l = max(l, x[i] - v[i] * t);
    r = min(r, x[i] + v[i] * t);
  }
  if (r < l) return false;
  return true;
}
int main() {
  INPUT();
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i];
  for (int i = 0; i < n; i++) cin >> v[i];
  double l = 0, r = 1e9, ans;
  while (l <= r) {
    double mid = (l + r) / 2.0;
    if (solve(mid)) {
      r = mid - 0.0000001;
      ans = mid;
    } else
      l = mid + 0.0000001;
  }
  cout << setprecision(6) << fixed << l << '\n';
  return 0;
}
