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

public class H{
	public static boolean DEBUG = false;
	
	public static void main(String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		StringTokenizer st;
		
		st = getst(br);
		
		double a = nextDouble(st);
		double b = nextDouble(st);
		
		st = getst(br);
		
		double c = nextDouble(st);
		double d = nextDouble(st);
		
		/*
		if(a+b+c+d == 0){
			pw.println(Math.max(Math.abs(a),Math.max(Math.abs(b),Math.max(Math.abs(c),Math.abs(d)))));
		} else {
			double x = (b*c - a*d) / (a+b+c+d);
			pw.println(Math.abs(x));
		}
		*/
		
		double ans = Math.max(Math.abs(a),Math.max(Math.abs(b),Math.max(Math.abs(c),Math.abs(d))));
		for(int i = 0; i < 16; i++){
			double v = get(a, b, c, d, i);
			//debug(i + " " + v);
			if(v == -1){
				continue;
			}
			ans = Math.min(ans, v);
		}
		
		pw.println(ans);
		
		br.close();
		pw.close();
	}
	
	public static double get(double w, double x, double y, double z, int i){
		int k1 = (i & (1 << 0)) > 0 ? 1 : -1;
		int k2 = (i & (1 << 1)) > 0 ? 1 : -1;
		int k3 = (i & (1 << 2)) > 0 ? 1 : -1;
		int k4 = (i & (1 << 3)) > 0 ? 1 : -1;
		
		double a = k1*k2 - k3*k4;
		double b = w*k2 + z*k1 - x*k4 - y*k3;
		double c = w*z - x*y;
		
		if(a == 0){
			if(b == 0){
				return Math.abs(c);
			}
			return Math.abs(c/b);
		}
		
		if(b*b - 4*a*c < 0){
			return -1;
		}
		
		return Math.min(Math.abs((-b + Math.sqrt(b*b - 4*a*c))/(2*a)), Math.abs((-b - Math.sqrt(b*b - 4*a*c))/(2*a)));
	}
	
	public static void debug(Object o){
		if(DEBUG){
			System.out.println("~" + o);
		}
	}
	
	public static StringTokenizer getst(BufferedReader br) throws Exception{
		return new StringTokenizer(br.readLine(), " ");
	}
	
	public static int nextInt(BufferedReader br) throws Exception{
		return Integer.parseInt(br.readLine());
	}
	
	public static int nextInt(StringTokenizer st) throws Exception{
		return Integer.parseInt(st.nextToken());
	}
	
	public static long nextLong(BufferedReader br) throws Exception{
		return Long.parseLong(br.readLine());
	}
	
	public static long nextLong(StringTokenizer st) throws Exception{
		return Long.parseLong(st.nextToken());
	}
	
	public static double nextDouble(BufferedReader br) throws Exception{
		return Double.parseDouble(br.readLine());
	}
	
	public static double nextDouble(StringTokenizer st) throws Exception{
		return Double.parseDouble(st.nextToken());
	}
}