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

public class A {

	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;
	boolean eof;
	
	double f1(int x, int y) {
		if (x == y) {
			return x;
		}
		x -= y;
		
		int maxDiv = x / y;
		if (maxDiv % 2 == 1) {
			maxDiv--;
		}
		return 1.0 * x / maxDiv;
	}
	
	double f2(int x, int y) {
		x += y;
		int maxDiv = x / y;
		if (maxDiv % 2 == 1) {
			maxDiv--;
		}
		return 1.0 * x / maxDiv;
	}

	void solve() throws IOException {
		int x0 = nextInt();
		int y0 = nextInt();
		if (x0 < y0) {
			out.println(-1);
			return;
		}
		double a = f1(x0, y0);
		double b = f2(x0, y0);
		
		if (a < -0.5 && b < -0.5) {
			out.println(-1);
			return;
		} else if (a < -0.5) {
			out.println(b);
		} else if (b < -0.5) {
			out.println(a);
		} else {
			out.println(Math.min(a, b));
		}
	}

	A() throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

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

	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				eof = true;
				return null;
			}
		}
		return st.nextToken();
	}

	String nextString() {
		try {
			return br.readLine();
		} catch (IOException e) {
			eof = true;
			return null;
		}
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
}