#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int n;
double res;
double x[60006], v[60006];
bool ok(double t) {
  double l, r;
  l = 1e-9;
  r = 1e9;
  for (int i = 1; i <= n; ++i) {
    double m = t * v[i];
    l = max(l, x[i] - m);
    r = min(r, x[i] + m);
  }
  return (l <= r);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) cin >> x[i];
  for (int i = 1; i <= n; ++i) cin >> v[i];
  double l, r, mid;
  l = 0.0, r = 1e9;
  while (abs(l - r) > 1e-6) {
    mid = (l + r) / 2;
    if (ok(mid)) {
      res = mid;
      r = mid;
    } else
      l = mid;
  }
  cout << fixed << setprecision(20) << res;
  return 0;
}
