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

public class A implements Runnable {

    public void run() {
        long startTime = System.nanoTime();

        int a = nextInt();
        int b = nextInt();
        int c = nextInt();
        int d = nextInt();

        double min = 0, max = 2e9;
        for (int iter = 0; iter < 1000; iter++) {
            double mid = (min + max) / 2;
            if (pos(mid, a, b, c, d)) {
                max = mid;
            } else {
                min = mid;
            }
        }
        println(min);

        if (fileIOMode) {
            System.out.println((System.nanoTime() - startTime) / 1e9);
        }
        out.close();
    }

    private boolean pos(double x, int... a) {
        double[] ol = new double[4];
        double[] or = new double[4];
        for (int i = 0; i < 4; i++) {
            ol[i] = a[i] - x;
            or[i] = a[i] + x;
        }
        int[] s = new int[4];
        M:
        for (int cs = 0; cs < 16; cs++) {
            double[] lt = ol.clone();
            double[] rt = or.clone();
            for (int i = 0; i < 4; i++) {
                s[i] = (cs & 1 << i) != 0 ? 1 : -1;
                if ((cs & 1 << i) != 0) {
                    if (rt[i] < 0) {
                        continue M;
                    }
                    lt[i] = Math.max(lt[i], 0);
                } else {
                    if (lt[i] > 0) {
                        continue M;
                    }
                    rt[i] = Math.min(rt[i], 0);
                }
            }
            if (s[0] * s[3] != s[1] * s[2]) {
                continue;
            }

            for (int i = 0; i < 4; i++) {
                if (lt[i] < 0 || rt[i] < 0) {
                    double t = lt[i];
                    lt[i] = -rt[i];
                    rt[i] = -t;
                }
            }
            if (rt[0] * rt[3] >= lt[1] * lt[2] && rt[1] * rt[2] >= lt[0] * lt[3]) {
                return true;
            }

        }
        return false;
    }

    //-----------------------------------------------------------------------------------

    private static boolean fileIOMode;
    private static BufferedReader in;
    private static PrintWriter out;
    private static StringTokenizer tokenizer;

    public static void main(String[] args) throws Exception {
        fileIOMode = args.length > 0 && args[0].equals("!");
        if (fileIOMode) {
            in = new BufferedReader(new FileReader("a.in"));
            out = new PrintWriter("a.out");
        } else {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }
        tokenizer = new StringTokenizer("");

        new Thread(new A()).start();
    }

    private static String nextLine() {
        try {
            return in.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    private static String nextToken() {
        while (!tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(nextLine());
        }
        return tokenizer.nextToken();
    }

    private static int nextInt() {
        return Integer.parseInt(nextToken());
    }

    private static long nextLong() {
        return Long.parseLong(nextToken());
    }

    private static double nextDouble() {
        return Double.parseDouble(nextToken());
    }

    private static BigInteger nextBigInteger() {
        return new BigInteger(nextToken());
    }

    private static void print(Object o) {
        if (fileIOMode) {
            System.out.print(o);
        }
        out.print(o);
    }

    private static void println(Object o) {
        if (fileIOMode) {
            System.out.println(o);
        }
        out.println(o);
    }

    private static void printf(String s, Object... o) {
        if (fileIOMode) {
            System.out.printf(s, o);
        }
        out.printf(s, o);
    }
}