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

c = ((a*a)-(b*b))/(2*(a-b))

print((int(c) if c%1.0==0 else "IMPOSSIBLE"))
a,b = list(map(int,input().split()))

c = ((a*a)-(b*b))/(2*(a-b))

print((int(c) if c == int(c) else "IMPOSSIBLE"))
a, b = list(map(int, input().split()))
c = ((a * a) - (b * b)) / (2 * (a - b))
print((int(c) if c % 1.0 == 0 else "IMPOSSIBLE"))

a, b = list(map(int, input().split()))
c = ((a * a) - (b * b)) / (2 * (a - b))
print((int(c) if c == int(c) else "IMPOSSIBLE"))

-print((int(c) if c % 1.0 == 0 else "IMPOSSIBLE")) +print((int(c) if c == int(c) else "IMPOSSIBLE"))