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.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

public class Main {
	static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
	final static int MOD = 1000000007;
	static double start;

	public static void main(String[] args) throws Exception {

		start = System.currentTimeMillis();
		long test = 1;
		// long test = strToLong(in.readLine().trim()); // if number of
		// test cases
		for (int i = 0; i < test; i++) {
			req();

		}

		out.flush();
		// System.out.println(System.currentTimeMillis() - start + " **");

		out.close();

	}

	public static void req() throws Exception {

		StringTokenizer st = new StringTokenizer(in.readLine());
		int n = strToInt(st.nextToken());
		int k = strToInt(st.nextToken());
		
		if(k>n)
		{
			out.write("-1\n");
		}
		else if(n==k)
			out.write(n+"\n");
		else
		{
			double temp1  = n+k;
			double temp2  = n-k;
			
			double min = Double.MAX_VALUE;
			double test = 2;
				
				int t = 0;
				t = (int) (temp1/k);
				
				if(t%2==1)
					t--;
				if(temp1/t <min)
					min = temp1/t;
				
			temp1 = temp2;
			t = (int) (temp1/k);
			
			if(t%2==1)
				t--;
			if(temp1/t <min)
				min = temp1/t;
			
			out.write(min+"\n");
			
			
		}
	
	
	}

	// takes a string with spaces as input and produces an array of long of
	// length n
	// input should be valid
	// should know length of array beforehand
	static long[] splits(String s, int n) {

		long[] out = new long[n];
		int idx = 0;

		StringTokenizer ss = new StringTokenizer(s);
		while (ss.hasMoreTokens()) {

			out[idx] = strToLong(ss.nextToken());

			idx++;
		}

		return out;

	}

	// like split but first integer in input is nuumber of integer that
	// follows
	static long[] splits2(String s) {

		long[] out;
		int idx = 0;

		StringTokenizer ss = new StringTokenizer(s);
		int n = strToInt(ss.nextToken());
		out = new long[n];
		while (ss.hasMoreTokens()) {
			out[idx] = strToLong(ss.nextToken());

			idx++;
		}

		return out;

	}

	// returns gcd of two long parameters
	// i think its algo by euclid
	static long gcd(long a, long b) {

		return b == 0 ? a : gcd(b, a % b);
	}

	// returns maximum among two long
	public static long max(long a, long b) {
		return a > b ? a : b;
	}

	// modulus of product of two long parameter
	public static long modPro(long a, long b) {
		// check value of MOD , may vary for different questions
		// or change the function to take mod as an input parameter
		// tongue emoticon
		return ((a % MOD) * (b % MOD)) % MOD;
	}

	public static long modInv(long a) {
		return new BigInteger(a + "").modPow(new BigInteger((MOD - 2) + ""), new BigInteger(MOD + "")).longValue();
	}

	// returns minimum among two long
	public static long min(long a, long b) {
		return a < b ? a : b;
	}

	// take a string as input and convert it to an integer
	// takes care of negatives
	// no commas or space expected in string
	// copied from codechef
	public static int strToInt(String str) {
		int i = 0;
		int num = 0;
		boolean isNeg = false;
		// Check for negative sign; if it's there, set the isNeg flag
		if (str.charAt(0) == '-') {
			isNeg = true;
			i = 1;
		}
		// Process each character of the string;
		while (i < str.length()) {
			num *= 10;
			num += str.charAt(i++) - '0'; // Minus the ASCII code of
											// '0' to get
			// the value of the charAt(i++).
		}
		if (isNeg)
			num = -num;
		return num;
	}

	// take a string as input and convert it to a long
	// takes care of negatives
	// no commas or space expected in string
	// copied from codechef
	public static long strToLong(String str) {
		int i = 0;
		long num = 0;
		boolean isNeg = false;
		// Check for negative sign; if it's there, set the isNeg flag
		if (str.charAt(0) == '-') {
			isNeg = true;
			i = 1;
		}
		// Process each character of the string;
		while (i < str.length()) {
			num *= 10;
			num += str.charAt(i++) - '0'; // Minus the ASCII code of
											// '0' to get
			// the value of the charAt(i++).
		}
		if (isNeg)
			num = -num;
		return num;
	}

}

class Person
{
	int val ;
	int number ;
	public Person(int v , int n) {
	 val = v;
	 number = n;
	}
	
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return val+"";
	}
	
}