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 static java.lang.Math.*;

import java.lang.reflect.Array;
import java.util.*;
import java.util.function.*;
import java.lang.*;

public class Main {
    final static boolean debug = false;
    final static String fileName = "";
    final static boolean useFiles = false;

    public static void main(String[] args) throws FileNotFoundException {
        PrintWriter writer = new PrintWriter(System.out);
        new Task(new InputReader(System.in), writer).solve();
        writer.close();
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    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 double nextDouble() {
        return Double.parseDouble(next());
    }

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

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

    public byte nextByte() {
        return Byte.parseByte(next());
    }
}

class Point{
    Point(double x, double y){
        X = x;
        Y = y;
    }
    double X, Y;
}

class P{
    double Max, Min;
}

class Task {
    double dist(Point a, Point b){
        return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y);
    }

    P get(double a, double b, double delta){
        P result = new P();
        result.Max = max(max((a + delta) * (b - delta), (a + delta) * (b + delta)),
                max((a - delta) * (b - delta), (a - delta) * (b + delta)));
        result.Min = min(min((a + delta) * (b - delta), (a + delta) * (b + delta)),
                min((a - delta) * (b - delta), (a - delta) * (b + delta)));
        return result;
    }

    boolean f(double a, double b, double c, double d, double delta){
        P ad = get(a, d, delta);
        P bc = get(b, c, delta);
        double up = ad.Max - bc.Min;
        double down = ad.Min - bc.Max;
        return  (down <= 0 && 0 <= up);
    }

    public void solve() {
        double a = in.nextDouble();
        double b = in.nextDouble();
        double c = in.nextDouble();
        double d = in.nextDouble();
        double l = 0;
        double r = 1e9;
        for (int i = 0; i < 100; i++){
            double m = (l + r) / 2;
            if (f(a, b, c, d, m)){
                r = m;
            }
            else l = m;
        }
        out.println(l);

//        int n = in.nextInt();
//        int m = in.nextInt();
//        Point[] a = new Point[n];
//        for (int i = 0; i < n; i++) {
//            a[i] = new Point(in.nextDouble(), in.nextDouble());
//        }
//        Point[] b = new Point[m];
//        for (int i = 0; i < m; i++) {
//            b[i] = new Point(in.nextDouble(), in.nextDouble());
//        }
//        double d = 0;
//        int p1 = 0, p2 = 0;
//        for (int i = 0; i < n; i++) {
//            for (int j = i + 1; j < n; j++) {
//                double curr = dist(a[i], a[j]);
//                if (curr > d){
//                    d = curr;
//                    p1 = i;
//                    p2 = j;
//                }
//            }
//        }
//        for (int i = 0; i < n; i++){
//
//        }
    }

    private InputReader in;
    private PrintWriter out;

    Task(InputReader in, PrintWriter out) {
        this.in = in;
        this.out = out;
    }
}
