Problem: 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>

Solution (in JAVA):

Solution:
import java.util.ArrayList;
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
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Reader in = new Reader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskH solver = new TaskH();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskH {
    long a, b, c, d, det;
    double quad() {
        double ans = Math.max(Math.min(Math.abs(a), Math.abs(d)), Math.min(Math.abs(b), Math.abs(c)));
        for (int ak = -1; ak <= 1; ak += 2)
            for (int bk = -1; bk <= 1; bk += 2)
                for (int ck = -1; ck <= 1; ck += 2)
                    for (int dk = -1; dk <= 1; dk += 2) {
                        long aa = ak * dk - bk * ck;
                        long bb = a * ak + d * dk - b * bk - c * ck;
                        long cc = det;
                        if (aa == 0) {
                            if (bb != 0) {
                                ans = Math.min(ans, Math.abs((double)cc / bb));
                            }
                        } else {
                            double dd = (double)bb * bb - (double)4 * aa * cc;
                            double eps = 1e-15;
                            if (dd > eps) {
                                double q1 = (-bb + Math.sqrt(dd)) / 2 / aa;
                                double q2 = (-bb - Math.sqrt(dd)) / 2 / aa;
                                ans = Math.min(ans, Math.min(Math.abs(q1), Math.abs(q2)));
                            } else if (Math.abs(dd) < eps) {
                                ans = Math.min(ans, Math.abs(-(double)bb / 2 / aa));
                            }
                        }
                    }
        return ans;
    }
    public void solve(int testNumber, Reader in, PrintWriter out) {
        a = in.nextLong();
        b = in.nextLong();
        c = in.nextLong();
        d = in.nextLong();
        det = a * d - b * c;
        if (det == 0) {
            out.println(0);
        } else {
            out.printf("%.10f\n", quad());
        }
    }
}

class Reader {
    private BufferedReader in;
    private StringTokenizer st;
    public Reader(InputStream is) {
        in = new BufferedReader(new InputStreamReader(is));
    }
    public String next() {
        try {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(in.readLine());
            }
            return st.nextToken();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

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

}