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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;

public class A {

	static double[] a1, a2;
	static double ans;

	public static void main(String[] args) throws IOException {

//		double a = e(63, -3, -5, false);
//		System.out.println(a);
//		double b = getMin(127, -3, -5, false);
//		System.out.println(b);
		
		a1 = readDoubleArray();
		a2 = readDoubleArray();
		if (a1[0] == a1[1] && a2[0] == a2[1] && a1[0] == a2[0]) {
			ans = 0;
		} else if (Math.abs(a1[0]) == Math.abs(a2[1]) && Math.abs(a1[1]) == Math.abs(a2[0]) && a1[0]*a2[1] == a1[1]*a2[0]) {
			ans = 0;
		} else {

			double min = -Math.pow(2, 100);
			double max = Math.pow(2, 100);

			while (!areEqual(eval(min), eval(max)) || !areEqual((min), (max))) {
				double b1 = min + ((max - min) / 3d);
				double b2 = max - ((max - min) / 3d);
				double b1v = eval(b1);
				double b2v = eval(b2);
				if (b1v < b2v) {
					 if (max == b2) {
						 break;
					 }
					max = b2;
				} else {
					 if (min == b1) {
						 break;
					 }
					min = b1;
					b1v = eval(b1);
					b2v = eval(b2);
				}
			}

			ans = eval(min);
		}
		
		System.out.println(ans);
	}

	static double getMin(double val, double a, double b, boolean leftHalf) {
		double min = -Math.pow(2, 120);
		double max = Math.pow(2, 120);
		
		if (leftHalf) {
			max = 0;
		} else {
			min = 0;
		}

		while (min < max) {
			
//			if (max < 100 || min >= -100)
//				System.out.println();
//			
			double b1 = min + ((max - min) / 3d);
			double b2 = max - ((max - min) / 3d);

			double b1v = Math.max(Math.abs(a - b1), Math.abs(b - val / b1));
			double b2v = Math.max(Math.abs(a - b2), Math.abs(b - val / b2));

			if (b1v < b2v) {
				if (max == b2)
					break;
				max = b2;
			} else {
				if (min == b1)
					break;
				min = b1;
			}
		}

		double p = (max + min) / 2;
		double ans = Math.max(Math.abs(a - p), Math.abs(b - val / p));
		return ans;
	}

	static double eval(double v) {
		
		double[] res = new double[4];
		
		res[0] = getMin(v, a1[0], a2[1], true);
		res[1] = getMin(v, a1[1], a2[0], true);
		res[2] = getMin(v, a1[0], a2[1], false);
		res[3] = getMin(v, a1[1], a2[0], false);		
		
		return Math.max(Math.min(res[0], res[2]), Math.min(res[1], res[3]));
	}

	static boolean areEqual(double a, double b) {
		double abs = Math.abs(a - b);
		double rel = abs / (Math.abs(a) + Math.abs(b));
		return (abs < 0.0000000000001) ;
	}

	static InputStreamReader isr = new InputStreamReader(System.in);
	static BufferedReader br = new BufferedReader(isr);

	static double[] readDoubleArray() throws IOException {
		String[] v = br.readLine().split(" ");
		double[] ans = new double[v.length];

		for (int i = 0; i < ans.length; i++) {
			ans[i] = Double.valueOf(v[i]);
		}

		return ans;
	}
	
	static int[] readIntArray() throws IOException {
		String[] v = br.readLine().split(" ");
		int[] ans = new int[v.length];

		for (int i = 0; i < ans.length; i++) {
			ans[i] = Integer.valueOf(v[i]);
		}

		return ans;
	}

	static long[] readLongArray() throws IOException {
		String[] v = br.readLine().split(" ");
		long[] ans = new long[v.length];

		for (int i = 0; i < ans.length; i++) {
			ans[i] = Long.valueOf(v[i]);
		}

		return ans;
	}

	static <T> void print(List<T> v) {
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < v.size(); i++) {
			if (sb.length() > 0) {
				sb.append(' ');
			}

			sb.append(v.get(i));
		}

		System.out.println(sb);
	}

}
