#include <bits/stdc++.h>
using namespace std;
long long mode(long long x, long long m) { return (x % m + m) % m; }
long long mod = 1000000007;
long double pi = 2 * acos(0.0);
bool tt(long double ar[], long double v[], long long n, long double mid) {
  long double maxi = INT_MIN;
  long double mini = INT_MAX;
  for (long long i = 0; i < n; i++) {
    long double l = ar[i] - (v[i] * mid);
    long double r = ar[i] + (v[i] * mid);
    if (l > maxi) maxi = l;
    if (r < mini) mini = r;
  }
  if (maxi <= mini) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long double ar[n], v[n];
  for (long long i = 0; i < n; i++) cin >> ar[i];
  for (long long i = 0; i < n; i++) cin >> v[i];
  long double l = 0;
  long double r = 1e15;
  long double ans = 0;
  while (r - l >= 0.0000000001) {
    long double mid = (l + r) / (2.0);
    if (tt(ar, v, n, mid)) {
      ans = mid;
      r = mid;
    } else
      l = mid;
  }
  cout << setprecision(10) << fixed << ans;
}
