The determinant of a matrix 2 × 2 is defined as follows:

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 <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/e78540a0de68f85833f82714a7141114b781276e.png" style="max-width: 100.0%;max-height: 100.0%;"/>. Consider any degenerate matrix *B* such that norm ||*A* - *B*|| is minimum possible. Determine ||*A* - *B*||.
The first line contains two integers *a* and *b* (|*a*|, |*b*| ≤ 10<sup class="upper-index">9</sup>), the elements of the first row of matrix *A*. 

The second line contains two integers *c* and *d* (|*c*|, |*d*| ≤ 10<sup class="upper-index">9</sup>) the elements of the second row of matrix *A*.
import math,string,itertools,fractions,heapq,collections,re,array,bisect
from itertools import chain, dropwhile, permutations, combinations
from collections import defaultdict, deque

def VI(): return list(map(int,input().split()))





def main(info=0):
    a,b = VI()
    c,d = VI()

    # the problem intend was to use some optimization / binary search, but a
    # deterministic solution has been proposed and is used here.  idea: given
    # A, the matrix B is same as A, with +/-x at every element (plus/minus
    # depend on the signs of A elements. It's easiest to compute all possible
    # cases (only 4). Then, we can formulate the equation for the determinant
    # of this B, and set it to 0.
    # This leads to:
    #
    # det(B) == 0 == ad-bc-x(a+b+c+d)+x^2-x^2 == ad-bc-x(a+b+c+d)+x^2-x^2
    #
    # since the first two terms are the determinant of A, and the last two go
    # away, we get:
    #
    # 0 == det(A) - x(a+b+c+d)  <==>   x=det(A)/(a+b+c+d)
    #
    # after taking care of the other signs, one gets other potential solutions
    # below.
    #
    # However, as has been noted, it has not been proven that this is the
    # optimal solution. But it seems to be.

    detA = a*d-b*c

    denom = max(abs(a + b + c + d), abs(a + d - c - b),
                abs(a + c - b - d), abs(a + b - c - d))
    ans = 0 if detA == 0 else abs(detA/denom)
    print(ans)



if __name__ == "__main__":
    main()
