#include <bits/stdc++.h>
using namespace std;
int fa[10100];
struct node {
  int a, b, c;
} no[10100];
int G[111][111];
bool cmp(node a, node b) { return a.c < b.c; }
int Find(int x) {
  if (fa[x] == x) return x;
  return fa[x] = Find(fa[x]);
}
void Union(int x, int y) {
  int xr = Find(x);
  int yr = Find(y);
  if (xr != yr) fa[xr] = yr;
}
double x[60010];
double v[60010];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lf", &x[i]);
  }
  for (int i = 0; i < n; i++) {
    scanf("%lf", &v[i]);
  }
  double l = 0, r = 1e10;
  double mid;
  for (int i = 0; i < 100; i++) {
    mid = (l + r) / 2;
    double left = 0;
    double right = 1e10;
    for (int j = 0; j < n; j++) {
      left = max(left, x[j] - v[j] * mid);
      right = min(right, x[j] + v[j] * mid);
    }
    if (right - left > 1e-8) {
      r = mid;
    } else {
      l = mid;
    }
  }
  printf("%f\n", mid);
  return 0;
}
