#include <bits/stdc++.h>
int p[10000000], v[1000000];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &p[i]);
  for (int i = 0; i < n; i++) scanf("%d", &v[i]);
  float tail = 1000000000.0;
  float h = 0.0;
  float ans = 0;
  int focus = 1;
  while (h < tail && focus < 100) {
    float mid = (tail + h) / 2;
    float left = p[0] + (v[0] * mid);
    float right = p[0] - (v[0] * mid);
    for (int i = 1; i < n; i++) {
      if (left > p[i] + (v[i] * mid)) left = p[i] + (v[i] * mid);
      if (right < p[i] - (v[i] * mid)) right = p[i] - (v[i] * mid);
    }
    if (right < left) {
      ans = mid;
      tail = mid;
    } else if (right > left)
      h = mid;
    else {
      ans = mid;
      break;
    }
    focus++;
  }
  printf("%.7f", ans);
  scanf(" ");
}
