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 GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
using namespace std;
const long long N = 100000 + 10;
const long long MOD = 1000000000 + 7;
const long long INF = 100000000000010;
const long long LOG = 20;
long long n, a[N], d[N], D[N], suf[N], pre[N], R[N], L[N], val[N], seg[N << 2];
long long Ceil(long long a, long long c) {
  if (a % c == 0) return a / c;
  return a / c + 1;
}
void Set(long long id, long long lq, long long rq, long long x, long long l,
         long long r) {
  if (rq <= l || r <= lq) return;
  if (lq <= l && r <= rq) {
    seg[id] = x;
    return;
  }
  long long md = (l + r) >> 1;
  Set(id << 1, lq, rq, x, l, md);
  Set(id << 1 | 1, lq, rq, x, md, r);
  seg[id] = max(seg[id << 1], seg[id << 1 | 1]);
  return;
}
long long BS(long long id, long long l, long long r, long long x) {
  if (r - l == 1) return l;
  long long md = (l + r) >> 1;
  if (seg[id << 1 | 1] >= x) return BS(id << 1 | 1, md, r, x);
  return BS(id << 1, l, md, x);
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  set<pair<long long, long long> > st;
  set<long long> Act;
  for (long long i = 1; i <= n + 2; i++) cin >> a[i];
  for (long long i = 2; i <= n + 1; i++) cin >> D[i];
  D[1] = INF, D[n + 2] = INF;
  pre[1] = 1;
  L[1] = 1;
  d[1] = INF;
  st.insert({INF, 1});
  R[1] = 1;
  val[1] = INF;
  pre[1] = 1;
  for (long long i = 2; i <= n + 2; i++) {
    R[i - 1] = i;
    d[i] = INF;
    d[i - 1] = D[i - 1];
    st.erase({val[i - 1], i - 1});
    val[i - 1] = d[i - 1] - Ceil(a[R[i - 1]] - a[L[i - 1]], 2);
    st.insert({val[i - 1], i - 1});
    st.insert({INF, i});
    L[i] = i - 1;
    R[i] = i;
    val[i] = INF;
    while ((*st.begin()).first < 0) {
      pair<long long, long long> fr = *st.begin();
      st.erase(fr);
      long long r = R[fr.second], l = L[fr.second];
      L[r] = l, R[l] = r;
      st.erase({val[l], l});
      st.erase({val[r], r});
      val[r] = d[r] - Ceil(a[R[r]] - a[L[r]], 2);
      val[l] = d[l] - Ceil(a[R[l]] - a[L[l]], 2);
      st.insert({val[l], l});
      st.insert({val[r], r});
    }
    pre[i] = L[i];
  }
  if (st.size() != 2) return cout << 0, 0;
  st.clear();
  d[n + 2] = INF;
  R[n + 2] = n + 2;
  L[n + 2] = n + 2;
  val[n + 2] = INF;
  st.insert({val[n + 2], n + 2});
  suf[n + 2] = n + 2;
  for (long long i = n + 1; i >= 1; i--) {
    L[i + 1] = i;
    d[i] = INF;
    d[i + 1] = D[i + 1];
    st.erase({val[i + 1], i + 1});
    val[i + 1] = d[i + 1] - Ceil(a[R[i + 1]] - a[L[i + 1]], 2);
    st.insert({val[i + 1], i + 1});
    st.insert({INF, i});
    L[i] = i;
    R[i] = i + 1;
    val[i] = INF;
    while ((*st.begin()).first < 0) {
      pair<long long, long long> fr = *st.begin();
      st.erase(fr);
      long long r = R[fr.second], l = L[fr.second];
      L[r] = l, R[l] = r;
      st.erase({val[l], l});
      st.erase({val[r], r});
      val[r] = d[r] - Ceil(a[R[r]] - a[L[r]], 2);
      val[l] = d[l] - Ceil(a[R[l]] - a[L[l]], 2);
      st.insert({val[l], l});
      st.insert({val[r], r});
    }
    suf[i] = R[i];
  }
  for (long long i = 1; i <= n + 2; i++) {
    long long x = 2 * D[i] + a[pre[i]];
    R[i] = x;
    if (R[i] <= a[i]) R[i] = -INF;
  }
  for (long long i = 0; i < (N << 2); i++) seg[i] = -INF;
  Set(1, 1, 2, R[1], 1, n + 3);
  double ans = 1000000000.0;
  for (long long i = 2; i <= n + 2; i++) {
    long long x = a[suf[i]] - 2 * D[i];
    if (x < a[i]) {
      x = max(x, -INF + 1);
      long long koj = BS(1, 1, n + 3, x);
      ans = min(ans, (a[i] - a[koj]) * 1.0 / 2.0);
    }
    Set(1, i, i + 1, R[i], 1, n + 3);
  }
  for (long long i = 2; i < n + 2; i++) {
    long long r = a[suf[i]], l = a[pre[i]];
    ans = min(ans, (r - l) * 1.0 / 2.0);
  }
  cout << fixed << setprecision(4) << ans;
  return 0;
}