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 java.io.InputStreamReader;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.PrintStream;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.Writer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Nipuna Samarasekara
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastScanner in = new FastScanner(inputStream);
		FastPrinter out = new FastPrinter(outputStream);
		TaskH solver = new TaskH();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskH {
    public void solve(int testNumber, FastScanner in, FastPrinter out) {
    long[][] a= new long[2][2];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < 2; j++) {
                a[i][j]=in.nextLong();
            }

        }
        if (a[0][0]*a[1][1]==a[0][1]*a[1][0]) {
            out.println(0.0);
            return;

        }
     double eps= Math.pow(10,-100);
        double no=0.0,yes=1000000007.0;
        for (int i = 0; i < 500; i++)
        {
            double mid=(yes+no)/2.0;
            boolean pos=false;
            double min,max;
            double aa,dd,k,low;
            k=mid;

            aa=a[0][0];
            dd=a[1][1];
            min=Math.min((aa+k)*(dd+k),(aa-k)*(dd-k));
            min=Math.min(min,(aa+k)*(dd-k));
            min=Math.min(min,(aa-k)*(dd+k));
            max=Math.max((aa + k) * (dd + k), (aa - k) * (dd - k));
            max=Math.max(max, (aa + k) * (dd - k));
            max=Math.max(max, (aa - k) * (dd + k));
            low=(-(aa+dd)/2);
            if(Math.abs(low)<mid){
            k=low;
                min=Math.min((aa+k)*(dd+k),min);
                max=Math.max((aa+k)*(dd+k),max);
            }

            low=((aa-dd)/2);
            if(Math.abs(low)<mid){
                k=low;
                min=Math.min((aa+k)*(dd-k),min);
                max=Math.max((aa+k)*(dd-k),max);
            }



            double min1=min,max1=max;

            k=mid;

            aa=a[0][1];
            dd=a[1][0];
            min=Math.min((aa+k)*(dd+k),(aa-k)*(dd-k));
            min=Math.min(min,(aa+k)*(dd-k));
            min=Math.min(min,(aa-k)*(dd+k));
            max=Math.max((aa + k) * (dd + k), (aa - k) * (dd - k));
            max=Math.max(max, (aa + k) * (dd - k));
            max=Math.max(max, (aa - k) * (dd + k));
            low=(-(aa+dd)/2);
            if(Math.abs(low)<mid){
                k=low;
                min=Math.min((aa+k)*(dd+k),min);
                max=Math.max((aa+k)*(dd+k),max);
            }

            low=((aa-dd)/2);
            if(Math.abs(low)<mid){
                k=low;
                min=Math.min((aa+k)*(dd-k),min);
                max=Math.max((aa+k)*(dd-k),max);
            }


            double min2=min,max2=max;
            if (min1>min2-eps&&min1<max2+eps)pos=true;
            if (max1>min2-eps&&max1<max2+eps)pos=true;
             if (min2>min1-eps&&min2<max1+eps)pos=true;
            if (max2>min1-eps&&max2<max1+eps)pos=true;
if (pos)yes=mid;
            else no=mid;

        }
        out.println(yes);

    }
}

class FastScanner extends BufferedReader {

    public FastScanner(InputStream is) {
        super(new InputStreamReader(is));
    }

    public int read() {
        try {
            int ret = super.read();
return ret;
        } catch (IOException e) {
            throw new InputMismatchException();
        }
    }

    public String next() {
        StringBuilder sb = new StringBuilder();
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        if (c < 0) {
            return null;
        }
        while (c >= 0 && !isWhiteSpace(c)) {
            sb.appendCodePoint(c);
            c = read();
        }
        return sb.toString();
    }

    static boolean isWhiteSpace(int c) {
        return c >= 0 && c <= 32;
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public String readLine() {
        try {
            return super.readLine();
        } catch (IOException e) {
            return null;
        }
    }

}

class FastPrinter extends PrintWriter {

    public FastPrinter(OutputStream out) {
        super(out);
    }


}

