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 EPS = 1e-10;
int INF = 2000000000;
long long INFF = 8000000000000000000LL;
double PI = acos(-1);
int dirx[8] = {-1, 0, 0, 1, -1, -1, 1, 1};
int diry[8] = {0, 1, -1, 0, -1, 1, -1, 1};
inline string IntToString(int a) {
  char x[100];
  sprintf(x, "%d", a);
  string s = x;
  return s;
}
inline int StringToInt(string a) {
  char x[100];
  int res;
  strcpy(x, a.c_str());
  sscanf(x, "%d", &res);
  return res;
}
inline string GetString(void) {
  char x[1000005];
  scanf("%s", x);
  string s = x;
  return s;
}
inline string uppercase(string s) {
  int n = (int)s.size();
  for (int(i) = (0); (i) < (n); ++(i))
    if (s[i] >= 'a' && s[i] <= 'z') s[i] = s[i] - 'a' + 'A';
  return s;
}
inline string lowercase(string s) {
  int n = (int)s.size();
  for (int(i) = (0); (i) < (n); ++(i))
    if (s[i] >= 'A' && s[i] <= 'Z') s[i] = s[i] - 'A' + 'a';
  return s;
}
inline void OPEN(string s) {
  freopen((s + ".in").c_str(), "r", stdin);
  freopen((s + ".out").c_str(), "w", stdout);
}
double a, b, c, d;
int coba[] = {-1, 1};
bool bisa(double x) {
  double maks = -INFF;
  double minn = INFF;
  for (int(i) = (0); (i) < (2); ++(i))
    for (int(j) = (0); (j) < (2); ++(j)) {
      double A = a + x * coba[i];
      double D = d + x * coba[j];
      maks = max(maks, A * D);
    }
  for (int(i) = (0); (i) < (2); ++(i))
    for (int(j) = (0); (j) < (2); ++(j)) {
      double B = b + x * coba[i];
      double C = c + x * coba[j];
      minn = min(minn, B * C);
    }
  if (maks >= minn) return true;
  return false;
}
int main() {
  scanf("%lf %lf %lf %lf", &a, &b, &c, &d);
  if (fabs(a * d - b * c) < EPS) {
    puts("0.0");
    return 0;
  }
  if (a * d > b * c) {
    swap(a, b);
    swap(c, d);
  }
  double L = 0;
  double R = INFF;
  double risan;
  for (int(i) = (0); (i) < (1000); ++(i)) {
    double M = (L + R) / 2;
    if (bisa(M)) {
      risan = M;
      R = M;
    } else
      L = M;
  }
  printf("%.10lf\n", risan);
  return 0;
}