a=eval(input().replace(' ','+'));print((a%2*'IMPOSSIBLE'or a//2))
a=eval(input().replace(*' +'))

print((a%2*'IMPOSSIBLE'or a//2))
a = eval(input().replace(" ", "+"))
print((a % 2 * "IMPOSSIBLE" or a // 2))

a = eval(input().replace(*" +"))
print((a % 2 * "IMPOSSIBLE" or a // 2))

-a = eval(input().replace(" ", "+")) +a = eval(input().replace(*" +"))