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 long double eps = 1e-20;
int dcmp(long double x) {
  if (fabs(x) < eps) return 0;
  return x > 0 ? 1 : -1;
}
struct pt {
  long double x, y;
};
long double dot(const pt &a, const pt &b) { return a.x * b.x + a.y * b.y; }
long double cross(const pt &a, const pt &b) { return a.x * b.y - a.y * b.x; }
bool chk(long double x, long double y, int a, int b, long double s) {
  pt p = (pt){x, y};
  pt p1 = (pt){a + s, b - s}, p2 = (pt){a + s, b + s};
  if (dcmp(dot(p, p1)) >= 0 && dcmp(dot(p, p2)) >= 0 &&
      dcmp(cross(p1, p)) >= 0 && dcmp(cross(p, p2)) >= 0)
    return 1;
  p1 = (pt){a + s, b + s}, p2 = (pt){a - s, b + s};
  if (dcmp(dot(p, p1)) >= 0 && dcmp(dot(p, p2)) >= 0 &&
      dcmp(cross(p1, p)) >= 0 && dcmp(cross(p, p2)) >= 0)
    return 1;
  p1 = (pt){a - s, b + s}, p2 = (pt){a - s, b - s};
  if (dcmp(dot(p, p1)) >= 0 && dcmp(dot(p, p2)) >= 0 &&
      dcmp(cross(p1, p)) >= 0 && dcmp(cross(p, p2)) >= 0)
    return 1;
  p1 = (pt){a - s, b - s}, p2 = (pt){a + s, b - s};
  if (dcmp(dot(p, p1)) >= 0 && dcmp(dot(p, p2)) >= 0 &&
      dcmp(cross(p1, p)) >= 0 && dcmp(cross(p, p2)) >= 0)
    return 1;
  return 0;
}
int a, b, c, d;
bool check(long double val) {
  if (val < 0) return 0;
  long double x1 = a - val, x2 = a + val, y1 = b - val, y2 = b + val;
  if (chk(x1, y1, c, d, val) || chk(x1, y2, c, d, val) ||
      chk(x2, y1, c, d, val) || chk(x2, y2, c, d, val))
    return 1;
  x1 = c - val, x2 = c + val, y1 = d - val, y2 = d + val;
  if (chk(x1, y1, a, b, val) || chk(x1, y2, a, b, val) ||
      chk(x2, y1, a, b, val) || chk(x2, y2, a, b, val))
    return 1;
  long double l1 = 1e20, r1 = -1e20;
  l1 = min(l1, (a + val) * (d + val));
  r1 = max(r1, (a + val) * (d + val));
  l1 = min(l1, (a - val) * (d + val));
  r1 = max(r1, (a - val) * (d + val));
  l1 = min(l1, (a + val) * (d - val));
  r1 = max(r1, (a + val) * (d - val));
  l1 = min(l1, (a - val) * (d - val));
  r1 = max(r1, (a - val) * (d - val));
  long double l2 = 1e20, r2 = -1e20;
  l2 = min(l2, (b + val) * (c + val));
  r2 = max(r2, (b + val) * (c + val));
  l2 = min(l2, (b - val) * (c + val));
  r2 = max(r2, (b - val) * (c + val));
  l2 = min(l2, (b + val) * (c - val));
  r2 = max(r2, (b + val) * (c - val));
  l2 = min(l2, (b - val) * (c - val));
  r2 = max(r2, (b - val) * (c - val));
  if (l1 > r2 || l2 > r1)
    return 0;
  else
    return 1;
}
int main() {
  scanf("%d%d%d%d", &a, &b, &c, &d);
  long double l = 0.0, r = 1e9;
  int num = 1000;
  while (num--) {
    long double mid = (r + l) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  double ans = r;
  printf("%.15f\n", ans);
}
