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

diff = a - b

if diff < 0:

    diff *= -1

if (diff % 2) == 0:

    ans = int(max(a-(diff/2), b-(diff/2)))

    print(ans)

else:

    print('IMPOSSIBLE')

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

if (a+b) % 2 == 0:

    print(((a+b)//2))

else:

    print('IMPOSSIBLE')

a, b = list(map(int, input().split()))
diff = a - b
if diff < 0:
    diff *= -1
if (diff % 2) == 0:
    ans = int(max(a - (diff / 2), b - (diff / 2)))
    print(ans)
else:
    print("IMPOSSIBLE")

a, b = list(map(int, input().split()))
if (a + b) % 2 == 0:
    print(((a + b) // 2))
else:
    print("IMPOSSIBLE")

-diff = a - b -if diff < 0: -    diff *= -1 -if (diff % 2) == 0: -    ans = int(max(a - (diff / 2), b - (diff / 2))) -    print(ans) +if (a + b) % 2 == 0: +    print(((a + b) // 2))