#include <bits/stdc++.h>
double pi = acos(-1.0);
using namespace std;
long long n, x[70000], v[70000];
double sum;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i];
  }
  for (int i = 0; i < n; i++) cin >> v[i];
  double l = 0, r = 1000000009;
  double da = 0, xiao = 1000000009, cun1, cun2;
  while (l + 0.000001 < r) {
    double mid = (double)(l + r) / 2;
    da = x[0] - v[0] * mid, xiao = x[0] + v[0] * mid;
    for (int i = 1; i < n; i++) {
      cun1 = x[i] - v[i] * mid;
      da = max(da, cun1);
      cun2 = x[i] + v[i] * mid;
      xiao = min(xiao, cun2);
    }
    if (da <= xiao)
      r = mid;
    else
      l = mid;
  }
  printf("%.12lf\n", l);
  return 0;
}
