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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author George Marcus
 */
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 {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        int d = in.nextInt();

        double st = 0.0;
        double dr = 2e9;
        double m = -1.0;
        for (int it = 0; it < 1000; it++) {
            m = (st + dr) / 2;
            if (can(a, b, c, d, m)) {
                dr = m;
            } else {
                st = m;
            }
        }

        out.format("%.10f\n", st);
    }

    private boolean can(double a, double b, double c, double d, double H) {
        double min1 = calcMin(a, d, H);
        double min2 = calcMin(b, c, H);
        double max1 = calcMax(a, d, H);
        double max2 = calcMax(b, c, H);
        double left = Math.max(min1, min2);
        double right = Math.min(max1, max2);
        return left <= right;
    }

    private double calcMax(double b, double c, double H) {
        double bmin = b - H;
        double bmax = b + H;
        double cmin = c - H;
        double cmax = c + H;
        double ret = bmin * cmin;
        ret = Math.max(ret, bmax * cmax);
        ret = Math.max(ret, bmin * cmax);
        ret = Math.max(ret, bmax * cmin);
        return ret;
    }

    private double calcMin(double a, double d, double H) {
        double amin = a - H;
        double amax = a + H;
        double dmin = d - H;
        double dmax = d + H;
        double ret = amin * dmin;
        ret = Math.min(ret, amax * dmax);
        ret = Math.min(ret, amin * dmax);
        ret = Math.min(ret, amax * dmin);
        if (Math.abs(a) <= H || Math.abs(d) <= H) {
            ret = Math.min(ret, 0);
        }
        return ret;
    }
}

class InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int nextInt() {
        return Integer.parseInt(nextString());
    }

    public String nextString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));

        return res.toString();
    }

    private boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

}

