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

/**
 * 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;
		FastScanner in = new FastScanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskH solver = new TaskH();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskH {
    public void solve(int testNumber, FastScanner in, PrintWriter out) {
		int a = in.nextInt();
		int b = in.nextInt();
		int c = in.nextInt();
		int d = in.nextInt();
		double left = 0;
		double right = max(Math.abs(a), Math.abs(b), Math.abs(c), Math.abs(d));
		for (int it = 0; it < 1000; it++) {
			double mid = 0.5 * (left + right);
			if (can(a, b, c, d, mid)) {
				right = mid;
			} else {
				left = mid;
			}
		}
		out.printf("%.10f\n", 0.5 * (left + right));
    }

	private boolean can(int a, int b, int c, int d, double x) {
		double[] boundsA = bounds(a, x);
		double[] boundsB = bounds(b, x);
		double[] boundsC = bounds(c, x);
		double[] boundsD = bounds(d, x);
		double[] boundsAD = mul(boundsA, boundsD);
		double[] boundsBC = mul(boundsB, boundsC);
		return intersect(boundsAD, boundsBC);
	}

	private double[] mul(double[] boundsA, double[] boundsB) {
		double[] cand = {
				boundsA[0] * boundsB[0],
				boundsA[0] * boundsB[1],
				boundsA[1] * boundsB[0],
				boundsA[1] * boundsB[1],
		};
		return new double[]{min(cand), max(cand)};
	}

	private boolean intersect(double[] boundsA, double[] boundsB) {
		return Math.max(boundsA[0], boundsB[0]) <= Math.min(boundsA[1], boundsB[1]);
	}

	private double[] bounds(int a, double x) {
		return new double[]{-x - a, +x - a};
	}

	private double min(double... a) {
		double res = a[0];
		for (double x : a) {
			res = Math.min(res, x);
		}
		return res;
	}

	private double max(double... a) {
		double res = a[0];
		for (double x : a) {
			res = Math.max(res, x);
		}
		return res;
	}
}

class FastScanner {

	private BufferedReader in;
	private StringTokenizer st;

	public FastScanner(InputStream stream) {
		in = new BufferedReader(new InputStreamReader(stream));
	}

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

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

}

