#include <bits/stdc++.h>
using namespace std;
const int maxn = 60005;
int n;
struct fri {
  double dis;
  double spe;
} t[maxn];
bool cmp(fri a, fri b) { return a.dis < b.dis; }
double a, b;
bool check(double mid) {
  a = t[0].dis - t[0].spe * mid;
  b = t[0].dis + t[0].spe * mid;
  for (int i = 1; i < n; i++) {
    double x = t[i].dis - t[i].spe * mid;
    double y = t[i].dis + t[i].spe * mid;
    if (x > b || y < a) {
      return false;
    } else {
      a = max(x, a);
      b = min(y, b);
    }
  }
  return true;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lf", &t[i].dis);
  for (int j = 0; j < n; j++) scanf("%lf", &t[j].spe);
  double mid, ans;
  double l = 0, r = 1e10;
  sort(t, t + n, cmp);
  while (r - l > 1e-6) {
    mid = (r + l) / 2.0;
    if (check(mid)) {
      r = mid;
      ans = mid;
    } else {
      l = mid;
    }
  }
  printf("%.7lf\n", ans);
  return 0;
}
