#include <bits/stdc++.h>
using namespace std;
int n, i;
double v[60005], x[60005];
bool C(double time) {
  double left = 0, right = 1000000000;
  for (i = 0; i < n; i++) {
    left = max(left, x[i] - time * v[i]);
    right = min(right, x[i] + time * v[i]);
  }
  if (left <= right)
    return 1;
  else
    return 0;
}
int main() {
  double left, end, mid;
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%lf", &x[i]);
  for (i = 0; i < n; i++) scanf("%lf", &v[i]);
  left = 1e-6;
  end = 3e-6;
  while (end - left >= 1e-6) {
    mid = (left + end) / 2;
    if (C(mid)) {
      end = mid;
    } else {
      left = mid;
      end *= 2;
    }
  }
  if (C(left))
    mid = left;
  else
    mid = end;
  printf("%.12lf\n", mid);
}
