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>

Source: codeforces | Difficulty: MEDIUM_HARD
Tags: Geometry

Mathematics


Solutions:
(a, b) = (int(i) for i in input().split())
if a < b:
	print('-1')
elif a == b:
	print(a)
else:
	i1 = (a + b) // (2 * b)
	i2 = (a - b) // (2 * b)
	if i2 is not 0:
		p = (a + b) / 2
		q = (a - b) / 2
		print(min(p / i1, q / i2))
	else:
		print((a + b) / (2 * i1))


import decimal
(a, b) = map(int, input().split())
a = decimal.Decimal(a)
b = decimal.Decimal(b)
if a < b:
	print('-1')
else:
	k = a // b
	ans = round((a + b) / k, 12)
	if k % 2 == 1:
		ans = round((a + b) / (k + 1), 12)
	print(ans)


(a, b) = map(int, input().split())
if b / a > 1:
	print('-1')
else:
	k = (a / b - 1) // 2 + 1
	if a / b == 2 * k - 1:
		print('%.10f' % b)
	else:
		print((a + b) / (2 * k))


(a, b) = map(int, input().split())
if a < b:
	print(-1)
else:
	print((a + b) / (2 * ((a + b) // (2 * b))))


from math import floor
(a, b) = map(int, input().split())
if a < b:
	print(-1)
elif floor((a - b) / (2 * b)) == 0:
	print((a + b) / (2 * floor((a + b) / (2 * b))))
else:
	print(min((a - b) / (2 * floor((a - b) / (2 * b))), (a + b) / (2 * floor((a + b) / (2 * b)))))


from math import floor
(a, b) = map(int, input().split())
if a < 0:
	print(-1)
elif b < 0:
	print(-1)
elif a < b:
	print(-1)
elif a == 0 and b != 0:
	print(-1)
elif a == b:
	print(b)
elif b == 0:
	print(0)
else:
	n1 = floor((a - b) / (2 * b))
	n2 = floor((a + b) / (2 * b))
	if n1 == 0:
		print((a + b) / (2 * n2))
	else:
		x1 = (a - b) / (2 * n1)
		x2 = (a + b) / (2 * n2)
		print(min(x1, x2))


from math import floor

def main():
	(a, b) = map(int, input().split())
	if b > a:
		print(-1)
		return
	if b == a:
		print(a)
		return
	if (a - b) % b == 0 and (a - b) // b % 2 == 0:
		y = (a - b) // b
		print((a - b) / y)
		return
	y = (a + b) / 2
	k = y // b
	print((a + b) / 2 / k)
main()


import math
(a, b) = list(map(int, input().split()))
x1 = a - b
x2 = a + b
if x1 < 0:
	print(-1)
elif x1 == 0:
	print('%.12f' % (x2 / 2))
else:
	res2 = x2 / (2 * math.floor((a + b) / (2 * b)))
	print('%.12f' % res2)


(a, b) = map(float, input().split(' '))
if a == b:
	print(b)
elif a < b:
	print(-1)
else:
	n = (a - b) // b + 1
	if n % 2 == 0:
		n -= 1
	if n > 1:
		x1 = (a - b) / (n - 1)
	else:
		x1 = 999999999999999999
	n = (a + b) // b - 1
	if n % 2 == 0:
		n -= 1
	x2 = (a + b) / (n + 1)
	print(min(x1, x2))


(a, b) = map(int, input().strip().split())
if a == b:
	print(b)
elif a < b:
	print(-1)
else:
	k = (a - b) // (2 * b)
	x = (a + b) / (2 * (k + 1))
	print(x)


(a, b) = map(int, input().split(' ')[:2])
mx = b
n = (a - b) // (2 * b)
if n < 0:
	print(-1)
	exit(0)
dx = a - (2 * n + 1) * b
ddx = dx / (2 * n + 2)
print(b + ddx)


def main(a, b):
	if b > a:
		return -1
	k1 = (a - b) // (2 * b)
	if k1 > 0:
		x1 = (a - b) / (2 * k1)
	else:
		x1 = 10 ** 9
	k2 = (a + b) // (2 * b)
	x2 = (a + b) / (2 * k2)
	return min(x1, x2)
(a, b) = list(map(int, input().split()))
print(main(a, b))


def main():
	(a, b) = [int(i) for i in input().split(' ')]
	eps = 1e-10
	if b > a:
		print(-1)
	elif b == a:
		print(b)
	elif b == 0:
		print(0)
	else:
		(x1, x2) = (float('inf'), float('inf'))
		(z1, z2) = ((a - b) / 2, (a + b) / 2)
		(k, kk) = (1, 1)
		while kk:
			while z1 / k + eps >= b:
				x1 = z1 / k
				k += kk
				kk *= 2
			k -= kk / 2
			kk //= 4
		(k, kk) = (1, 1)
		while kk:
			while z2 / k + eps >= b:
				x2 = z2 / k
				k += kk
				kk *= 2
			k -= kk / 2
			kk //= 4
		if min(x1, x2) != float('inf'):
			print(min(x1, x2))
		else:
			print(-1)
main()


def bs(R):
	l = 1
	r = R
	ans = R
	while l <= r:
		mid = (l + r) // 2
		if R / mid > y:
			ans = mid
			l = mid + 1
		else:
			r = mid - 1
	if ans & 1:
		ans -= 1
	return R / ans
(x, y) = map(int, input().split())
if x < y:
	print(-1)
elif x == y:
	print(x)
elif x % y == 0 and x // y % 2 == 1:
	print(y)
else:
	print(bs(x + y))


import sys
(a, b) = list(map(int, sys.stdin.readline().split()))
if b > a:
	print(-1)
elif b == a:
	print(a)
else:
	t = (a + b) / (2 * int((a + b) / b / 2))
	print(t)


from fractions import Fraction

def solve(a, b):
	x = Fraction(b)
	n = a // (x * 2)
	a_ = a % (x * 2)
	if b > a:
		return -1
	if a_ == x:
		return float(x)
	if a_ < x:
		return float((a + b) / (2 * n))
	if a_ > x:
		return float((a + b) / (2 * n + 2))
(a, b) = map(Fraction, input().split())
print(solve(a, b))


(a, b) = map(int, input().split())

def solve(x, y, temp):
	if temp < 2 * b:
		return 10000000000
	if temp // b % 2 == 0:
		return temp / (temp // b)
	else:
		return temp / (temp // b - 1)
if a < b:
	print(-1)
elif a == b:
	print(a)
else:
	print(min(solve(a, b, a - b), solve(a, b, a + b)))


def get(x, y):
	if x < 2 * y:
		return float('inf')
	p = int(x / y)
	p -= p % 2
	return x / p
(x, y) = map(int, input().split())
if y > x:
	print(-1)
else:
	x1 = x + y
	x2 = x - y
	ans1 = get(x1, y)
	ans2 = get(x2, y)
	ans = min(ans1, ans2)
	if ans == float('inf'):
		print(-1)
	else:
		print(ans)


def find(x, b):
	if x / 2 // b > 0:
		return x / 2 / (x / 2 // b)
	else:
		return 10000000000
(a, b) = map(int, input().split())
if a == b:
	print('%.9f' % a)
elif b > a:
	print(-1)
else:
	print('%.9f' % min(find(a - b, b), find(a + b, b)))


(a, b) = [int(i) for i in input().split()]
if b > a:
	print(-1)
	exit(0)
ans = 0
c = a - b
d = c / b
d = d // 2 * 2
if d != 0:
	ans = c / d
c = a + b
d = c / b
d = d // 2 * 2
if ans != 0:
	if c / d < ans:
		ans = c / d
else:
	ans = c / d
print(ans)