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

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

class TaskH {
    private final int max = 10000;
    private final double eps = 1e-18;
    private double a, b, c, d;

    private boolean Check(double mid) {
        double da = a - mid, ta = a + mid;
        double db = b - mid, tb = b + mid;
        double dc = c - mid, tc = c + mid;
        double dd = d - mid, td = d + mid;

        double maxad = Math.max(da * dd, Math.max(da * td, Math.max(ta * dd, ta * td)));
        double minad = Math.min(da * dd, Math.min(da * td, Math.min(ta * dd, ta * td)));

        double maxbc = Math.max(db * dc, Math.max(db * tc, Math.max(tb * dc, tb * tc)));
        double minbc = Math.min(db * dc, Math.min(db * tc, Math.min(tb * dc, tb * tc)));

        if (minad > minbc) {
            double tmp = minad; minad = minbc; minbc = tmp;
            tmp = maxad; maxad = maxbc; maxbc = tmp;
        }

        return (maxad - minbc > -eps ? true : false);
    }

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        a = in.nextDouble(); b = in.nextDouble(); c = in.nextDouble(); d = in.nextDouble();

        double res = 0.0;
        double l = 0.0, r = 1e18;
        int cnt = 0;
        while (++cnt <= max) {
            double mid = (l + r) / 2.0;
            if (Check(mid)) {
                r = mid; res = mid;
            }
            else l = mid;
        }

        out.printf("%.13f", res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}

