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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class Temp {
    public static void main(String[] args) {
        new Temp().run();
    }

    BufferedReader br;
    StringTokenizer in;
    PrintWriter out;

    public String nextToken() throws IOException {
        while (in == null || !in.hasMoreTokens()) {
            in = new StringTokenizer(br.readLine());
        }

        return in.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    public BigInteger[] get(BigInteger a, BigInteger b, BigInteger m) {
        BigInteger[] res = new BigInteger[2];
        res[0] = (a.add(m)).multiply(b.add(m));
        res[1] = res[0];
        for (int i = 0; i < 2; i++){
            BigInteger A = i == 0 ? a.add(m) : a.subtract(m);
            for (int j = 0; j < 2; j++) {
                BigInteger B = j == 0 ? b.add(m) : b.subtract(m);
                res[0] = res[0].min(A.multiply(B));
                res[1] = res[1].max(A.multiply(B));
            }
        }
        return res;
    }

    public void solve() throws IOException {
        BigInteger a = BigInteger.valueOf(nextLong());
        BigInteger b = BigInteger.valueOf(nextLong());
        BigInteger c = BigInteger.valueOf(nextLong());
        BigInteger d = BigInteger.valueOf(nextLong());

        BigInteger multiply = BigInteger.valueOf(10).pow(9);

        BigInteger L = BigInteger.ZERO;
        BigInteger R = BigInteger.valueOf(10).pow(63);
        while ((R.subtract(L)).compareTo(BigInteger.ONE) > 0) {
            BigInteger M = L.add(R).shiftRight(1);

            BigInteger[] x = get(a.multiply(multiply), d.multiply(multiply), M);
            BigInteger[] y = get(b.multiply(multiply), c.multiply(multiply), M);
            BigInteger l = x[0].max(y[0]);
            BigInteger r = x[1].min(y[1]);
            if (l.compareTo(r) > 0) {
                L = M;
            } else {
                R = M;
            }
        }

        long value = R.longValue();
        out.println(1. * value / multiply.longValue());
    }

    public void run() {
        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
}