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>
#pragma GCC optimize(3)
using namespace std;
const double eps = 1e-12;
double a, b, c, d;
double ans = 1.0 / 0.0;
inline int intersect(double xl, double xr, double yl, double yr) {
  if (xl <= yl && yr <= xr) return 1;
  if (yl <= xl && xr <= yr) return 1;
  if (yl <= xl && yr >= xl) return 1;
  if (yl <= xr && yr >= xr) return 1;
  if (xl <= yl && xr >= yl) return 1;
  if (xl <= yr && xr >= yr) return 1;
  return 0;
}
inline double F(double x) {
  double l1 = min((a + x) * (b + x), (a - x) * (b - x)),
         l2 = max((a + x) * (b + x), (a - x) * (b - x)), tmp = (-a - b) * 0.5;
  l1 = min(l1, (a + x) * (b - x)), l2 = max(l2, (a + x) * (b - x));
  l1 = min(l1, (a - x) * (b + x)), l2 = max(l2, (a - x) * (b + x));
  l1 = min(l1, (a) * (b + x)), l2 = max(l2, (a) * (b + x));
  l1 = min(l1, (a) * (b - x)), l2 = max(l2, (a) * (b - x));
  l1 = min(l1, (a + x) * (b)), l2 = max(l2, (a + x) * (b));
  l1 = min(l1, (a - x) * (b)), l2 = max(l2, (a - x) * (b));
  if (abs(tmp) <= x) {
    l1 = min(l1, (a + tmp) * (b + tmp)), l2 = max(l2, (a + tmp) * (b + tmp));
    l1 = min(l1, (a - tmp) * (b - tmp)), l2 = max(l2, (a - tmp) * (b - tmp));
  }
  double r1 = min((c + x) * (d + x), (c - x) * (d - x)),
         r2 = max((c + x) * (d + x), (c - x) * (d - x));
  r1 = min(r1, (c + x) * (d - x)), r2 = max(r2, (c + x) * (d - x));
  r1 = min(r1, (c - x) * (d + x)), r2 = max(r2, (c - x) * (d + x));
  r1 = min(r1, (c) * (d + x)), r2 = max(r2, (c) * (d + x));
  r1 = min(r1, (c) * (d - x)), r2 = max(r2, (c) * (d - x));
  r1 = min(r1, (c + x) * (d)), r2 = max(r2, (c + x) * (d));
  r1 = min(r1, (c - x) * (d)), r2 = max(r2, (c - x) * (d));
  tmp = (-c - d) * 0.5;
  if (abs(tmp) <= x) {
    r1 = min(r1, (c + tmp) * (d + tmp)), r2 = max(r2, (c + tmp) * (d + tmp));
    r1 = min(r1, (c - tmp) * (d - tmp)), r2 = max(r2, (c - tmp) * (d - tmp));
  }
  return intersect(l1, l2, r1, r2);
}
int main() {
  scanf("%lf%lf%lf%lf", &a, &c, &d, &b);
  double L = 0, R = 1000000000;
  for (int i = 1; i <= 1000000; ++i) {
    double mid = (L + R) * 0.5;
    if (F(mid)) {
      ans = min(ans, mid);
      R = mid - eps;
    } else {
      L = mid + eps;
    }
  }
  printf("%.12f\n", abs(ans));
  return 0;
}