#include <bits/stdc++.h>
using namespace std;
long long x[60002];
long long v[60002];
double ans = 1e12;
long long n;
double ma(double a, double b) {
  if (a > b) return a;
  return b;
}
double calc(double xx, double& bd) {
  double time = -1;
  for (int i = 0; i < n; i++) {
    double d = abs(xx - x[i]);
    if (d / v[i] > time) {
      time = d / v[i];
      bd = x[i];
    }
  }
  return time;
}
void bs(double s, double e) {
  if (s < e - 0.0000001) {
    double mid = s + (e - s) / 2;
    double xx;
    double x1 = calc(mid, xx);
    if (ans > x1) {
      ans = x1;
    }
    if (xx > mid)
      bs(mid, e);
    else
      bs(s, mid);
  }
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i];
  for (int i = 0; i < n; i++) cin >> v[i];
  bs(1, 1000000000);
  cout << fixed << setprecision(10) << ans;
  return 0;
}
