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

public class Main {

    private FastScanner in;
    private PrintWriter out;

    public static void main(String[] args) {
        new Main().submit();
    }

    public Main() {
        if (true) {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);
        } else {
            try {
                in = new FastScanner(new File("input.txt"));
                out = new PrintWriter(new File("output.txt"));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }
    }

    private void submit() {
        if (true) {
            read();
            solve();
            out.close();
        } else {
            stress();
        }
    }

    private void printTest() {
    }

    private void stressError() {
        printTest();
        System.exit(0);
    }

    private void stupid() {
    }

    private void stress() {

    }

    private void read() {
    }

    private void solve() {
        int a, b, c, d;
        a = in.nextInt();
        b = in.nextInt();
        c = in.nextInt();
        d = in.nextInt();
        if (a * 1L * d == b * 1L * c) {
            out.print("0.0000000");
            return;
        }

        double l = 0.0, r = 1e9;
        for (int i = 0; i < 100000; i++) {
            double m = (l + r) / 2;
            if (ok(a, b, c, d, m)) {
                r = m;
            } else {
                l = m;
            }
        }
        out.format("%.12f", l);
    }

    boolean ok(int a, int b, int c, int d, double x) {
        double amin = a - x;
        double amax = a + x;
        double dmin = d - x;
        double dmax = d + x;
        double admin = min4(amin * dmin, amin * dmax, amax * dmin, amax * dmax);
        double admax = max4(amin * dmin, amin * dmax, amax * dmin, amax * dmax);

        double cmin = c - x;
        double cmax = c + x;
        double bmin = b - x;
        double bmax = b + x;
        double cbmin = min4(cmin * bmin, cmin * bmax, cmax * bmin, cmax * bmax);
        double cbmax = max4(cmin * bmin, cmin * bmax, cmax * bmin, cmax * bmax);

        double start = Math.max(admin, cbmin);
        double finish = Math.min(admax, cbmax);
        return start < finish;
    }

    double min4(double a, double b, double c, double d) {
        return Math.min(Math.min(a, b), Math.min(c, d));
    }

    double max4(double a, double b, double c, double d) {
        return Math.max(Math.max(a, b), Math.max(c, d));
    }

}

class FastScanner {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public FastScanner(File file) {
        try {
            reader = new BufferedReader(new FileReader(file));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    public FastScanner(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }

}