#include <bits/stdc++.h>
using namespace std;
struct fri {
  int x;
  int v;
} P[60005];
struct coo {
  double l;
  double r;
} Q[60005];
bool cmp1(struct fri &a, struct fri &b) { return a.x < b.x; }
bool cmp2(struct coo &a, struct coo &b) { return a.l < b.l; }
int check(double mid, int n) {
  for (int i = 0; i < n; i++) {
    Q[i].l = P[i].x - mid * P[i].v;
    Q[i].r = P[i].x + mid * P[i].v;
  }
  sort(Q, Q + n, cmp2);
  for (int i = 0; i < n - 1; i++) {
    if (Q[i].r >= Q[i + 1].l) {
      if (Q[i].r <= Q[i + 1].r) Q[i + 1].r = Q[i].r;
    } else
      return 0;
  }
  return 1;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> P[i].x;
  for (int i = 0; i < n; i++) cin >> P[i].v;
  sort(P, P + n, cmp1);
  double left, right, mid;
  left = 0;
  right = (P[n - 1].x - P[0].x) / 1;
  while (right - left > 1e-7) {
    mid = (left + right) / 2;
    if (check(mid, n)) {
      right = mid;
    } else
      left = mid;
  }
  printf("%.7lf\n", mid);
  return 0;
}
