#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> coordinates(n);
  vector<int> speeds(n);
  for (int i = 0; i < n; i++) {
    cin >> coordinates[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> speeds[i];
  }
  double left = 0, right = 2e9;
  for (int t = 0; t < 100; t++) {
    double mid = (left + right) / 2;
    double l = -2e9, r = 2e9;
    for (int i = 0; i < n; i++) {
      l = max(l, coordinates[i] - mid * speeds[i]);
      r = min(r, coordinates[i] + mid * speeds[i]);
    }
    if (r - l > 1e-6) {
      right = mid;
    } else {
      left = mid;
    }
  }
  cout << setprecision(12) << left << endl;
  return 0;
}
