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

public class H
{
   public static void main(String[] args)
   {
      PrintWriter out = new PrintWriter(System.out);
      new H(new FastScanner(), out);
      out.close();
   }

   int ma, mb, mc, md;

   boolean isPossible(double diff)
   {
      ArrayList<Double> left = new ArrayList<>(4);
      left.add((ma+diff)*(md+diff));
      left.add((ma+diff)*(md-diff));
      left.add((ma-diff)*(md+diff));
      left.add((ma-diff)*(md-diff));

      ArrayList<Double> right = new ArrayList<Double>(4);
      right.add((mb+diff)*(mc+diff));
      right.add((mb+diff)*(mc-diff));
      right.add((mb-diff)*(mc+diff));
      right.add((mb-diff)*(mc-diff));

      Collections.sort(left);
      Collections.sort(right);
   
      double loLeft = left.get(0);
      double hiLeft = left.get(3);
      double loRight = right.get(0);
      double hiRight = right.get(3);
   
      return !(hiLeft < loRight || hiRight < loLeft);
   }

   public H(FastScanner in, PrintWriter out)
   {
      ma = in.nextInt();
      mb = in.nextInt();
      mc = in.nextInt();
      md = in.nextInt();

      double lo = 0, hi = 1;
      while (!isPossible(hi))
      {
         lo = hi;
         hi *= 2;
      }

      for (int u=0; u<500; u++)
      {
         double m = (lo+hi)*0.5;
         if (isPossible(m))
            hi = m;
         else
            lo = m;
      }
      out.printf("%.15f%n", hi);
   }
}

class FastScanner{
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    
    public FastScanner()
    {
        stream = System.in;
    }
    
    int read()
    {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }
    
    boolean isSpaceChar(int c)
    {
        return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
    }
    
    boolean isEndline(int c)
    {
        return c=='\n'||c=='\r'||c==-1;
    }
    
    int nextInt()
    {
        return Integer.parseInt(next());
    }
    
    long nextLong()
    {
        return Long.parseLong(next());
    }
    
    double nextDouble()
    {
        return Double.parseDouble(next());
    }
    
    String next(){
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isSpaceChar(c));
        return res.toString();
    }
    
    String nextLine(){
        int c = read();
        while (isEndline(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isEndline(c));
        return res.toString();
    }
}