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>
//package codeforces;


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Random;
import java.util.Set;
import java.util.StringTokenizer;

public class A implements Closeable {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    A() throws IOException {
//        reader = new BufferedReader(new FileReader("input.txt"));
//        writer = new PrintWriter(new FileWriter("output.txt"));
    }

    StringTokenizer stringTokenizer;

    String next() throws IOException {
        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
            stringTokenizer = new StringTokenizer(reader.readLine());
        }
        return stringTokenizer.nextToken();
    }

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

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

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

    private int MOD = 1000 * 1000 * 1000 + 7;

    int sum(int a, int b) {
        a += b;
        return a >= MOD ? a - MOD : a;
    }

    int product(int a, int b) {
        return (int) (1l * a * b % MOD);
    }

    int pow(int x, int k) {
        int result = 1;
        while (k > 0) {
            if (k % 2 == 1) {
                result = product(result, x);
            }
            x = product(x, x);
            k /= 2;
        }
        return result;
    }

    int inv(int x) {
        return pow(x, MOD - 2);
    }

    void solve() throws IOException {
        final int[][] A = new int[2][2];
        for (int[] row : A) {
            for(int i = 0; i < 2; i++) {
                row[i] = nextInt();
            }
        }
        if((long)A[0][0] * A[1][1] == (long)A[1][0] * A[0][1]) {
            writer.println(0);
            return;
        }
        class Utils {
            int[][] diagonals = {{A[0][0], A[1][1]}, {A[0][1], A[1][0]}};
            boolean check(double x) {
                for(int diagonal = 0; diagonal < 2; diagonal++) {
                    int otherDiagonal = 1 - diagonal;
                    for(int i = 0; i < 2; i++) {
                        int a = diagonals[diagonal][i];
                        int d = diagonals[diagonal][1 - i];
                        int b = diagonals[otherDiagonal][0];
                        int c = diagonals[otherDiagonal][1];
                        for(int mask = 0; mask < 8; mask++) {
                            double v = a - (c - foo(mask, 0) * x) * (b - foo(mask, 1) * x) / (d - foo(mask, 2) * x);
                            if(le(Math.abs(v), x)) {
                                return true;
                            }
                        }
                    }
                }
                return false;
            }
            double eps = 1e-10;
            boolean eq(double x, double y) {
                return Math.abs(x - y) < eps;
            }
            boolean le(double x, double y) {
                return x <= y;// || eq(x, y);
            }
            int foo(int mask, int bit) {
                return ((mask >> bit) & 1) * 2 - 1;
            }
        }
        double lo = 0, hi = 1e9;
        for(int i = 0; i < 100; i++) {
            double med = 0.5 * (lo + hi);
            if(new Utils().check(med)) {
                hi = med;
            }
            else {
                lo = med;
            }
        }
        writer.printf("%.12f\n", 0.5 * (lo + hi));
    }



    public static void main(String[] args) throws IOException {
        try (A a = new A()) {
            a.solve();
        }
    }

    @Override
    public void close() throws IOException {
        reader.close();
        writer.close();
    }
}
