#include <bits/stdc++.h>
using namespace std;
const int N = 6e4 + 1000;
int n;
int x[N], v[N];
double l[N], r[N];
bool check(double m) {
  for (int i = 1; i <= n; ++i) {
    l[i] = (double)x[i] - m * (double)v[i];
    r[i] = (double)x[i] + m * (double)v[i];
  }
  double L = l[1], R = r[1];
  for (int i = 2; i <= n; ++i) {
    if (R < l[i] || L > r[i]) return 0;
    L = max(L, l[i]);
    R = min(R, r[i]);
  }
  return 1;
}
void Main() {
  for (int i = 1; i <= n; ++i) scanf("%d", x + i);
  for (int i = 1; i <= n; ++i) scanf("%d", v + i);
  double L = 0, R = 1000000000, m;
  for (int i = 0; i < 100; ++i) {
    m = (L + R) / 2;
    if (check(m))
      R = m;
    else
      L = m;
  }
  printf("%lf\n", m);
}
int main(int argc, char const *argv[]) {
  while (scanf("%d", &n) != -1) Main();
  return 0;
}
