#include <bits/stdc++.h>
int x[60000], v[60000], n;
int check(double t) {
  double l = x[0] - v[0] * t, r = x[0] + v[0] * t;
  for (int i = 1; i < n; i++) {
    double nl = x[i] - v[i] * t, nr = x[i] + v[i] * t;
    if (l < nl) l = nl;
    if (r > nr) r = nr;
    if (l > r) return 0;
  }
  return 1;
}
int main() {
  int min = 1000000000, max = 0, i;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &x[i]);
    if (x[i] > max) max = x[i];
  }
  for (i = 0; i < n; i++) {
    scanf("%d", &v[i]);
    if (v[i] < min) min = v[i];
  }
  double l = 0, r = 2 * max / min;
  while (r - l > 1e-7) {
    double mid = l + (r - l) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  printf("%f\n", l);
}
