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.util.*;
import java.io.*;
import java.math.BigDecimal;

public class cf549H {
	static InputReader in = new InputReader();
	static String str;
	static String[] arr;

	public static void main(String[] args) throws Exception {
		str = in.readLine();
		double a = Integer.parseInt(str.substring(0, str.indexOf(" ")));
		double b = Integer.parseInt(str.substring(str.indexOf(" ") + 1));
		str = in.readLine();
		double c = Integer.parseInt(str.substring(0, str.indexOf(" ")));
		double d = Integer.parseInt(str.substring(str.indexOf(" ") + 1));
		BigDecimal min = new BigDecimal(0.0);
		BigDecimal max = new BigDecimal(Math.pow(10, 9));
		while(Math.abs(min.subtract(max).doubleValue()) > Math.pow(10, -12)) {
			BigDecimal mid = min.add(max).divide(new BigDecimal("2"));
			BigDecimal mina = new BigDecimal(a).subtract(mid);
			BigDecimal maxa = new BigDecimal(a).add(mid);
			BigDecimal mind = new BigDecimal(d).subtract(mid);
			BigDecimal maxd = new BigDecimal(d).add(mid);
			BigDecimal maxprod1 = mina.multiply(mind).max(maxa.multiply(maxd).max(mina.multiply(maxd).max(maxa.multiply(mind))));
			BigDecimal minprod1 = mina.multiply(mind).min(maxa.multiply(maxd).min(mina.multiply(maxd).min(maxa.multiply(mind))));

			BigDecimal minb = new BigDecimal(b).subtract(mid);
			BigDecimal maxb = new BigDecimal(b).add(mid);
			BigDecimal minc = new BigDecimal(c).subtract(mid);
			BigDecimal maxc = new BigDecimal(c).add(mid);
			BigDecimal maxprod2 = minb.multiply(minc).max(maxb.multiply(maxc).max(minb.multiply(maxc).max(maxb.multiply(minc))));
			BigDecimal minprod2 = minb.multiply(minc).min(maxb.multiply(maxc).min(minb.multiply(maxc).min(maxb.multiply(minc))));
			boolean works = false;
			if(minprod2.compareTo(minprod1) <= 0 && minprod1.compareTo(maxprod2) <= 0) {
				works = true;
			}
			if(minprod2.compareTo(maxprod1) <= 0 && maxprod1.compareTo(maxprod2) <= 0) {
				works = true;
			}
			if(minprod1.compareTo(minprod2) <= 0 && minprod2.compareTo(maxprod1) <= 0) {
				works = true;
			}
			if(minprod1.compareTo(maxprod2) <= 0 && maxprod2.compareTo(maxprod1) <= 0) {
				works = true;
			}
			if(works) {
				max = mid;
			} else {
				min = mid;
			}
			// System.out.println(min + " " + max + " " + mid + " " + works);
		}
		System.out.printf("%.10f%n", min);
	}
	
	static class InputReader {
		BufferedReader br;

		public InputReader() {
			try {
				br = new BufferedReader(new FileReader("cf549H.in"));
			} catch(Exception e) {
				br = new BufferedReader(new InputStreamReader(System.in));
			}
		}

		public String readLine() throws Exception {
			return br.readLine();
		}
	}
}