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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <typename T>
istream &operator>>(istream &in, vector<T> &v) {
  for (size_t i = 0; i < v.size(); ++i) in >> v[i];
  return in;
}
template <typename T>
ostream &operator<<(ostream &out, vector<T> const &v) {
  for (size_t i = 0; i < v.size(); ++i) out << v[i] << " ";
  return out;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &out, pair<T1, T2> const &p) {
  out << p.first << " " << p.second;
  return out;
}
ostream &operator<<(ostream &out, double *const &n) {
  long long v = (long long)((*n) * 1e7);
  char s[32];
  memset(s, '0', 32);
  int c = 0;
  if (v == 0) {
    out.put('0');
    return out;
  }
  if (v < 0) {
    out.put('-');
    v = -v;
  }
  while (v > 0 && c < 32) {
    s[c++] = v % 10 + '0';
    v /= 10;
  }
  c = max(c, 8);
  for (int i = c - 1; i >= 0; --i) {
    if (i == 6) out.put('.');
    out.put(s[i]);
  }
  return out;
}
template <typename T>
T ternary_search(T left, T right, T func(T x)) {
  for (int i = 0; i < 100; ++i) {
    T delta = (right - left) / 3;
    T mid1 = left + delta, mid2 = left + delta * 2;
    if (func(mid1) >= func(mid2))
      right = mid2;
    else
      left = mid1;
  }
  return func(right);
}
int MONTHS[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
void solution();
int main(int argc, char *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solution();
  return EXIT_SUCCESS;
}
double s(double x1, double y1, double x2, double y2) {
  return x1 * y2 - x2 * y1;
}
void solution() {
  int a, b;
  cin >> a >> b;
  if (b > a) {
    cout << -1;
  } else if (a == b) {
    cout << b;
  } else {
    int k = a / b;
    if (k % 2 == 0) --k;
    double l = b, r = 12.0 * max(a, b);
    for (int i = 0; i < 300 && r - l > 1e-14; ++i) {
      double mid = l + (r - l) / 2.0;
      if (s(mid * k - a, mid - b, mid * k + mid - a, 0 - b) <= 0)
        r = mid;
      else
        l = mid;
    }
    cout.precision(12);
    cout << fixed << r << endl;
  }
}