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*.
#!/usr/bin/python3

from math import sqrt

a, b = map(int, input().split())
c, d = map(int, input().split())

x = []
s = []

try:
    x += [(-a*d + b*c)/(a - b - c + d)]
    s +=  [1, 1, 1, 1]
except:
    pass

try:
    x +=  [-a/4 - b/4 + c/4 - d/4 - sqrt(a**2 + 2*a*b - 2*a*c - 6*a*d + b**2 + 6*b*c + 2*b*d + c**2 - 2*c*d + d**2)/4, 
           -a/4 - b/4 + c/4 - d/4 + sqrt(a**2 + 2*a*b - 2*a*c - 6*a*d + b**2 + 6*b*c + 2*b*d + c**2 - 2*c*d + d**2)/4]
    s +=  [1, 1, 1, -1] * 2
except:
    pass

try:
    x +=  [-a/4 + b/4 - c/4 - d/4 - sqrt(a**2 - 2*a*b + 2*a*c - 6*a*d + b**2 + 6*b*c - 2*b*d + c**2 + 2*c*d + d**2)/4, 
           -a/4 + b/4 - c/4 - d/4 + sqrt(a**2 - 2*a*b + 2*a*c - 6*a*d + b**2 + 6*b*c - 2*b*d + c**2 + 2*c*d + d**2)/4]
    s +=  [1, 1, -1, 1] * 2
except:
    pass

try:
    x +=  [(-a*d + b*c)/(a + b + c + d)]
    s +=  [1, 1, -1, -1]
except:
    pass

try:
    x +=  [-a/4 - b/4 - c/4 + d/4 - sqrt(a**2 + 2*a*b + 2*a*c + 6*a*d + b**2 - 6*b*c - 2*b*d + c**2 - 2*c*d + d**2)/4,
           -a/4 - b/4 - c/4 + d/4 + sqrt(a**2 + 2*a*b + 2*a*c + 6*a*d + b**2 - 6*b*c - 2*b*d + c**2 - 2*c*d + d**2)/4]
    s +=  [1, -1, 1, 1] * 2
except:
    pass

try:
    x +=  [(a*d - b*c)/(a - b + c - d)]
    s +=  [1, -1, 1, -1]
except:
    pass

try:
    x +=  [(a*d - b*c)/(a + b - c - d)]
    s +=  [1, -1, -1, 1]
except:
    pass

try:
    x +=  [-a/4 + b/4 + c/4 + d/4 - sqrt(a**2 - 2*a*b - 2*a*c + 6*a*d + b**2 - 6*b*c + 2*b*d + c**2 + 2*c*d + d**2)/4, 
           -a/4 + b/4 + c/4 + d/4 + sqrt(a**2 - 2*a*b - 2*a*c + 6*a*d + b**2 - 6*b*c + 2*b*d + c**2 + 2*c*d + d**2)/4]
    s +=  [1, -1, -1, -1] * 2
except:
    pass

try:
    x +=  [a/4 - b/4 - c/4 - d/4 - sqrt(a**2 - 2*a*b - 2*a*c + 6*a*d + b**2 - 6*b*c + 2*b*d + c**2 + 2*c*d + d**2)/4, 
           a/4 - b/4 - c/4 - d/4 + sqrt(a**2 - 2*a*b - 2*a*c + 6*a*d + b**2 - 6*b*c + 2*b*d + c**2 + 2*c*d + d**2)/4]
    s +=  [-1, 1, 1, 1] * 2
except:
    pass
try:
    s +=  [-1, 1, 1, -1]
    x +=  [(-a*d + b*c)/(a + b - c - d)]
except:
    pass

try:
    x +=  [(-a*d + b*c)/(a - b + c - d)]
    s +=  [-1, 1, -1, 1]
except:
    pass

try:
    x +=  [a/4 + b/4 + c/4 - d/4 - sqrt(a**2 + 2*a*b + 2*a*c + 6*a*d + b**2 - 6*b*c - 2*b*d + c**2 - 2*c*d + d**2)/4, 
           a/4 + b/4 + c/4 - d/4 + sqrt(a**2 + 2*a*b + 2*a*c + 6*a*d + b**2 - 6*b*c - 2*b*d + c**2 - 2*c*d + d**2)/4]
    s +=  [-1, 1, -1, -1] * 2
except:
    pass

try:
    x +=  [(a*d - b*c)/(a + b + c + d)]
    s +=  [-1, -1, 1, 1]
except:
    pass
try:
    x +=  [a/4 - b/4 + c/4 + d/4 - sqrt(a**2 - 2*a*b + 2*a*c - 6*a*d + b**2 + 6*b*c - 2*b*d + c**2 + 2*c*d + d**2)/4, a/4 - b/4 + c/4 + d/4 + sqrt(a**2 - 2*a*b + 2*a*c - 6*a*d + b**2 + 6*b*c - 2*b*d + c**2 + 2*c*d + d**2)/4]
    s +=  [-1, -1, 1, -1] * 2
except:
    pass

try:
    x +=  [a/4 + b/4 - c/4 + d/4 - sqrt(a**2 + 2*a*b - 2*a*c - 6*a*d + b**2 + 6*b*c + 2*b*d + c**2 - 2*c*d + d**2)/4, a/4 + b/4 - c/4 + d/4 + sqrt(a**2 + 2*a*b - 2*a*c - 6*a*d + b**2 + 6*b*c + 2*b*d + c**2 - 2*c*d + d**2)/4]
    s +=  [-1, -1, -1, 1] * 2
except:
    pass

try:
    x +=  [(a*d - b*c)/(a - b - c + d)]
    s +=  [-1, -1, -1, -1]
except:
    pass

print (min(map(abs,x)))

for i in range(len(x)):
    ss = s[4*i:4*i+4]
    #print (i, x[i], ss)
    aa = a + x[i] * ss[0]
    dd = d + x[i] * ss[1]
    bb = b + x[i] * ss[2]
    cc = c + x[i] * ss[3]
    #print (aa, bb, cc, dd)
    #print (aa * dd - bb * cc)
