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 warning(disable : 4996)
#pragma comment(linker, "/STACK:36777216")
using namespace std;
const long long int inf = 100000000000000000LL;
void q(double &a, double &b) {
  if (a > b) {
    swap(a, b);
  }
}
void solve(double &q, double &w, double a1, double a2, double b1, double b2) {
  double c = a1 * b1;
  c = min(c, a1 * b2);
  c = min(c, a2 * b1);
  c = min(c, a2 * b2);
  q = c;
  double d = a1 * b1;
  d = max(d, a1 * b2);
  d = max(d, a2 * b1);
  d = max(d, a2 * b2);
  w = d;
}
int check(long long int a, long long int b, long long int c, long long int d,
          double m) {
  double a1 = a - m, a2 = a + m;
  double b1 = b - m, b2 = b + m;
  double c1 = c - m, c2 = c + m;
  double d1 = d - m, d2 = d + m;
  q(a1, a2);
  q(b1, b2);
  q(c1, c2);
  q(d1, d2);
  double q1, q2;
  solve(q1, q2, a1, a2, d1, d2);
  double w1, w2;
  solve(w1, w2, b1, b2, c1, c2);
  if (max(q1, w1) <= min(q2, w2)) {
    return 1;
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << fixed << setprecision(15);
  srand(13);
  long long int a, b, c, d;
  cin >> a >> b >> c >> d;
  long long int m = 0;
  int n = 0;
  if (abs(a) > m) {
    if (a < 0)
      n = 1;
    else
      n = 0;
    m = abs(a);
  }
  if (abs(b) > m) {
    if (b < 0)
      n = 1;
    else
      n = 0;
    m = abs(b);
  }
  if (abs(c) > m) {
    if (c < 0)
      n = 1;
    else
      n = 0;
    m = abs(c);
  }
  if (abs(d) > m) {
    if (d < 0)
      n = 1;
    else
      n = 0;
    m = abs(d);
  }
  if (n) {
    a *= -1;
    b *= -1;
    c *= -1;
    d *= -1;
  }
  double l = 0, r = max(a, max(b, max(c, d)));
  int s = clock();
  for (int i = 0; i < 10000000; ++i) {
    double m = (r + l) / 2;
    if (check(a, b, c, d, m)) {
      r = m;
    } else {
      l = m;
    }
  }
  cout << r;
  return 0;
}