#include <bits/stdc++.h>
using namespace std;
struct Node {
  double pos;
  double sp;
} fri[60005];
int n;
double lr, rr;
bool check(double x) {
  double templ, tempr;
  lr = fri[0].pos - x * fri[0].sp;
  rr = fri[0].pos + x * fri[0].sp;
  for (int i = 1; i < n; i++) {
    templ = fri[i].pos - x * fri[i].sp;
    tempr = fri[i].pos + x * fri[i].sp;
    if (templ > lr) lr = templ;
    if (tempr < rr) rr = tempr;
  }
  return (rr - lr > 1e-7);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%lf", &fri[i].pos);
  for (int i = 0; i < n; i++) scanf("%lf", &fri[i].sp);
  double l = 0, r = 1000000005, mid;
  while (r - l > 1e-7) {
    mid = l + (r - l) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  printf("%.7lf", r);
  return 0;
}
