Problem:
 Score: 100 points    Problem Statement We have two distinct integers A and B .  Print the integer K such that |A - K| = |B - K| .  If such an integer does not exist, print IMPOSSIBLE instead.      Constraints  All values in input are integers.  0 \leq A,\ B \leq 10^9  A and B are distinct.         Input Input is given from Standard Input in the following format:  A  B       Output Print the integer K satisfying the condition.  If such an integer does not exist, print IMPOSSIBLE instead.        Sample Input 1 2 16      Sample Output 1 9  |2 - 9| = 7 and |16 - 9| = 7 , so 9 satisfies the condition.       Sample Input 2 0 3      Sample Output 2 IMPOSSIBLE  No integer satisfies the condition.       Sample Input 3 998244353 99824435      Sample Output 3 549034394

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

Solution (Python):
a,b=map(int,input().split())

if a>b and (a-b)%2==0:
    print (int(b + (a-b)/2 ))
elif b>a and (b-a)%2==0:
    print (int(a+(b-a)/2 ))
else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())

if A % 2 == B % 2:
  print((A+B)//2)
else:
  print("IMPOSSIBLE")

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

Solution (Python):
A, B = map(int, input().split())

if (A + B) % 2 == 0:
  print(int((A + B) / 2))
else:
  print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())

