#include <bits/stdc++.h>
using namespace std;
int po[60001], speed[60001];
int T;
bool check(double t) {
  double left = 0;
  double right = 0;
  for (int i = 1; i <= T; i++) {
    double l1 = max(1.0, po[i] - t * speed[i]);
    double r1 = po[i] + t * speed[i];
    if (i == 1) {
      left = l1;
      right = r1;
    } else {
      if (l1 > right || r1 < left) return false;
      left = max(left, l1);
      right = min(right, r1);
    }
  }
  return true;
}
int main() {
  cin >> T;
  int Max = 0, Min = 1e9 + 5;
  for (int i = 1; i <= T; i++) {
    cin >> po[i];
    Max = max(Max, po[i]);
    Min = min(Min, po[i]);
  }
  for (int i = 1; i <= T; i++) {
    cin >> speed[i];
  }
  double l = 0;
  double r = Max - Min;
  double mid = (r + l) / 2;
  int t = 100;
  while (t--) {
    if (check(mid)) {
      r = mid;
    } else {
      l = mid;
    }
    mid = (r + l) / 2;
  }
  printf("%.12lf\n", r);
  cin.get();
  cin.get();
  return 0;
}
