Problem: There is a polyline going through points (0, 0) – (x, x) – (2x, 0) – (3x, x) – (4x, 0) – ... - (2kx, 0) – (2kx + x, x) – .... 

We know that the polyline passes through the point (a, b). Find minimum positive value x such that it is true or determine that there is no such x.

Input

Only one line containing two positive integers a and b (1 ≤ a, b ≤ 109).

Output

Output the only line containing the answer. Your answer will be considered correct if its relative or absolute error doesn't exceed 10 - 9. If there is no such x then output  - 1 as the answer.

Examples

Input

3 1


Output

1.000000000000


Input

1 3


Output

-1


Input

4 1


Output

1.250000000000

Note

You can see following graphs for sample 1 and sample 3. 

<image> <image>

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ProblemA {
    private final double EPS = 1e-10;
    BufferedReader rd;

    ProblemA() throws IOException {
        rd = new BufferedReader(new InputStreamReader(System.in));
        compute();
    }

    private void compute() throws IOException {
        int[] q = intarr();
        int a = q[0];
        int b = q[1];
        out(solve(a,b));
    }

    private double solve(double a, double b) {
        double res;
        if(a<b) {
            res = -1;
        } else if(Math.abs(a-b) < EPS) {
            res = a;
        } else {
            double p = f(a,b);
            double c = Math.floor(a / (b*2))*2;
            if(Math.abs(p-b) < EPS) {
                res = b;
            } else {
                double min, max;
                if(p >= 0) {
                    min = b+(p)/c;
                    max = b+(b+p)/c;
                } else {
                    min = b;
                    max = b+(b+p)/(c+1);
                }
                int m = 0;
                while(Math.abs(max - min) > EPS && m < 1000000) {
                    double mid = (min + max) / 2;
                    double v = g(b, f(a,mid));
                    if(v > 0) {
                        min = mid;
                    } else {
                        max = mid;
                    }
                    m++;
                }
                res = min;
            }
        }
        return res;
    }

    private double g(double b, double p) {
        return b - Math.abs(p);
    }

    private double f(double a, double x) {
        double u = Math.floor(a / (x*2))*x*2;
        double v = a - u;
        if(Math.abs(v) < EPS) {
            return 0;
        } else if(v > x) {
            return v-2*x;
        } else {
            return v;
        }

    }

    private int[] intarr() throws IOException {
        return intarr(rd.readLine());
    }

    private int[] intarr(String s) {
        String[] q = split(s);
        int n = q.length;
        int[] a = new int[n];
        for(int i=0;i<n;i++) {
            a[i] = Integer.parseInt(q[i]);
        }
        return a;
    }

    public String[] split(String s) {
        if(s == null) {
            return new String[0];
        }
        int n = s.length();
        int start = -1;
        int end = 0;
        int sp = 0;
        boolean lastWhitespace = true;
        for(int i=0;i<n;i++) {
            char c = s.charAt(i);
            if(isWhitespace(c)) {
                lastWhitespace = true;
            } else {
                if(lastWhitespace) {
                    sp++;
                }
                if(start == -1) {
                    start = i;
                }
                end = i;
                lastWhitespace = false;
            }
        }
        if(start == -1) {
            return new String[0];
        }
        String[] res = new String[sp];
        int last = start;
        int x = 0;
        lastWhitespace = true;
        for(int i=start;i<=end;i++) {
            char c = s.charAt(i);
            boolean w = isWhitespace(c);
            if(w && !lastWhitespace) {
                res[x++] = s.substring(last,i);
            } else if(!w && lastWhitespace) {
                last = i;
            }
            lastWhitespace = w;
        }
        res[x] = s.substring(last,end+1);
        return res;
    }

    private boolean isWhitespace(char c) {
        return c==' ' || c=='\t';
    }

    private static void out(Object x) {
        System.out.println(x);
    }

    public static void main(String[] args) throws IOException {
        new ProblemA();
    }
}