Problem: The determinant of a matrix 2 × 2 is defined as follows:

<image>

A matrix is called degenerate if its determinant is equal to zero. 

The norm ||A|| of a matrix A is defined as a maximum of absolute values of its elements.

You are given a matrix <image>. Consider any degenerate matrix B such that norm ||A - B|| is minimum possible. Determine ||A - B||.

Input

The first line contains two integers a and b (|a|, |b| ≤ 109), the elements of the first row of matrix A. 

The second line contains two integers c and d (|c|, |d| ≤ 109) the elements of the second row of matrix A.

Output

Output a single real number, the minimum possible value of ||A - B||. Your answer is considered to be correct if its absolute or relative error does not exceed 10 - 9.

Examples

Input

1 2
3 4


Output

0.2000000000


Input

1 0
0 1


Output

0.5000000000

Note

In the first sample matrix B is <image>

In the second sample matrix B is <image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
void bug(string st = "bug") { cout << st << endl; }
template <typename __ll>
inline void READ(__ll &m) {
  __ll x = 0, f = 1;
  char ch = getchar();
  while (!(ch >= '0' && ch <= '9')) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  m = x * f;
}
template <typename __ll>
inline void read(__ll &m) {
  READ(m);
}
template <typename __ll>
inline void read(__ll &m, __ll &a) {
  READ(m);
  READ(a);
}
template <typename __ll>
inline void read(__ll &m, __ll &a, __ll &b) {
  READ(m);
  READ(a);
  READ(b);
}
long double tmp[4][2];
long double max(long double a, long double b) {
  if (a - b >= 1e-9) return a;
  return b;
}
long double min(long double a, long double b) {
  if (a - b >= 1e-9) return b;
  return a;
}
long double LL(int idx1, int idx2) {
  long double minn =
      min(tmp[idx1][0] * tmp[idx2][0], tmp[idx1][1] * tmp[idx2][1]);
  minn =
      min(minn, min(tmp[idx2][0] * tmp[idx1][1], tmp[idx2][1] * tmp[idx1][0]));
  return minn;
}
long double RR(int idx1, int idx2) {
  long double maxn =
      max(tmp[idx1][0] * tmp[idx2][0], tmp[idx1][1] * tmp[idx2][1]);
  maxn =
      max(maxn, max(tmp[idx2][0] * tmp[idx1][1], tmp[idx2][1] * tmp[idx1][0]));
  return maxn;
}
int main() {
  long double a, b, c, d;
  cin >> a >> b >> c >> d;
  if (a <= 0 && d <= 0 && c <= 0 && d <= 0) a = -a, b = -b, c = -c, d = -d;
  long double r = max(fabs(a), max(fabs(b), max(fabs(c), fabs(d))));
  long double l = 0.0;
  int cas = 1000000;
  while (cas--) {
    long double mid = (l / 2.0 + r / 2.0);
    tmp[0][0] = a - mid;
    tmp[0][1] = a + mid;
    tmp[1][0] = b - mid;
    tmp[1][1] = b + mid;
    tmp[2][0] = c - mid;
    tmp[2][1] = c + mid;
    tmp[3][0] = d - mid;
    tmp[3][1] = d + mid;
    long double Lad = LL(0, 3), Rad = RR(0, 3);
    long double Lbc = LL(1, 2), Rbc = RR(1, 2);
    long double lll = max(Lad, Lbc), rrr = min(Rad, Rbc);
    if (rrr - lll > 1e-9)
      r = mid;
    else
      l = mid;
  }
  printf("%.10f\n", fabs((l + r) / 2.0));
  return 0;
}