#include <bits/stdc++.h>
using namespace std;
struct fri {
  double index;
  double v;
  double shangjie;
  double xiajie;
};
int n;
struct fri a[60010];
int check(double ans) {
  for (int i = 1; i <= n; i++) {
    a[i].shangjie = a[i].index + ans * a[i].v;
    a[i].xiajie = a[i].index - ans * a[i].v;
  }
  double up, down;
  up = a[1].shangjie;
  down = a[1].xiajie;
  for (int i = 2; i <= n; i++) {
    if (a[i].shangjie < down || a[i].xiajie > up) {
      return 0;
    } else {
      up = min(up, a[i].shangjie);
      down = max(down, a[i].xiajie);
    }
  }
  return 1;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].index;
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i].v;
  }
  double l, r;
  l = 0;
  r = 1e9;
  double ans = (l + r) / 2;
  while ((r - l) > 10e-7) {
    if (check(ans)) {
      r = ans;
      ans = (l + r) / 2;
    } else {
      l = ans;
      ans = (l + r) / 2;
    }
  }
  printf("%.12lf\n", ans);
  return 0;
}
