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>
    import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Iterator;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 *
 * @author note-07
 */
public class BearPlaysDiv2 {
 

/**13
 * @author note-07
 */
ArrayList<Integer> l=new ArrayList<Integer>();
    public static void main(String[] args)
    {
Scanner in=new Scanner(System.in);
int a=in.nextInt();
int b=in.nextInt();
boolean jam=true;
if (a<b) jam=false;
double n=b+a;
double h=a-b;
double z=n;
double l=h;
double i=1;
double k=z/b;
int y=(int)k;
if (y%2==1)
   y--;
double sh=y;
sh=z/sh;
double e=l/b;
int s=(int)e;
if (s%2==1)
    s--;
double se=s;
se=l/se;

if (!jam) System.out.println(-1);
else if (((a-b>=b)&&(!Double.isNaN(se)))&(se<sh))
        System.out.println(new DecimalFormat("#0.000000000000").format(se));
else System.out.println(new DecimalFormat("#0.000000000000").format(sh));
}  
    
    
   
    
   public static String[] equivalent(String a,int l)
   {String[] m=new String[l];
   if (l==1)
       m[0]=a;
   for (int i=0;i<l/2;i++)
   {
   m[i*2]=equivalent(a.substring(0,a.length()/2),l/2)[i]+""+equivalent(a.substring(a.length()/2,a.length()),l/2)[i];
   m[i*2+1]=equivalent(a.substring(a.length()/2,a.length()),l/2)[i]+""+equivalent(a.substring(0,a.length()/2),l/2)[i];
   }
   return m;
       
   }
   
   
   
 public static boolean check(int[] l,int size,int k)
 {
    int count=0;
    int count1=0;
 for (int i=0;i<l.length;i++)
 {
 if (l[i]==0) count++;
 if (l[i]==1){if (count>=size)
 {int m=count/size;
     if (m>1)
     {m=count/(size+1);
     if ((count%(size+1))==size) m++;}
     count1+=m;
      count=0;}
 
 else if (count<size){count=0;}
 }
 
 }

if (count1>=k)  
return true;
  else return false;
 }
    
   public static void add(ArrayList<Integer> n) 
   {
   for (int i=0;i<n.size();i++)
   if (n.get(i)==0){ n.remove(i);break;}
   n.add(1);
   
   }
   public static void remove(ArrayList<Integer> n)
   {
   for (int i=0;i<n.size();i++)
   if (n.get(i)==1) {n.remove(i);break;}
   n.add(0);
   
   }
}
class Pair
{
int row;
int col;
}