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 double pi = acos(0.0) * 2.0;
const long double eps = 1e-10;
const int step[8][2] = {{-1, 0}, {0, 1}, {1, 0},  {0, -1},
                        {-1, 1}, {1, 1}, {1, -1}, {-1, -1}};
template <class T>
inline T abs1(T a) {
  return a < 0 ? -a : a;
}
template <typename t, typename t1>
t min1(t a, t1 b) {
  return a < b ? a : b;
}
template <typename t, typename... arg>
t min1(t a, arg... arr) {
  return min1(a, min1(arr...));
}
template <typename t, typename t1>
t max1(t a, t1 b) {
  return a > b ? a : b;
}
template <typename t, typename... arg>
t max1(t a, arg... arr) {
  return max1(a, max1(arr...));
}
inline int jud(double a, double b) {
  if (abs(a) < eps && abs(b) < eps)
    return 0;
  else if (abs1(a - b) / abs1(a) < eps)
    return 0;
  if (a < b) return -1;
  return 1;
}
template <typename t>
inline int jud(t a, t b) {
  if (a < b) return -1;
  if (a == b) return 0;
  return 1;
}
template <typename it, typename t1>
inline int find(t1 val, it a, int na, bool f_small = 1, bool f_lb = 1) {
  int be = 0, en = na - 1;
  if (*a <= *(a + na - 1)) {
    if (f_lb == 0)
      while (be < en) {
        int mid = (be + en + 1) / 2;
        if (jud(*(a + mid), val) != 1)
          be = mid;
        else
          en = mid - 1;
      }
    else
      while (be < en) {
        int mid = (be + en) / 2;
        if (jud(*(a + mid), val) != -1)
          en = mid;
        else
          be = mid + 1;
      }
    if (f_small && jud(*(a + be), val) == 1) be--;
    if (!f_small && jud(*(a + be), val) == -1) be++;
  } else {
    if (f_lb)
      while (be < en) {
        int mid = (be + en + 1) / 2;
        if (jud(*(a + mid), val) != -1)
          be = mid;
        else
          en = mid - 1;
      }
    else
      while (be < en) {
        int mid = (be + en) / 2;
        if (jud(*(a + mid), val) != 1)
          en = mid;
        else
          be = mid + 1;
      }
    if (!f_small && jud(*(a + be), val) == -1) be--;
    if (f_small && jud(*(a + be), val) == 1) be++;
  }
  return be;
}
template <class T>
inline T lowb(T num) {
  return num & (-num);
}
inline int bitnum(unsigned int nValue) { return __builtin_popcount(nValue); }
inline int bitnum(int nValue) { return __builtin_popcount(nValue); }
inline int bitnum(unsigned long long nValue) {
  return __builtin_popcount(nValue) + __builtin_popcount(nValue >> 32);
}
inline int bitnum(long long nValue) {
  return __builtin_popcount(nValue) + __builtin_popcount(nValue >> 32);
}
inline int bitmaxl(unsigned int a) {
  if (a == 0) return 0;
  return 32 - __builtin_clz(a);
}
inline int bitmaxl(int a) {
  if (a == 0) return 0;
  return 32 - __builtin_clz(a);
}
inline int bitmaxl(unsigned long long a) {
  int temp = a >> 32;
  if (temp) return 32 - __builtin_clz(temp) + 32;
  return bitmaxl(int(a));
}
inline int bitmaxl(long long a) {
  int temp = a >> 32;
  if (temp) return 32 - __builtin_clz(temp) + 32;
  return bitmaxl(int(a));
}
long long pow(long long n, long long m, long long mod = 0) {
  if (m < 0) return 0;
  long long ans = 1;
  long long k = n;
  while (m) {
    if (m & 1) {
      ans *= k;
      if (mod) ans %= mod;
    }
    k *= k;
    if (mod) k %= mod;
    m >>= 1;
  }
  return ans;
}
template <class t1, class t2>
inline void add(t1 &a, t2 b, int mod = -1) {
  if (mod == -1) mod = 1000000007;
  a += b;
  while (a >= mod) a -= mod;
  while (a < 0) a += mod;
}
template <class t>
void output1(t arr) {
  for (int i = 0; i < (int)arr.size(); i++) cerr << arr[i] << ' ';
  cerr << endl;
}
template <class t>
void output2(t arr) {
  for (int i = 0; i < (int)arr.size(); i++) output1(arr[i]);
}
const int maxn = 100100;
int range[maxn];
int loc[maxn], can[maxn];
double lef[maxn];
int wh[maxn];
int n;
int st[maxn], lst = 0;
int larr;
struct node {
  int loc, cate, to;
  node(int a = 0, int b = 0, int c = 0) : loc(a), cate(b), to(c) {}
  bool operator<(const node &a) const {
    if (loc == a.loc) {
      if (cate == -2) return 1;
      if (a.cate == -2) return 0;
      return cate > a.cate;
    }
    return loc < a.loc;
  }
} arr[maxn * 4];
inline int getl(int no) { return int(loc[no] - lef[no] * 2 + eps); }
inline int getr(int no) { return int(loc[no] + lef[no] * 2 + eps); }
int main() {
  ios_base::sync_with_stdio(0);
  scanf("%d", &n);
  for (int i = 0; i < n + 2; i++) scanf("%d", loc + i);
  for (int i = 1; i <= n; i++) scanf("%d", can + i);
  st[lst++] = n + 1;
  lef[n + 1] = loc[n + 1];
  int flag = 0;
  for (int i = n; i >= 1; i--) {
    while (getl(st[lst - 1]) > loc[i]) lst--;
    if (can[i] * 2 > loc[st[lst - 1]] - loc[i]) {
      lef[i] = can[i] - (loc[st[lst - 1]] - loc[i]) / 2;
      arr[larr++] = node(getl(i), 2, loc[i]);
      arr[larr++] = node(loc[i], -2, getl(i));
      while (lst && getl(i) <= getl(st[lst - 1])) lst--;
      st[lst++] = i;
      if (getl(i) <= loc[0]) flag = 1;
    }
  }
  if (flag) {
    puts("0");
    return 0;
  }
  lst = 0;
  st[lst++] = 0;
  lef[0] = loc[n + 1];
  for (int i = 1; i <= n; i++) {
    while (getr(st[lst - 1]) < loc[i]) lst--;
    if (can[i] * 2 > -loc[st[lst - 1]] + loc[i]) {
      lef[i] = can[i] - (-loc[st[lst - 1]] + loc[i]) / 2;
      arr[larr++] = node(getr(i), -1, loc[i]);
      arr[larr++] = node(loc[i], 1, getr(i));
      while (lst && getr(i) >= getr(st[lst - 1])) lst--;
      st[lst++] = i;
    }
  }
  double ans = 1e60;
  multiset<int> ms[2];
  ms[0].insert(loc[0]);
  ms[1].insert(loc[n + 1]);
  sort(arr, arr + larr);
  for (int i = 0; i < larr; i++) {
    if (arr[i].to == arr[i].loc) continue;
    if (arr[i].cate > 0) {
      int c = arr[i].cate - 1;
      if (c == 1)
        ms[c].insert(arr[i].to);
      else
        ms[c].insert(arr[i].loc);
    } else {
      int c = abs(arr[i].cate) - 1;
      int rc = 1 - c;
      int p = *ms[rc].begin(), rp = arr[i].to;
      if (c == 1) rp = arr[i].loc;
      ans = min(fabs(1.0 * p - rp) / 2, ans);
      ms[c].erase(ms[c].find(rp));
    }
  }
  printf("%.5f\n", min(max(ans, 0.0), 1.0 * (loc[n + 1] - loc[0]) / 2));
  return 0;
}