if (A + B) % 2 == 0:
    print((A + B) // 2)
else:
    print("IMPOSSIBLE")

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

Solution (Python):
A, B = map(int, input().split())
print(int((A+B)/2) if (A+B)%2 == 0 else "IMPOSSIBLE" )

Solution (Python):
a, b = map(int, input().split())

if int((a+b)/2) == (a+b)/2:
    print(int((a+b)/2))
elif int(-(a+b)/2) == -(a+b)/2:
    print(int(-(a+b)/2))
else:
    print('IMPOSSIBLE')

Solution (Python):
a, b = (int(i) for i in input().split())
if (a+b) % 2 == 0:
  print((a+b)//2)
else:
  print('IMPOSSIBLE')

Solution (Python):
A, B = map(int, input().split())
K = A + B
if K % 2 == 0:
    print(K//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
A,B=map(int,input().split())

if (A+B)%2==0:
    print(int((A+B)/2))
else:
    print("IMPOSSIBLE")

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

Solution (Python):
A, B = list(map(int, input().split()))
if (B - A) % 2 == 0:
    print((A + B) // 2)
else:
    print("IMPOSSIBLE")

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

Solution (Python):
A,B=map(int,input().split())
print(int((A+B)/2) if (A+B)%2 ==0 else "IMPOSSIBLE")

Solution (Python):
A,B=map(int,input().split())
C=A+B
if C%2==1:
  print('IMPOSSIBLE')
else:
  ans=C//2
  print(ans)

Solution (Python):
a,b = map(int,input().split())

if (a+b)%2 ==0:
  print(int((a+b)/2))
else:
  print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())
if (A-B)%2 == 0:
    print(min(A,B)+abs(A-B)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
A,B=map(int,input().split())
if A%2==0 and B%2==1:
    print("IMPOSSIBLE")
elif A%2==1 and B%2==0:
    print("IMPOSSIBLE")
else:
    K=(abs(A)+abs(B))/2
    print(int(K))

Solution (Python):
a, b = map(int, input().split())
c = a + b

if c % 2 == 0:
    print(int(c/2))
else:
    print("IMPOSSIBLE")

Solution (Python):
msg = "IMPOSSIBLE"
A,B = map(int, input().split())

I,m = divmod((A+B), 2)

if m != 0:
    res = msg
else:
    res = int((A+B)/2)

print(res)

Solution (Python):
A,B = map(int, input().split())
if (A + B) % 2 == 1:
    print('IMPOSSIBLE')
else:
    print((A+B)//2)

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

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

Solution (Python):
A, B=map(int,input().split())
if (int((A+B)%2))==0:
    print(int((A+B)/2))
else:
    print("IMPOSSIBLE")

Solution (Python):
def main():
    a,b = map(int,input().split())

    if (a+b) % 2 != 0:
        print('IMPOSSIBLE')
    else:
        print((a+b)//2)

if __name__ == '__main__':
    main()

Solution (Python):
A,B = map(int, input().split())
if (A+B)%2 == 0:
    print(int((A+B)/2))
else:
    print('IMPOSSIBLE')

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

Solution (Python):
A,B=map(int,input().split())
if (A+B)%2==0:
  print((A+B)//2)
else:
  print('IMPOSSIBLE')

Solution (Python):
A,B = map(int,input().split())

k_2 = A+B

if k_2%2 == 1:
    ans = "IMPOSSIBLE"
else:
    ans = str(k_2//2)
print(ans)

Solution (Python):
def main():
    A,B = map(int,input().split())
    if ((A+B)/2)%1 != 0:
        print("IMPOSSIBLE")
    else:
        print(int((A+B)/2))


if __name__=="__main__":
    main()

Solution (Python):
a, b = map( int, input().split())
 
c = max(a,b)+min(a,b)
if c % 2 == 0:
  print(c // 2)
else:
  print("IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split())
 
if (a - b) % 2 == 0:
  r = int(abs(a - b)/2 + min(a, b))
else:
  r = 'IMPOSSIBLE'
print(r)

Solution (Python):
A, B = map(int, input().split())

if (A - B) % 2 == 0:
    print(abs(A - B) // 2 + min(A, B))
else:
    print("IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split())

k = abs(b + a) // 2

if abs(a-k) == abs(b-k):
  print(k)
else:
  print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())

total = A + B
if total % 2 != 0:
    print('IMPOSSIBLE')
else:
    print(total // 2)

Solution (Python):
A, B = map(int, input().split())

C = abs(A+B)/2
ans = int(C) if int(C) == C else 'IMPOSSIBLE'
print(ans)

Solution (Python):
a,b = map(int, input().split())

if (a-b)%2==0:
    print((a+b)//2)
else:
    print('IMPOSSIBLE')

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

Solution (Python):
x,y = map(int,input().split())
if (x + y)%2 == 0:
    print(int((x + y)/2))
else:
    print("IMPOSSIBLE")

Solution (Python):
a=list(map(int,input().split()))
if (a[0]+a[1])%2==0:
  	print(int((a[0]+a[1])/2))
else:
  	print("IMPOSSIBLE")

Solution (Python):
"""
author : halo2halo
date : 10, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N, M = map(int, read().split())
S = N + M

print(S // 2 if S % 2 == 0 else 'IMPOSSIBLE')

Solution (Python):
A, B = map(int, input().split(' '))

if (A + B) % 2 != 0:
    print('IMPOSSIBLE')
else:
    print(int((A+B)/2))

Solution (Python):
a, b = map(int, input().split())

if (a + b) % 2 == 1 :
    print("IMPOSSIBLE")
else :
    print((a + b) // 2)

Solution (Python):
A, B = list(map(int, input().split()))
result = (A+B)//2 if (A+B)%2 == 0 else "IMPOSSIBLE"
print(result)

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline

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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
a, b = map(int,input().split())

if abs(a+b)%2 == 0:
  if a > b :
    print(int(a-abs(a-b)/2))
  elif a < b :
    print(int(b-abs(a-b)/2))
else:
  print("IMPOSSIBLE")

Solution (Python):
a,b = map(int, input().split())
if (a-b)%2 != 0:
  print('IMPOSSIBLE')
else:
  print((a+b)//2)

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

a,b = LI()
if a > b:
    a,b = b,a
if (b-a) % 2:
    print('IMPOSSIBLE')
else:
    print(b - (b-a)//2)

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

Solution (Python):
A, B = map(int, input().split())

if (A + B) % 2 != 0:
    print('IMPOSSIBLE')
else:
    print((A + B) // 2)

Solution (Python):
intlist = list(map(int, input().split()))

if sum(intlist) % 2 == 0:
  print(sum(intlist) // 2)
else:
  print("IMPOSSIBLE")

Solution (Python):
A, B = input().split()

s = int(A) + int(B)
if s % 2 == 0:
    print(round(s / 2))
else:
    print('IMPOSSIBLE')

Solution (Python):
a,b=map(int,input().split())

if (a+b)%2==0:
    print((a+b)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())

if (B-A) % 2 == 1:
    print('IMPOSSIBLE')
    exit()

tmp = (B-A) // 2
print(B-tmp)

Solution (Python):
def main():
    A, B = map(int, input().split(" "))
    if (A + B) % 2 == 0:
        print((A + B) // 2)
    else:
        print("IMPOSSIBLE")


if __name__ == '__main__':
    main()

Solution (Python):
a, b = map(int, input().strip().split())

if a>b: 
    a,b=b,a

if (b-a)%2!=0:
    print("IMPOSSIBLE")
else:
    print((a+b)//2)

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

Solution (Python):
a, b = map(int, input().split())

if (a > b):
   a, b = b, a

if ((b - a) % 2 == 0):
      print(int((b - a) / 2) + a)
else:
   print('IMPOSSIBLE')

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    if (a+b)%2==1:
        print('IMPOSSIBLE')
    else:
        print((a+b)//2)
if __name__ == '__main__':
    do()

Solution (Python):
A, B = map(int, input().split())
sum = A + B
if sum%2==0:
  print(sum//2)
else:
  print('IMPOSSIBLE')

Solution (Python):
A, B = map(int, input().split())

if (A + B) % 2 != 0:
    print('IMPOSSIBLE')
else:
    print(int((A + B) / 2))

Solution (Python):
A, B = map(int, input().split())

K = (A + B) / 2

if(K.is_integer()):
    print(int(K))
else:
    print('IMPOSSIBLE')

Solution (Python):
A, B = [int(i) for i in input().split()]
if A % 2 != B % 2:
    print("IMPOSSIBLE")
else:
    print((A + B) // 2)

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

Solution (Python):
a,b=map(int, input().split())

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

Solution (Python):
def main():
	a,b = map(int,input().split())

	if (a**2 - b**2) / (2*a-2*b) == (a**2 - b**2)//(2*a-2*b):
		print((a**2 - b**2)//(2*a-2*b))
	else:
		print("IMPOSSIBLE")

 
if __name__ == '__main__':
	main()

Solution (Python):
A,B=input().split()
a=int(A)
b=int(B)
K=(b+a)/2
k=int(K)
if((b+a)%2==0):
    print(k)
if((b+a)%2!=0):
    print("IMPOSSIBLE")

Solution (Python):
a,b=map(int,input().split())
x=(a+b)/2
if x.is_integer()==1:print(int(x))
else:print("IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split())

if (a + b) % 2 == 1:
    print("IMPOSSIBLE")
else:
    print((a + b) // 2)

Solution (Python):
A, B = map(int, input().split())
if (A+B)%2==0:
    print((A+B)//2)
else:
    print('IMPOSSIBLE')

Solution (Python):
def main():
    A, B = map(int, input().split())
    if (B-A)%2!=0:
        return "IMPOSSIBLE"
    else:
        return int((abs(B-A)/2)+min(A, B))

if __name__ == '__main__':
    print(main())

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

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

Solution (Python):
import math
A = list(map(int,input().split(" ")))
if (max(A[0],A[1]) - min(A[0],A[1])) % 2 == 1:
    print("IMPOSSIBLE")
else:
    print(math.floor(max(A[0],A[1]) - (max(A[0],A[1]) - min(A[0],A[1])) / 2))

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

Solution (Python):
a,b = map(int,input().split())
if (a-b)%2 ==0:
    print((a+b)//2)
else:
    print('IMPOSSIBLE')

Solution (Python):
A, B = map(int,input().split())
if (A+B)%2==0:
    print((A+B)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
a,b = map(int,input().split())
if a%2 != b%2 :
    print("IMPOSSIBLE")
else:
    x = (a+b)/2
    print(int(abs(x)))

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

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

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

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

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

if (A+B)%2 == 1:
    print('IMPOSSIBLE')
else:
    print((A+B)//2)

Solution (Python):
a,b=map(int,input().split())

if (b-a)%2==0:
  print((b+a)//2)
else:
  print("IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split())


if (a + b) % 2 == 0:
    k = (a + b) / 2
    print(int(k))
else:
    print("IMPOSSIBLE")

Solution (Python):
s = sum(map(int,input().split()))
if s%2 == 0:
  s = s//2
else:
  s = "IMPOSSIBLE"
print(s)

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

Solution (Python):
A,B=map(int,input().split())
C=A+B
if C%2==0:
    print(C//2)
else:
    print('IMPOSSIBLE')

Solution (Python):

A,B=map(int,input().split())
diff = abs(B-A)
if diff % 2 == 1:
    print("IMPOSSIBLE")
else:
    if(A<B):
        print(int(A+diff/2))
    else:
        print(int(B+diff/2))

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

Solution (Python):
from sys import stdin

a,b = [int(x) for x in stdin.readline().rstrip().split()]


if (a+b)%2==0:
  print((a+b)//2)
else:
  print('IMPOSSIBLE')

Solution (Python):
a, b = sorted(map(int, input().strip().split()))
k = abs(a - b) // 2

if abs(a + k) == abs(k - b):
    print(a + k)
else:
    print("IMPOSSIBLE")

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

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

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

Solution (Python):
A,B = map(int,input().split())

if (A+B)%2 == 0:
    print((A+B)//2)
else:
    print('IMPOSSIBLE')

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

if (A+B)%2==0:
    print( (A+B)//2 )
else:
    print('IMPOSSIBLE')

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

Solution (Python):
import sys

num = list(map(int,input().split()))
A = num[0]
B = num[1]

if (A+B)%2 !=0:
	print("IMPOSSIBLE" )
else:
  print((A+B)//2)

Solution (Python):
a, b = map(int, input().split())

if abs(a-b)%2 == 0:
    print(int((a+b)/2))
else:
    print('IMPOSSIBLE')

Solution (Python):
A,B = map(int, input().split())
K1 = A**2 - B**2
K2 = 2*(A-B)
K = K1/K2
if K.is_integer():
    print(int(K))
else:
    print('IMPOSSIBLE')

Solution (Python):
A,B=map(int,input().split())
if (A+B)%2==0:
  print((A+B)//2)
else:
  print("IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split())
res = (a+b)/2
if res.is_integer():
    print(int(res))
else:
    print('IMPOSSIBLE')

Solution (Python):
a, b = map(int, input().split())

k = ( a + b )

if k%2 == 0:
  print(k//2)
else:
  print('IMPOSSIBLE')

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
A,B=map(int,input().split())
if (A+B)%2==0:
  print((A+B)//2)
else:
  print("IMPOSSIBLE")

Solution (Python):
A,B=map(int, input().split())
if (A+B)%2 == 0:
  print((A+B)//2)
else:
  print('IMPOSSIBLE')

Solution (Python):
a,b = (int(i) for i in input().split())
s = abs(a-b)
if s%2 == 1:
  print("IMPOSSIBLE")
else:
  print(max(a,b)-s//2)

Solution (Python):
A, B = map( int, input().split() )
if (A + B) % 2 == 0 :
   print( (A + B) // 2 )
else : 
   print( "IMPOSSIBLE" )

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

k=(a+b)/2
k_=(a+b)//2
if k-k_==0:
    print(k_)
else:
    print("IMPOSSIBLE")

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

Solution (Python):
A, B = list(map(int, input().split()))
if (A + B) % 2 == 0 :
	print(int((A + B)/2))
else :
	print("IMPOSSIBLE")

Solution (Python):
a,b = map(int, input().split())
if (a%2==0 and b%2!=0) or (a%2!=0 and b%2==0):
	print("IMPOSSIBLE")
else:
	print(a - (a-b)//2 if a>b else b - (b-a)//2)

Solution (Python):
a, b = map(int, input().split())

if (a + b) % 2 == 0:
    print((a + b) // 2)
else:
    print('IMPOSSIBLE')

Solution (Python):
a, b = map(int, input().split())

if ((a + b) % 2) == 1:
    print('IMPOSSIBLE')

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

Solution (Python):

import math
input_list = list(map(int,input().split()))
a = input_list[0]
b = input_list[1]
x = (a+b)/2

if math.ceil(x) == x:
    print(int(x))
else:
    print("IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split())
k = a + b

if k % 2 ==0:
  print(int(k/2))
else:
  print('IMPOSSIBLE')

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

Solution (Python):
a,b = map(int,input().split())

if (a-b)%2 == 0:
    if a-b > b-a:
        print(int(a-((a-b)/2)))
    else:
        print(int(b-((b-a)/2)))

else:
    print("IMPOSSIBLE")

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

Solution (Python):
A, B = map(int, input(). split())
K = (A+B)//2
if (A+B) % 2 == 0:
    print(K)
else:
    print('IMPOSSIBLE')

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

Solution (Python):
p,q=map(int,input().split())
if (p-q)%2==1:
  print("IMPOSSIBLE")
else:
  print((p+q)//2)

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

if (A + B) % 2 == 1:
    print('IMPOSSIBLE')
else :
    print((A + B) // 2)

Solution (Python):
a,b = map(int,input().split())

k = (a+b)/2

if k.is_integer() == True:
    print(int(k))
else:
    print("IMPOSSIBLE")

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

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

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

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

Solution (Python):
A, B = map(int, input().split())
K = (A+B)/2

if K == int(K):
    print(int(K))
else:
    print('IMPOSSIBLE')

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

Solution (Python):
A, B = [int(x) for x in input().split()]
C=A+B
if C%2==0:
    print(int(C/2))
else:
    print("IMPOSSIBLE")

Solution (Python):
A,B = map(int, input().split())

if (A+B)%2==0:
    print(int((A+B)/2))
else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())
if (A+B) % 2 == 0:
    print((A+B)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
a,b=map(int,input().split(" "))
if (a**2-b**2)%(2*a-2*b)==0:
  k=int((a**2-b**2)/(2*a-2*b))
  print(k)
else:
  print("IMPOSSIBLE")

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

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

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

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

Solution (Python):
a, b = map(int, input().split())

if (a+b)%2 == 0:
    print(int((a+b)/2))

else:
    print("IMPOSSIBLE")

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

Solution (Python):
A,B=map(int,input().split())
ABS=abs((A-B)/2)
if (A-B)%2==0:
    ans=[A-ABS,A+ABS,B-ABS,B+ABS]
    for k in ans:
        if abs(A-k)==abs(B-k):
            print(int(k))
            break
else:
    print('IMPOSSIBLE')

Solution (Python):
A,B = map(int,input().split())

answer = (A+B)/2
if answer.is_integer():
    print(int(answer))
else:
    print("IMPOSSIBLE")

Solution (Python):
def harmony(A: int, B: int)->int:
    C = A+B
    if C % 2 == 1:
        return -1
    return C//2


if __name__ == "__main__":
    A, B = map(int, input().split())
    ans = harmony(A, B)
    if ans < 0:
        print('IMPOSSIBLE')
    else:
        print(ans)

Solution (Python):



[A, B] = [int(i) for i in input().split()]

if A % 2 == 0:
    if B % 2 == 0:
        print(int((A+B)/2))
    else:
        print('IMPOSSIBLE')
else:
    if B % 2 != 0:
        print(int((A+B)/2))
    else:
        print('IMPOSSIBLE')

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

Solution (Python):
A, B  = map(int, input().split())

K_before = (A+B)

if K_before % 2 != 0:
    print("IMPOSSIBLE")
else:
    print(K_before // 2)

Solution (Python):
A,B = map(int,input().split())
if (A+B)%2 ==1:
    print("IMPOSSIBLE")
else:
    print((A+B)//2)

Solution (Python):
A,B = map(int,input().split())

if (A+B)%2 == 1:
    print("IMPOSSIBLE")
else:
    print(int((A+B)/2))

Solution (Python):
a,b = map(int,input().split())
k = int((a+b)/2)
if (a+b)%2 == 0 :
    print(k)
else :
    print('IMPOSSIBLE')

Solution (Python):
A,B=map(int,input().split())
if (A+B)%2 !=0:
  print('IMPOSSIBLE')
else:
  print((A+B)//2)

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

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

Solution (Python):
A, B = (int(x) for x in input().split())
K = (A + B) / 2
if A == B:
  print(0)
else:
  if K.is_integer():
    print(int(K))
  else:
    print('IMPOSSIBLE')

Solution (Python):
A, B=map(int, input().split())
if (A+B)%2!=0:
  print('IMPOSSIBLE')
else:
  print((A+B)//2)

Solution (Python):
a,b=map(int,input().split())
c=abs(a-b)
if c%2==0:
    if a<=b:
        print(abs(a+c//2))
    else:
        print(abs(a-c//2))
else:
    print("IMPOSSIBLE")

Solution (Python):
A,B = map(int,input().split())
if (A+B)%2 == 0:
  print(int((A+B)//2))
else:
  print('IMPOSSIBLE')

Solution (Python):
A, B = map(int, input().split())
K = (A + B) / 2
ans = int(K) if (A + B) % 2 == 0 else "IMPOSSIBLE"
print(ans)

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

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

Solution (Python):
A, B = map(int, input().split())

if (abs(A+B)%2 == 0):
    print(abs(A+B)//2)
else:
    print("IMPOSSIBLE")

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

Solution (Python):
a, b = input().split()
a = int(a)
b = int(b)

if (a + b) % 2 == 0:
  print(int((a+b)/2))
else:
  print("IMPOSSIBLE")

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

if (A + B) % 2 == 0:
    print(int((A + B) / 2))
else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = input().split(" ")
A = int(A)
B = int(B)

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

if (A - B) % 2 == 0:
    print(int((B - A) / 2 + A))
else:
    print("IMPOSSIBLE")

Solution (Python):
a,b = map(int, input().split())

if (a+b)%2 == 0 :
  print((a+b)//2)
else :
  print('IMPOSSIBLE')

Solution (Python):
def main():
    a, b = [int(ip) for ip in input().split()]

    k = (abs(a) + abs(b)) / 2

    if k % 1 != 0:
        print("IMPOSSIBLE")
    else:
        print(int(k))



if __name__ == "__main__":
    main()

Solution (Python):
import math
a, b = map(int, input().split())
n = abs((b - a) / 2)
k = abs((b - a) // 2)
if n != k:
    m = "IMPOSSIBLE"
elif b > a:
    m = abs(int(b - n))
else:
    m = abs(int(n - a))
print(m)

Solution (Python):
a,b = map(int,input().split())
dist = abs(a-b)
if dist % 2 != 0:
    print("IMPOSSIBLE")
    exit(0)
if a >= b:
    print(a - (dist//2))
else:
    print(a + (dist//2))

Solution (Python):
data = list(map(int,input().split()))
k = (data[0] + data[1])
if k % 2 == 1:
  print('IMPOSSIBLE')
else:
  print(int(k/2))

Solution (Python):
A,B = map(int,input().split())

if (A+B) % 2 == 0:
    print((A+B)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())

if((A+B)%2==0):
    print((A+B)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())
if (A+B) % 2 == 0:
    print(int((A+B) / 2))
else:
    print('IMPOSSIBLE')

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

if (a+b)%2==0:
    ans = int((a+b)/2)
else:
    ans = 'IMPOSSIBLE'

print(ans)

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

Solution (Python):
A,B = map(int,input().split())
K = abs(A+B)/2
if K % 1 == 0:
	print(int(K))
else:
	print("IMPOSSIBLE")

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

Solution (Python):

import math
import datetime





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

if (A+B)%2 == 0 :
  print (int((A+B)/2))
else :
  print ("IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split())
if (b-a)%2 == 1:
  print('IMPOSSIBLE')
else:
  print((b+a)//2)

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

Solution (Python):
a,b=(int(x) for x in input().split())

sum = a + b
if sum % 2 == 0:
	ans = int(sum / 2)
else:
	ans = "IMPOSSIBLE"
print(ans)

Solution (Python):
l=list(map(int,input().split()))
a=l[0]
b=l[1]
if((a+b)%2==0):
  print((a+b)//2)
else:
  print("IMPOSSIBLE")

Solution (Python):
a,b=map(int,input().split())
print((a+b)//2 if ((a+b)/2).is_integer() else "IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())
print((A+B)//2 if (A+B)%2 == 0 else 'IMPOSSIBLE')

Solution (Python):
a,b=map(int,input().split())
print([(a+b)//2,'IMPOSSIBLE'][(a+b)%2])

Solution (Python):
A,B=map(int,input().split())
print((A+B)//2 if (A+B)%2==0 else "IMPOSSIBLE")

Solution (Python):
A,B = map(int,input().split())
if A >= B:
  K = B + abs(A-B)/2
else:
  K = A +  abs(A-B)/2
if float.is_integer(K) == True:
  print(int(K))
else:
  print('IMPOSSIBLE')

Solution (Python):
a, b = map(int, input().split())

if a % 2 != b % 2:
    print('IMPOSSIBLE')
else:
    k = (a + b) / 2
    print(int(k))

Solution (Python):
A, B = list(map(int, input().split()))
if A == B:
    print(1)
elif (A + B) % 2 == 0:
    print((A + B) // 2)
else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())

if (A+B)%2 == 1:
  print('IMPOSSIBLE')
else:
  print((A+B)//2)

Solution (Python):
A,B=(int(x) for x in input().split())
C=A-B
if C%2==1:
    print("IMPOSSIBLE")
else:
    K=B+C/2
    print(int(K))

Solution (Python):
a,b = map(int,input().split())

if (a+b) % 2 == 0:
    print((a+b)//2)
else:
    print('IMPOSSIBLE')

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

Solution (Python):
A,B = map(int,input().split())
if (A+B)%2 == 0:
    print((A+B)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
A,B = map(int,input().split())
k = (A+B)
if k%2 == 0:
    print(int(k/2))
else:
    print("IMPOSSIBLE")

Solution (Python):
A,B = map(int,input().split())
K = (A + B)//2
if (A+B) % 2 ==0:
  print(K)
else:
  print("IMPOSSIBLE")

Solution (Python):
def main():
    i = list(map(int, input().split()))

    for j in i:
        if isinstance(j, int) == False:
            return
        if j < 0 or 10**9 < j:
            return
    if i[0] == i[1]:
        return

    a = i[0]
    b = i[1]

    k = (a + b)/2

    if k*2 % 2 == 0:
        print(int(k))
    else:
        print('IMPOSSIBLE')

if __name__ == '__main__':
    main()

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

Solution (Python):
a,b=map(int,input().split())
if a==b:
  print(0)
elif (a+b)%2==0:
  print((a+b)//2)
else:
  print('IMPOSSIBLE')

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

Solution (Python):
a,b=map(int,input().split())
print('IMPOSSIBLE' if (a+b)%2 else int((a+b)/2))

Solution (Python):
a,b = map(int,input().split())
if (a+b)%2!=0:
    print('IMPOSSIBLE')
else:
    print(int((a+b)/2))

Solution (Python):
a,b=map(int, input().split())
if (a+b)%2==1:
  print('IMPOSSIBLE')
else:
  k=int((a+b)/2)
  print(k)

Solution (Python):
a, b = map(int, input().split())

if (a + b) % 2 == 0:
    print(int((a + b) / 2))
else:
    print("IMPOSSIBLE")

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

Solution (Python):


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

Solution (Python):
A, B = map(int, input().split())

print((A + B) // 2) if (A + B) % 2 == 0 else print('IMPOSSIBLE')

Solution (Python):
a, b = map(int, input().split())
k = int((a+b)/2)
if abs(a-k) == abs(b-k):
    print(int(k))
else:
    print("IMPOSSIBLE")

Solution (Python):
import math
import heapq
import sys
from collections import Counter
import numpy as np





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


K=(B**2-A**2)/((-2)*(A-B))

if K.is_integer():
    print(int(K))
else:
    print('IMPOSSIBLE')

Solution (Python):
A, B = map(int, input().split())
if (A + B) % 2 != 0:
    print("IMPOSSIBLE")
else:
    print((A + B) // 2)

Solution (Python):
A,B = map(int,input().split())
buf = int((A+B)/2)
if abs(A-buf) == abs(B-buf) :
    print(buf)
else :
    print('IMPOSSIBLE')

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

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

Solution (Python):
import sys
A, B = [int(x) for x in input().split()]

if (A + B)%2 == 0:
    print((A + B)//2)
else:
    print("IMPOSSIBLE")