A,B=list(map(int, input().split()))

print(((A+B)//2 if (A+B)&1==0 else 'IMPOSSIBLE'))
A, B = list(map(int, input().split()))

if A > B: A, B = B, A

if (B - A) & 1:

    print('IMPOSSIBLE')

    exit()

print((A + (B - A) // 2))

A, B = list(map(int, input().split()))
print(((A + B) // 2 if (A + B) & 1 == 0 else "IMPOSSIBLE"))

A, B = list(map(int, input().split()))
if A > B:
    A, B = B, A
if (B - A) & 1:
    print("IMPOSSIBLE")
    exit()
print((A + (B - A) // 2))

-print(((A + B) // 2 if (A + B) & 1 == 0 else "IMPOSSIBLE")) +if A > B: +    A, B = B, A +if (B - A) & 1: +    print("IMPOSSIBLE") +    exit() +print((A + (B - A) // 2))