#include <bits/stdc++.h>
using namespace std;
int N;
int cor[60001];
int vel[60001];
double f(double meeting_point) {
  double longest = 0;
  for (int i = 0; i < N; i++) {
    double distance = abs((double)cor[i] - meeting_point);
    double time = distance / (double)vel[i];
    if (time > longest) longest = time;
  }
  return longest;
}
double t_search_min(double l, double r) {
  double eps = 1e-7;
  while (r - l > eps) {
    double m1 = l + (r - l) / 3;
    double m2 = r - (r - l) / 3;
    double f1 = f(m1);
    double f2 = f(m2);
    if (f1 > f2)
      l = m1;
    else
      r = m2;
  }
  return f(r);
}
int main() {
  cin >> N;
  for (int i = 0; i < N; i++) cin >> cor[i];
  for (int i = 0; i < N; i++) cin >> vel[i];
  cout << setprecision(7) << t_search_min(0, 1000000001) << endl;
}
