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>
import com.sun.corba.se.impl.orbutil.graph.Graph;
import javafx.util.Pair;

import java.io.*;
import java.util.*;

/**
 * Created by VIET ANH on 27/04/2015.
 */
import javafx.util.Pair;

import java.util.Vector;

/**
 * Created by VIET ANH on 30/05/2015.
 */
public class test {

    private static int T;
    private static long oo=Long.MAX_VALUE;
    private static int base=1000000007;


    public static void main(String[] args) throws IOException {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int a=in.nextInt();
        int b=in.nextInt();
        int c=in.nextInt();
        int d=in.nextInt();
        double l=0,r=1000000000;
        for (int i = 0; i < 1000000; i++) {
            double mid=(l+r)/2;
            double a1=a+mid,a2=a-mid;
            double b1=b+mid,b2=b-mid;
            double c1=c+mid,c2=c-mid;
            double d1=d+mid,d2=d-mid;
            double[] lr1=solve(a1,a2,d1,d2);
            double[] lr2=solve(b1,b2,c1,c2);
            if (pass(lr1,lr2)) {
                r=mid;
            }
            else l=mid;
        }
        out.print(r);
        out.close();
    }

    private static boolean pass(double[] lr1, double[] lr2) {
        return (in(lr1[0],lr2)||in(lr1[1],lr2)||in(lr2[0],lr1)||in(lr2[1],lr1));
    }

    private static boolean in(double v, double[] lr1) {
        return (lr1[1]<=v)&&(v<=lr1[0]);
    }

    private static double[] solve(double a1, double a2, double d1, double d2) {
        return new double[]{Math.max(a1*d1,Math.max(a1*d2,Math.max(a2*d1,a2*d2))),Math.min(a1 * d1, Math.min(a1 * d2, Math.min(a2 * d1, a2 * d2)))};
    }


}
