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.IOException;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Hashtable;
import java.util.InputMismatchException;
import java.util.Scanner;
import java.util.TreeSet;

public class Q1 {

	public static void main(String[] args)
	{
    	FasterScanner s=new FasterScanner();
    	PrintWriter out=new PrintWriter(System.out);
    	
    //	int n=s.nextInt();
    	
    	
    	
    	double X=s.nextLong();
    	double Y=s.nextLong();
    	
    	double x1,x2;
    	
    	x1=X-Y;
    	x1/=2;
    	x1/=(Math.max(1,Math.floor((X-Y)/(2*Y))));
    	
    	if(Y<X || x1<Y)
    		x1=Double.MAX_VALUE;
    	
    	x2=Y+X;
    	x2/=2;
    	
    	x2/=(Math.max(1, Math.floor((Y+X)/(2*Y))));

    	if(x2<Y)
    		x2=Double.MAX_VALUE;
    	
    	if(Math.min(x1,x2)!=Double.MAX_VALUE)
    	System.out.printf("%.9f",Math.min(x1,x2));
    	else
    		System.out.println(-1);
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	out.close();
	}

	public static class SegTree {

		int n;
		long[] t;
		
		public SegTree(int n) {
			this.n=n;
			
			t=new long[2*n];
		}
		
		void build() {  // build the tree
			
			for (int i = n - 1; i > 0; --i)
				t[i]=(t[i<<1]+t[i<<1|1]);
		}

		void modify(int p, long value) {  // set value at position p
		  for (t[p += n] = value; p > 1; p >>= 1) t[p>>1] = (t[p] + t[p^1]);
		}

		long query(int l, int r) {  // sum on interval [l, r)
		  long res=0;
				  
		  for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
			    if ((l&1)!=0) res+=t[l++];
			    if ((r&1)!=0) res+=t[--r];
			  }
		  return res;
		}
	//	
	//	
	//	
	}
	
	
	public static class UF {
		public int max=1;
		private int[] size;
	    private int[] parent;  // parent[i] = parent of i
	    private byte[] rank;   // rank[i] = rank of subtree rooted at i (never more than 31)
	    private int count;     // number of components
	    public UF(int N) {
	        if (N < 0) throw new IllegalArgumentException();
	        count = N;
	        parent = new int[N];
	        rank = new byte[N];
	        size = new int[N];
	        for (int i = 0; i < N; i++) {
	            parent[i] = i;
	            rank[i] = 0;
	            size[i]=1;
	        }
	    }
	    public void print(int id)
	    {
	    	for(int i=0;i<parent.length;i++)
	    		if(parent[i]==parent[id])
	    			System.out.print(i+" ");
	    	System.out.println();
	    }
	    public int find(int p) {
	        if (p < 0 || p >= parent.length) return -1;
	        while (p != parent[p]) {
	            parent[p] = parent[parent[p]];    // path compression by halving
	            p = parent[p];
	        }
	        return p;
	    }
	    public int count() {
	        return count;
	    }
	  
	    public boolean connected(int p, int q) {
	    	if(p>=rank.length || q>=rank.length)
	    		return false;
	    	
	        return find(p) == find(q);
	    }

	    public boolean union(int p, int q) {
	    	
	    	if(p>=rank.length || q>=rank.length)
	    		return false;
	        int rootP = find(p);
	        int rootQ = find(q);
	        if (rootP == rootQ) return false;

	        // make root of smaller rank point to root of larger rank
	        if      (rank[rootP] < rank[rootQ]){
	        	parent[rootP] = rootQ;
	        	size[rootQ]+=size[rootP];
	        	if(size[rootQ]>max)
	        		max=size[rootQ];
	        }
	        else if (rank[rootP] > rank[rootQ]){
	        	parent[rootQ] = rootP;
	        	size[rootP]+=size[rootQ];
	        	if(size[rootP]>max)
	        		max=size[rootP];
	        }
	        else {
	            parent[rootQ] = rootP;
	            rank[rootP]++;
	        	size[rootP]+=size[rootQ];
	        	if(size[rootP]>max)
	        		max=size[rootP];
	        }
	        count--;
	        return true;
	    }

	}
	
	static long mod=(long) (1e9+7);
	static long pow(long a,long p)
	{
		if(p==0)
			return 1;
		if(p==1)
			return a;
		long ans=1;
		ans=pow(a,p/2);
		ans*=ans;
		ans%=mod;
		if(p%2!=0)
			ans*=a;
		ans%=mod;
		return ans;
	}
	

//	static void go(int ind)
//	{
//		int count=0;
//		done[ind]=true;
//		for(int i=0;i<n;i++)
//		{
//			if(edge[ind][i])
//				count++;
//		}
//		if(count>2)
//		{
//			System.out.println("NO");
//			System.exit(0);
//		}
//		if(count==2)
//		{
//			int left=0;
//			int right=0;
//			for(int i=0;i<n;i++)
//			{
//				if(edge[ind][i])
//				{
//					left=i;
//				}
//			}
//			for(int i=left+1;i<n;i++)
//			{
//				if(edge[ind][i])
//				{
//					right=i;
//				}
//			}
//			done[left]=true;
//			done[right]=true;
//			
//			
//			
//			
//		}
//	}
//	
//	
//    static void dfs(int ind)
//    {
//    	started[ind]=true;
//    	for(int i=0;i<n;i++)
//    	{
//    		if(edge[ind][i])
//    		{
//    			if(done[i])
//    			{
//    				System.out.println("NO");
//    				System.exit(0);
//    			}
//    			if(!started[i])
//    				dfs(i);
//    		}
//    	}
//    	done[ind]=true;
//    }

	public static class Pair implements Comparable<Pair> 
	{
		int d=Integer.MAX_VALUE;
		int x;
		int y;
		int w;
		public Pair(int x,int y,boolean w)
		{
			this.x=x;
			this.y=y;
			if(w)
			this.w=1;
			else
				this.w=0;
			
		}
		@Override
		public int compareTo(Pair o) {
			if(d!=o.d)
				return d-o.d;
			if(x!=o.x)
				return (int) (x-o.x);
			return (int) (y-o.y);
		}
	}
	

	
	
	
	
	
	
	
	
	
	
























    
    public static class FasterScanner {
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = System.in.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public String nextString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
           
        public int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }
       
        public long[] nextLongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
}