#include <bits/stdc++.h>
using namespace std;
double PI = 3.1415926535897932384626;
long long n;
vector<double> X(60005);
vector<double> V(60005);
bool check(double t) {
  double L = -1e10, R = 1e10;
  for (long long i = 0; i < n; i++) {
    double li = X[i] - V[i] * t;
    double ri = X[i] + V[i] * t;
    L = max(L, li);
    R = min(R, ri);
  }
  if (L <= R) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> X[i];
  for (long long j = 0; j < n; j++) cin >> V[j];
  double lo = 0, hi = 1e9 + 10;
  while ((hi - lo) > (1e-6)) {
    double mid = (lo + hi) / 2.0;
    if (check(mid)) {
      hi = mid;
    } else {
      lo = mid;
    }
  }
  cout << fixed << setprecision(8);
  cout << lo;
  return 0;
}
