There is a polyline going through points (0, 0) – (*x*, *x*) – (2*x*, 0) – (3*x*, *x*) – (4*x*, 0) – ... - (2*kx*, 0) – (2*kx* + *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*.
Only one line containing two positive integers *a* and *b* (1 ≤ *a*, *b* ≤ 10<sup class="upper-index">9</sup>).
import math
import sys
from random import randint as rn
import random


def solve():
    a, b = map(int, input().split())

    if a < b:
        print(-1)
    else:
        v1 = 1 << 60
        v2 = 1 << 60

        k = (a - b) // (2 * b)
        if k > 0:
            v1 = (a - b) / (2 * k)

        k = (a + b) // (2 * b)
        if k > 0:
            v2 = (a + b) / (2 * k)

        if min(v1, v2) == 1 << 60:
            print(-1)
        else:
            print('%.12f' % min(v1, v2))

    return


if __name__ == '__main__':

    multitest = 0

    if multitest:
        t = int(sys.stdin.readline())
        for _ in range(t):
            solve()
    else:
        solve()
    # gen()
