Problem: We have an old building with n + 2 columns in a row. These columns support the ceiling. These columns are located in points with coordinates 0 = x0 < x1 < ... < xn < xn + 1. The leftmost and the rightmost columns are special, we will call them bearing, the other columns are ordinary. 

For each column we know its durability di. Let's consider an ordinary column with coordinate x. Let's assume that the coordinate of the closest to it column to the left (bearing or ordinary) is a and the coordinate of the closest to it column to the right (also, bearing or ordinary) is b. In this task let's assume that this column supports the segment of the ceiling from point <image> to point <image> (here both fractions are considered as real division). If the length of the segment of the ceiling supported by the column exceeds di, then the column cannot support it and it crashes after a while, and after that the load is being redistributeed between the neighbouring columns according to the same principle.

<image>

Thus, ordinary columns will be crashing for some time until the process stops at some state. One can prove that the set of the remaining columns doesn't depend on the order in which columns crash. If there are only two bearing columns left in the end, then we assume that the whole construction crashes under the weight of the roof. But if at least one ordinary column stays in addition to the bearing ones, then the building doesn't crash.

To make the building stronger, we can add one extra ordinary column of arbitrary durability d' at any (not necessarily integer) point 0 < x' < xn + 1. If point x' is already occupied by an ordinary column, it is replaced by a new one.

Your task is to find out: what minimal durability can the added column have so that the building doesn't crash?

Input

The first line contains integer n (1 ≤ n ≤ 105) — the number of ordinary columns.

The second line contains n + 2 integers x0, x1, ..., xn, xn + 1 (x0 = 0, xi < xi + 1 for 0 ≤ i ≤ n, xn + 1 ≤ 109) — the coordinates of the columns.

The third line contains n integers d1, d2, ..., dn (1 ≤ di ≤ 109).

Output

Print a single number — the minimum possible durability of the column that you need to add in order to make the building stay. If you do not have to add the column, please print 0. Your answer will be checked with the relative or absolute error 10 - 4.

Examples

Input

2
0 20 40 100
15 40


Output

10


Input

3
0 4 10 28 30
9 13 5


Output

0

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:128000000")
using namespace std;
void solve();
void precalc();
clock_t start;
bool doing = true;
int main() {
  int t = 1;
  cout.sync_with_stdio(0);
  cin.tie(0);
  precalc();
  cout.precision(10);
  cout << fixed;
  start = clock();
  int testNum = 1;
  while (t--) {
    solve();
  }
  return 0;
}
void precalc() {}
int binpow(int q, int w, int mod) {
  if (!w) return 1;
  if (w & 1) return q * binpow(q, w - 1, mod) % mod;
  return binpow(q * q % mod, w / 2, mod);
}
int gcd(int q, int w) {
  while (w) {
    q %= w;
    swap(q, w);
  }
  return q;
}
const long long INF = 100100000000;
struct treap {
  typedef struct _node {
    long long key;
    long long prior;
    long long cnt;
    _node* l;
    _node* r;
    long long val;
    long long mx;
    _node(long long key, long long val) : key(key), val(val), mx(mx) {
      prior = (rand() << 16) | rand();
      l = 0;
      r = 0;
      cnt = 1;
    }
    void recalc() {
      mx = val;
      if (l) {
        mx = max(mx, l->mx);
      }
      if (r) {
        mx = max(mx, r->mx);
      }
      cnt = 1 + Cnt(l) + Cnt(r);
    }
  } * node;
  static long long Cnt(node v) {
    if (!v) return 0;
    return v->cnt;
  }
  node root;
  size_t Size;
  node merge(node l, node r) {
    if (!l) return r;
    if (!r) return l;
    if (l->prior < r->prior) {
      l->r = merge(l->r, r);
      l->recalc();
      return l;
    } else {
      r->l = merge(l, r->l);
      r->recalc();
      return r;
    }
  }
  void split(node v, long long key, node& l, node& r) {
    l = r = 0;
    if (!v) return;
    if (v->key < key) {
      l = v;
      split(l->r, key, l->r, r);
      l->recalc();
    } else {
      r = v;
      split(r->l, key, l, r->l);
      r->recalc();
    }
  }
  treap() { root = 0; }
  void insert(long long key, long long val) {
    node l, r;
    split(root, key, l, r);
    root = merge(l, merge(new _node(key, val), r));
  }
  long long getVal(long long key) {
    node l, r;
    split(root, key, l, r);
    long long res = Cnt(r);
    root = merge(l, r);
    return res;
  }
  long long getMax(long long L) {
    node l, r;
    split(root, L, l, r);
    long long res = r ? r->mx : -INF;
    root = merge(l, r);
    return res;
  }
};
void solve() {
  long long n;
  cin >> n;
  n += 2;
  vector<long long> x(n), d(n);
  for (long long i = 0; i < n; ++i) {
    cin >> x[i];
  }
  for (long long i = 1; i + 1 < n; ++i) {
    cin >> d[i];
  }
  d[0] = d[n - 1] = INF;
  long long len = x[n - 1];
  vector<long long> borders[2];
  for (long long w = 0; w < 2; ++w) {
    treap dps;
    dps.insert(0, INF);
    vector<long long> rightBorder(n);
    rightBorder[0] = INF;
    for (long long i = 1; i < n; ++i) {
      long long l = 0;
      long long r = i;
      while (l + 1 < r) {
        long long m = (l + r) / 2;
        if (dps.getMax(x[m]) >= x[i]) {
          l = m;
        } else {
          r = m;
        }
      }
      rightBorder[i] = 2 * d[i] - (x[i] - x[l]) + x[i];
      if (rightBorder[i] <= x[i]) {
        rightBorder[i] = -INF;
      } else {
        dps.insert(x[i], rightBorder[i]);
      }
    }
    reverse(d.begin(), d.end());
    reverse(x.begin(), x.end());
    for (long long i = 0; i < n; ++i) {
      x[i] = len - x[i];
    }
    if (w) {
      reverse(rightBorder.begin(), rightBorder.end());
      for (long long i = 0; i < n; ++i) {
        rightBorder[i] = len - rightBorder[i];
      }
    }
    borders[w] = rightBorder;
  }
  long long ans = INF;
  treap dp;
  for (long long i = 0; i < n; ++i) {
    if (i > 0 && borders[1][i] <= x[i]) {
      long long l = 0;
      long long r = i;
      while (l + 1 < r) {
        long long m = (l + r) / 2;
        if (dp.getMax(x[m]) >= borders[1][i]) {
          l = m;
        } else {
          r = m;
        }
      }
      if (x[l] >= borders[1][i] && x[i] <= borders[0][l] &&
          (i != n - 1 || l != 0)) {
        ans = 0;
      } else {
        if (borders[1][i] <= borders[0][l]) {
          ans = min(ans, x[i] - x[l]);
        }
      }
    }
    if (borders[0][i] >= x[i]) {
      dp.insert(x[i], borders[0][i]);
    }
  }
  double res = ans / 2.0;
  cout << res << "\n";
}