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.io.*;

import java.awt.geom.Point2D;
import java.text.*;
import java.math.*;
import java.util.*;

public class CopyOfMain implements Runnable {

	final String filename = "";

	public void solve() throws Exception {
		long a = lread(), b = lread(), c = lread(), d = lread();

		double ans = Math.max(Math.abs(a),
				Math.max(Math.abs(b), Math.max(Math.abs(c), Math.abs(d))));

		for (int mask = 0; mask <= 15; mask++) {
			int sgnA = (mask & 1) != 0 ? 1 : -1;
			int sgnB = (mask & 2) != 0 ? 1 : -1;
			int sgnC = (mask & 4) != 0 ? 1 : -1;
			int sgnD = (mask & 8) != 0 ? 1 : -1;

			long A = 0, B = 0, C = 0;
			A += sgnA * sgnD;
			B += sgnA * d + sgnD * a;
			C += a * d;

			A -= sgnB * sgnC;
			B -= sgnB * c + sgnC * b;
			C -= b * c;

			if (A == 0) {
				if (B == 0) {
					if (C == 0)
						ans = 0;
				} else {
					ans = Math.min(ans, Math.abs(C * 1.0 / B));
				}
			} else {
				BigInteger bb = BigInteger.valueOf(B * B).subtract(
						BigInteger.valueOf(A * C).multiply(
								BigInteger.valueOf(4)));
				if (bb.compareTo(BigInteger.ZERO) >= 0) {
					double D = bb.doubleValue();
					double det = Math.sqrt(D);
					ans = Math.min(ans, Math.abs((B + det) / 2.0 / A));
					ans = Math.min(ans, Math.abs((B - det) / 2.0 / A));
				}
			}
		}
		out.write(df.format(ans) + "\n");
	}

	DecimalFormat df = new DecimalFormat("0.0000000000");

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new BufferedWriter(new OutputStreamWriter(System.out));
			// in = new BufferedReader(new FileReader(filename+".in"));
			// out = new BufferedWriter(new FileWriter(filename+".out"));
			solve();
			out.flush();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	public int iread() throws Exception {
		return Integer.parseInt(readword());
	}

	public double dread() throws Exception {
		return Double.parseDouble(readword());
	}

	public long lread() throws Exception {
		return Long.parseLong(readword());
	}

	BufferedReader in;

	BufferedWriter out;

	public String readword() throws IOException {
		StringBuilder b = new StringBuilder();
		int c;
		c = in.read();
		while (c >= 0 && c <= ' ')
			c = in.read();
		if (c < 0)
			return "";
		while (c > ' ') {
			b.append((char) c);
			c = in.read();
		}
		return b.toString();
	}

	public static void main(String[] args) {
		try {
			Locale.setDefault(Locale.US);
		} catch (Exception e) {

		}
		// new Thread(new Main()).start();
		new Thread(null, new CopyOfMain(), "1", 1 << 25).start();
	}
}