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>
#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 7;
const int M = 100 + 7;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + 7;
const double PI = acos(-1);
int a, b;
double solve(int x) {
  int l = 1, r = 1e9, ans = -1;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (x >= 1ll * 2 * mid * b) {
      ans = mid;
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  if (ans == -1) return -1;
  return 1.0 * x / (2 * ans);
}
int main() {
  scanf("%d%d", &a, &b);
  int pos1 = a - b;
  int pos2 = a + b;
  double ans1 = -1, ans2 = -1, ans = inf;
  if (pos1 >= 0) {
    if (pos1 == 0) {
      ans = b;
    } else {
      ans1 = solve(pos1);
    }
  }
  if (pos2 >= 0) {
    ans2 = solve(pos2);
  }
  if (ans1 != -1) ans = min(ans1, ans);
  if (ans2 != -1) ans = min(ans2, ans);
  if (ans != inf)
    printf("%.12f\n", ans);
  else
    puts("-1");
  return 0;
}
