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.math.BigInteger;
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 shu_mj @ http://shu-mj.com
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskH solver = new TaskH();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskH {
    Scanner in;
    PrintWriter out;

    public void solve(int testNumber, Scanner in, PrintWriter out) {
        this.in = in;
        this.out = out;
        run();
    }

    void run() {
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        int d = in.nextInt();
        double l = 0, r = 1e10;
        for (int i = 0; i < 1000; i++) {
            double m = (l + r) / 2;
            if (fit(m, a, b, c, d)) r = m;
            else l = m;
        }
        out.printf("%.10f%n", l);
    }

    private boolean fit(double m, int a, int b, int c, int d) {
        double l0, r0, l1, r1;
        {
            double u = a - m;
            double v = a + m;
            double x = d - m;
            double y = d + m;
            l0 = Math.min(u * x, Math.min(u * y, Math.min(v * x, v * y)));
            r0 = Math.max(u * x, Math.max(u * y, Math.max(v * x, v * y)));
        }
        {
            double u = b - m;
            double v = b + m;
            double x = c - m;
            double y = c + m;
            l1 = Math.min(u * x, Math.min(u * y, Math.min(v * x, v * y)));
            r1 = Math.max(u * x, Math.max(u * y, Math.max(v * x, v * y)));
        }
        return !(r0 < l1 || l0 > r1);
    }
}

class Scanner {
    BufferedReader br;
    StringTokenizer st;

    public Scanner(InputStream in) {
        br = new BufferedReader(new InputStreamReader(in));
        eat("");
    }

    private void eat(String s) {
        st = new StringTokenizer(s);
    }

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

    public boolean hasNext() {
        while (!st.hasMoreTokens()) {
            String s = nextLine();
            if (s == null)
                return false;
            eat(s);
        }
        return true;
    }

    public String next() {
        hasNext();
        return st.nextToken();
    }

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

}

