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
 */
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) {
		long a = in.nextInt();
		long b = in.nextInt();
		long c = in.nextInt();
		long d = in.nextInt();

		double res = Double.POSITIVE_INFINITY;

		for (int za = -1; za <= 1; za += 2) {
			for (int zb = -1; zb <= 1; zb += 2) {
				for (int zc = -1; zc <= 1; zc += 2) {
					for (int zd = -1; zd <= 1; zd += 2) {
						long A = za * zd - zb * zc;
						long B = d * za + a * zd - b * zc - c * zb;
						long C = a * d - b * c;
						if (A != 0) {
							double D2 = (double) B * B - (double) 4 * A * C;
							if (D2 >= 0) {
								double x1 = (-B + Math.sqrt(D2)) / 2 / A;
								double x2 = (-B - Math.sqrt(D2)) / 2 / A;
								if (x1 >= 0) res = Math.min(res, x1);
								if (x2 >= 0) res = Math.min(res, x2);
							}
						} else if (B != 0) {
							double x = -(double) C / B;
							if (x >= 0) res = Math.min(res, x);
						} else if (C == 0) {
							res = 0;
						}
					}
				}
			}
		}

		out.printf("%.18f\n", res);
	}
}

class InputReader {
	final InputStream is;
	final byte[] buf = new byte[1024];
	int pos;
	int size;

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

	public int nextInt() {
		int c = read();
		while (isWhitespace(c))
			c = read();
		int sign = 1;
		if (c == '-') {
			sign = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res = res * 10 + c - '0';
			c = read();
		} while (!isWhitespace(c));
		return res * sign;
	}

	int read() {
		if (size == -1)
			throw new InputMismatchException();
		if (pos >= size) {
			pos = 0;
			try {
				size = is.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (size <= 0)
				return -1;
		}
		return buf[pos++] & 255;
	}

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

}

