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

if (a-b)%2==1:

  print("IMPOSSIBLE")

else:

  print((min(a,b)+abs(a-b)//2))
a,b=list(map(int,input().split()))

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

  print("IMPOSSIBLE")

else:

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

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

-if (a - b) % 2 == 1: +if (a + b) % 2 == 1: -    print((min(a, b) + abs(a - b) // 2)) +    print(((a + b) // 2))