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>
#include <bits/stdc++.h>
using namespace std;
const int inf = 100010;
const int MOD = 1000000007;
const double pi = acos(-1.0);
int gcd(int a, int b) { return (b == 0 ? a : gcd(b, a % b)); }
int lcm(int a, int b) { return (a * (b / gcd(a, b))); }
int fx[] = {0, 0, 1, -1};
int fy[] = {-1, 1, 0, 0};
double quadratic(double a, double b, double c) {
  double x1, x2, determinant, realPart, imaginaryPart;
  determinant = b * b - 4 * a * c;
  if (determinant > 0) {
    x1 = (-b + sqrt(determinant)) / (2 * a);
    x2 = (-b - sqrt(determinant)) / (2 * a);
    return min(abs(x1), abs(x2));
  } else if (determinant == 0) {
    x1 = (-b + sqrt(determinant)) / (2 * a);
    return abs(x1);
  } else {
    return INT_MAX;
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  int i = 0, j, k, l;
  int n, t, cnt = 0;
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  long long mul = a * d;
  mul -= (b * c);
  double ans = INT_MAX, minn = INT_MAX;
  int f1 = 1, f2 = 1, f3 = 1, f4 = 1;
  for (i = 0; i < 2; i++) {
    if (i == 1)
      f1 = -1;
    else
      f1 = 1;
    for (j = 0; j < 2; j++) {
      if (j == 1)
        f2 = -1;
      else
        f2 = 1;
      for (k = 0; k < 2; k++) {
        if (k == 1)
          f3 = -1;
        else
          f3 = 1;
        for (l = 0; l < 2; l++) {
          long long aa = a * f2;
          long long dd = d * f1;
          long long bb = b * f4;
          long long cc = c * f3;
          long long div = aa + dd - bb - cc;
          double c1, c2, c3;
          c3 = mul;
          int sum = f1 + f2 + f3 + f4;
          if (sum == 0 || sum == 4) {
            ans = (mul * 1.0) / (div * 1.0);
          } else if (f1 == f2) {
            ans = quadratic(2, div, mul);
          } else {
            ans = quadratic(-2, div, mul);
          }
          if (ans < 0) ans *= -1;
          minn = min(ans, minn);
        }
      }
    }
  }
  printf("%0.10lf", minn);
  return 0;
}
