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.IOException;
import java.io.OutputStreamWriter;
import java.math.BigDecimal;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Alex
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskH solver = new TaskH();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskH {
    public void solve(int testNumber, InputReader in, OutputWriter out){
	    BigDecimal a = BigDecimal.valueOf(in.ri());
	    BigDecimal b = BigDecimal.valueOf(in.ri());
	    BigDecimal c = BigDecimal.valueOf(in.ri());
	    BigDecimal d = BigDecimal.valueOf(in.ri());
	    int curpos = ((a.multiply(d)).subtract((b.multiply(c)))).compareTo(BigDecimal.valueOf(0));
	    BigDecimal min = new BigDecimal(0), max = new BigDecimal(1.1e18);
	    for(int i = 0; i < 200; i++) {
		    BigDecimal avg = (min.add(max)).divide(BigDecimal.valueOf(2));
		    boolean works = false;
		    for(int ach = -1; ach <= 1; ach += 2) {
			    for(int bch = -1; bch <= 1; bch += 2) {
				    for(int cch = -1; cch <= 1; cch += 2) {
					    for(int dch = -1; dch <= 1; dch += 2) {
						    BigDecimal aa = a.add(avg.multiply(BigDecimal.valueOf(ach)));
						    BigDecimal bb = b.add(avg.multiply(BigDecimal.valueOf(bch)));
						    BigDecimal cc = c.add(avg.multiply(BigDecimal.valueOf(cch)));
						    BigDecimal dd = d.add(avg.multiply(BigDecimal.valueOf(dch)));
						    BigDecimal res = (aa.multiply(dd)).subtract(bb.multiply(cc));
						    int newpos = res.compareTo(BigDecimal.valueOf(0));
						    if(newpos != curpos) works = true;
					    }
				    }
			    }
		    }
		    if(works) max = avg;
		    else min = avg;
	    }
	    out.printLine(min);
    }
}

class InputReader {
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

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

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}
	public int ri(){
		return readInt();
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}
	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}

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

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}
	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}
	public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}
	public void close() {
		writer.close();
	}
}

