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>
using namespace std;
const int MAXN = 1e5 + 5;
long long n, l[MAXN], r[MAXN], vall[MAXN], valr[MAXN], pos[MAXN], d[MAXN],
    tree[4 * MAXN], ind[MAXN];
bool validl[MAXN], validr[MAXN], dead;
pair<long long, long long> sortr[MAXN];
void computeleft() {
  l[0] = -1, r[0] = 1, r[n + 1] = -1, l[n + 1] = n;
  for (int i = 1; i <= n; ++i) l[i] = i - 1, r[i] = i + 1;
  validl[0] = 1, vall[0] = 2 * d[0];
  for (int i = 1; i <= n + 1; ++i) {
    queue<int> drop;
    if ((i > 1) && (pos[r[i - 1]] - pos[l[i - 1]] > 2 * d[i - 1]))
      drop.push(i - 1);
    while (!drop.empty()) {
      int t = drop.front();
      drop.pop();
      int lt = l[t], rt = r[t];
      r[lt] = r[t];
      l[rt] = l[t];
      if (lt != 0) {
        if (pos[r[lt]] - pos[l[lt]] > 2 * d[lt]) drop.push(lt);
      }
      if (rt != i) {
        if (pos[r[rt]] - pos[l[rt]] > 2 * d[rt]) drop.push(rt);
      }
    }
    if (2 * d[i] - (pos[i] - pos[l[i]]) > 0) validl[i] = 1;
    vall[i] = 2 * d[i] + pos[l[i]];
  }
  if (r[0] != n + 1) {
    cout << "0.0\n";
    exit(0);
  }
}
void computeright() {
  l[0] = -1, r[0] = 1, r[n + 1] = -1, l[n + 1] = n;
  for (int i = 1; i <= n; ++i) l[i] = i - 1, r[i] = i + 1;
  validr[n + 1] = 1, valr[n + 1] = pos[n + 1] - 2 * d[n + 1];
  for (int i = n; i >= 1; --i) {
    queue<int> drop;
    if ((i < n) && (pos[r[i + 1]] - pos[l[i + 1]] > 2 * d[i + 1]))
      drop.push(i + 1);
    while (!drop.empty()) {
      int t = drop.front();
      drop.pop();
      int lt = l[t], rt = r[t];
      r[lt] = r[t];
      l[rt] = l[t];
      if (lt != i) {
        if (pos[r[lt]] - pos[l[lt]] > 2 * d[lt]) drop.push(lt);
      }
      if (rt != n + 1) {
        if (pos[r[rt]] - pos[l[rt]] > 2 * d[rt]) drop.push(rt);
      }
    }
    if (2 * d[i] - (pos[r[i]] - pos[i]) > 0) validr[i] = 1;
    valr[i] = pos[r[i]] - 2 * d[i];
  }
}
void init(int l = 0, int r = n, int node = 1) {
  if (l == r) {
    tree[node] = 1e9 + 5;
    return;
  }
  int mid = (l + r) / 2;
  init(l, mid, 2 * node);
  init(mid + 1, r, 2 * node + 1);
  tree[node] = min(tree[2 * node], tree[2 * node + 1]);
}
int findmin(int a, int b, int l = 0, int r = n, int node = 1) {
  if (a == l && b == r) return tree[node];
  int mid = (l + r) / 2;
  if (b <= mid) return findmin(a, b, l, mid, 2 * node);
  if (a >= mid + 1) return findmin(a, b, mid + 1, r, 2 * node + 1);
  return min(findmin(a, mid, l, mid, 2 * node),
             findmin(mid + 1, b, mid + 1, r, 2 * node + 1));
}
void upd(int v, int x, int l = 0, int r = n, int node = 1) {
  if (l == r) {
    tree[node] = x;
    return;
  }
  int mid = (l + r) / 2;
  if (v <= mid)
    upd(v, x, l, mid, 2 * node);
  else
    upd(v, x, mid + 1, r, 2 * node + 1);
  tree[node] = min(tree[2 * node], tree[2 * node + 1]);
}
void findans() {
  for (int i = 0; i <= n; ++i)
    sortr[i] = pair<long long, long long>(valr[i + 1], i + 1);
  sort(sortr, sortr + n + 1);
  for (int i = 0; i <= n; ++i) ind[sortr[i].second] = i;
  init();
  long long best = 1e9 + 5;
  for (int i = n; i >= 0; --i) {
    if (validr[i + 1]) upd(ind[i + 1], pos[i + 1]);
    if (!validl[i]) continue;
    int lo = -1, hi = n;
    while (lo != hi) {
      int mid = (lo + hi + 1) / 2;
      if (sortr[mid].first > vall[i])
        hi = mid - 1;
      else
        lo = mid;
    }
    if (lo != -1) best = min(best, findmin(0, lo) - pos[i]);
  }
  cout << fixed << setprecision(1) << 0.5 * best << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n + 2; ++i) cin >> pos[i];
  d[0] = d[n + 1] = 1LL * 1000000 * 1000000 + 5;
  for (int i = 1; i <= n; ++i) cin >> d[i];
  computeleft();
  computeright();
  findans();
}