#include <bits/stdc++.h>
using namespace std;
bool intersect(pair<double, double> set1, pair<double, double> set2) {
  return (set1.first < set2.second) && (set2.first < set1.second);
}
pair<double, double> intersection(pair<double, double> set1,
                                  pair<double, double> set2) {
  if (set1.first >= set2.first) {
    if (set1.second <= set2.second)
      return set1;
    else
      return {set1.first, set2.second};
  } else {
    if (set2.second <= set1.second)
      return set2;
    else
      return {set2.first, set1.second};
  }
}
bool all_intersect(const vector<int>& pos, const vector<int>& vel,
                   double time) {
  pair<double, double> first = {pos[0] - vel[0] * time, pos[0] + vel[0] * time};
  pair<double, double> second = {pos[1] - vel[1] * time,
                                 pos[1] + vel[1] * time};
  if (!intersect(first, second)) return false;
  pair<double, double> tot_inter = intersection(first, second);
  for (int i = 2; i < pos.size(); ++i) {
    pair<double, double> curr_set = {pos[i] - vel[i] * time,
                                     pos[i] + vel[i] * time};
    if (!intersect(tot_inter, curr_set)) return false;
    tot_inter = intersection(tot_inter, curr_set);
  }
  return true;
}
double best_time(const vector<int>& pos, const vector<int>& vel, double left,
                 double right) {
  double mid = left + (right - left) / 2;
  if (fabs(right - left) < 10e-7) return mid;
  if (all_intersect(pos, vel, mid))
    return best_time(pos, vel, left, mid);
  else
    return best_time(pos, vel, mid, right);
}
int main() {
  int n;
  cin >> n;
  vector<int> pos;
  vector<int> vel;
  pos.reserve(n);
  vel.reserve(n);
  for (int i = 0; i < n; ++i) {
    pos.push_back(0);
    cin >> pos.back();
  }
  for (int i = 0; i < n; ++i) {
    vel.push_back(0);
    cin >> vel.back();
  }
  double min_time = best_time(pos, vel, 0, INT_MAX);
  cout << setprecision(9) << min_time << endl;
}
