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;
double f[2][2];
bool intz(double lo, double hi) { return lo <= 0 && 0 <= hi; }
bool can(double eps) {
  double x0 = f[0][0] - eps, x1 = f[0][0] + eps;
  double y0 = f[0][1] - eps, y1 = f[0][1] + eps;
  double z0 = f[1][0] - eps, z1 = f[1][0] + eps;
  double w0 = f[1][1] - eps, w1 = f[1][1] + eps;
  bool bb = intz(x0, x1) || intz(w0, w1);
  if ((intz(y0, y1) || intz(z0, z1)) && bb) return true;
  double d[4] = {y0 * z0, y0 * z1, y1 * z0, y1 * z1};
  if (bb) {
    if (!intz(x0, x1)) {
      swap(x0, w0);
      swap(x1, w1);
    }
    for (int i = (0); i < (4); ++i) {
      double r = d[i] / x0;
      if ((r < 0 && r >= w0) || (r > 0 && r < w1)) return true;
      r = d[i] / x1;
      if ((r < 0 && r >= w0) || (r > 0 && r < w1)) return true;
    }
    return false;
  } else {
    double maxv = -1e300, minv = 1e300;
    for (int i = (0); i < (4); ++i) {
      maxv = max(maxv, max(d[i] / x0, d[i] / x1));
      minv = min(minv, min(d[i] / x0, d[i] / x1));
    }
    return maxv >= w0 && minv <= w1;
  }
}
int main() {
  for (int r = (0); r < (2); ++r)
    for (int c = (0); c < (2); ++c) cin >> f[r][c];
  can(0.2);
  double lo = 0, hi = 1e12;
  for (int qq1 = (0); qq1 < (500); ++qq1) {
    double mid = (lo + hi) / 2;
    if (can(mid))
      hi = mid;
    else
      lo = mid;
  }
  printf("%.10lf\n", (lo + hi) / 2);
}