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())
K = A+B
if (A+B) % 2 == 1:
  print('IMPOSSIBLE')
else:
  print(int(K/2))

Solution (Python):
n,m = (int(i) for i in input().split())

if abs(n-m)%2 == 1:
  print("IMPOSSIBLE")
else:
  print((n+m)//2)

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

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())
k = a + b
if a == b:
    print(0)
elif k % 2 == 0:
    print(k // 2)
else:
    print("IMPOSSIBLE")

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

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

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

if not ((A + B) / 2.0).is_integer():
    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):
A, B = map(int, input().split())
K = (A+B)/2
if K.is_integer():
    print(int(K))
else:
    print("IMPOSSIBLE")

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

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

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):


a,b = map(int,input().split())	
a = int(a)
b = int(b)
c = abs(a-b)/2.0 + min(a,b)

if c.is_integer():
    print(int(c))
else:
    print("IMPOSSIBLE")

Solution (Python):


def solve():
    A, B = list(map(int, input().split()))
    K = (A+B)/2
    if K.is_integer():
        print(int(K))
    else:
        print("IMPOSSIBLE")

if __name__ == "__main__":
    solve()

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

if __name__ == '__main__':
    main()

Solution (Python):


import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]


    token = lines[0].split(" ")
    a = int(token[0])
    b = int(token[1])

    return (a, b)


def solve(a, b):

    c = (a + b) / 2

    if not c.is_integer():
        return "IMPOSSIBLE"

    return int(c)


def main():
    

    print("%s" % solve(*parse_input()))

if __name__ == '__main__':

    main()

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

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

Solution (Python):

import math

s = list(map(int, input().split(" ")))
ans =''

if (s[0]+s[1])%2 == 1 :
  ans = 'IMPOSSIBLE'
else :
  ans = str(math.floor((s[0]+s[1])/2))

print(ans)

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

if (B-A) % 2 == 0:
    print((A+B)//2)

else:
    print("IMPOSSIBLE")

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

ab = a + b

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

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

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

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

ans = (a + b) / 2

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

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

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

Solution (Python):





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

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

Solution (Python):
a,b = map(int, input().split())
k=(a+b)//2
if abs(a-k)==abs(b-k):
  print(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 sys

NO = "IMPOSSIBLE"  

def solve(A: int, B: int):
    a = (A + B)* 1.0/2
    if float.is_integer(a):
        print(int(a))
    else:
        print("IMPOSSIBLE")

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

Solution (Python):
a,b = list(map(int,input().split()))
x = ( a + b )%2
y = (a + b)//2

if x ==0:
    print(y)
else:
    print('IMPOSSIBLE')

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

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

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

Solution (Python):
from collections import defaultdict, deque
import sys
import heapq
import bisect
import math
import itertools
import string
import queue
import copy
import time
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

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

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

if B<A:
	A,B=B,A

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

Solution (Python):
get = input().split()
A = int(get[0])
B = int(get[1])
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 == 1:
  print('IMPOSSIBLE')
else:
  print((a + b) // 2)

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

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

    AB = input().split(" ")
    A = int(AB[0])
    B = int(AB[1])
    if (A + B) % 2 == 1:
        res = 'IMPOSSIBLE'
    else:
        res = int((A + B) / 2)
    print(res)

if __name__ == '__main__':
    main()

Solution (Python):
A,B = map(int, input().split())
ans = int(A + B) / 2
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(abs((A+B)/2)))
else:
    print('IMPOSSIBLE')

Solution (Python):

import numpy
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:
    print("IMPOSSIBLE")
else:
    print((a+b)//2)

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

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

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

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

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

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

Solution (Python):
a, b = map(int, input().split(' '))
diff = b + a
if diff % 2 == 0:
  print(diff // 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):
I=input()
s=I.split()
A=int(s[0])
B=int(s[1])

M=(A+B)/2.0

def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

if(is_integer_num(M)):
    print(int(M))
else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = (int(i) for i in input().split())

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

if ans.is_integer():
    print(int(ans))
else:
    print("IMPOSSIBLE")

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

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

print(K)

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

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

Solution (Python):
num_a, num_b = map(int, input().split(' '))

lesser = min(num_a, num_b)
greater = max(num_a, num_b)

distance = greater - lesser
if distance == 0:
    print(0)
elif distance % 2 == 0:
    print((lesser + greater) // 2)
else:
    print("IMPOSSIBLE")
exit(0)

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(' '))
ans = (A + B) / 2
print(int(ans)) if ans == int(ans) else print('IMPOSSIBLE ')

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().split(" "))
if (A + B) % 2 == 0: 
  print((A+B)//2)
else:
  print("IMPOSSIBLE")

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

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

K = (A+B)/2

if round(K) == K:
    print(int(K))
else:
    print("IMPOSSIBLE")

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

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=0
if not A==B:
    K = (A+B)/2
if not K%1 == 0:
    K = 'IMPOSSIBLE'
else:
    K = int(K)

print(K)

Solution (Python):
tmp = input()
a = int(tmp.split()[0])
b = int(tmp.split()[1])

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a,b=LI()
  
  x=max(a,b)-min(a,b)

  if x%2==1:
    return 'IMPOSSIBLE'

  return max(a,b)-x//2


print(main())

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 abs(a - b) % 2 == 0:
    print(max(a, b) - abs(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 (b+a)%2 != 0:
    print('IMPOSSIBLE')
else:
    print(abs(a+b)//2)

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

K = (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(int((a+b)/2))
else :
    print("IMPOSSIBLE")

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 = map(int, input().split())
ans, m = divmod(A+B, 2)
if m==1:
    print("IMPOSSIBLE")
else:
    print(ans)

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

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

K = abs(A-B)
u = max([A, B])

if K % 2 == 1:
    print("IMPOSSIBLE")

else:
    print(abs(int(K/2)-u))

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

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

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

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

Solution (Python):



import sys
import math
import bisect
from heapq import heappush, heappop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
mod = 10**9 + 7

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

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

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

    K2 = (A+B)

    answer = 'IMPOSSIBLE'
    if 2*A-K2 == -1 * (2*B-K2) and (A+B)%2==0:
        answer = K2//2

    print(answer)

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

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

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

Solution (Python):
a,b  = list(map(int,input().split()))
k = (a+b)/2
if (k - int(k))!=0:
    print("IMPOSSIBLE")
else:
    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())

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

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

Solution (Python):

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

if A >= B:
  q, mod = divmod((A+B),2)
  if mod == 0:
    print(q)
  else:
    print("IMPOSSIBLE")
else:
  q, mod = divmod((A+B),2)
  if mod == 0:
    print(q)
  else:
    print("IMPOSSIBLE")

Solution (Python):
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [A, B] = string_to_int(inputs[0])
    if (A + B) % 2 != 0:
        return "IMPOSSIBLE"
    else:
        return (A+B) // 2


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Solution (Python):
S = input()

S = list(map(int, S.split()))

A = S[0]
B = S[1]

f = (A+B) / 2

if f.is_integer():
    print(int(f))
else:
    print("IMPOSSIBLE")

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

ans = (a+b)/2
if ans % 1 == 0:
    print("{}".format((int)(ans)))
else:
    print("IMPOSSIBLE")

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

Solution (Python):
a, b = map(int, input().split())
c = abs(a - b)
if c % 2 == 0:
    print(c // 2 + min((a, b)))
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(x) for x in input().split()]

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

print(ans)

Solution (Python):
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    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())
C = abs(A-B)/2
if A != B:
    if C.is_integer():
        print(int(abs(A + B)/2))
    else:
        print('IMPOSSIBLE')
else:
    print(0)

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

ans = (A + B) / 2

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

Solution (Python):

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

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

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

c = (a+b)//2

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

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

c = (a + b)/2

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

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

Solution (Python):
import sys,collections,math,random;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

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

Solution (Python):



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

K = (abs(A) + abs(B)) / 2

if K*10%10 == 0:
    print(int(K))
else:
    print("IMPOSSIBLE")

Solution (Python):



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

dist = (B - A) / 2
if dist.is_integer():
    print(int(A+dist))
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())
if (a^b)&1 :
    print('IMPOSSIBLE')
else :
    print((a+b)//2)

Solution (Python):
"""


 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  


a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654


char_list = list("abcd") 
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    A,B= map(int, sys.stdin.readline().split())
    n = (A+B)/2
    j = (A+B)%2
    if j == 0:
        print(int(n))
    else:
        print("IMPOSSIBLE")

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

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

k = (a +b) / 2

if k % 1 > 0:
	print( "IMPOSSIBLE")
else:
	print( int(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 = [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().strip().split())
a, b = divmod(A + B, 2)
if b == 0:
  print(a)
else:
  print("IMPOSSIBLE")

Solution (Python):


a,b = map(int,raw_input().split(" "))


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

Solution (Python):
line = list(map(int, input().split(" ")))
A = line[0]
B = line[1]

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

Solution (Python):

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

Z = abs(A-B)
if (Z /2).is_integer():
    print(int(abs(min(A, B) + (Z/2))))
else:
    print("IMPOSSIBLE")

Solution (Python):
from sys import stdin
a,b = map(int,input().split())

c=(a+b)/2

if c%1.0!=0:
    print('IMPOSSIBLE')
else:
    print(int(c))

Solution (Python):
def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

A, B = map(int, input().split())
a = (A + B) / 2
if is_integer_num(a):
    print(int(a))
else:
    print("IMPOSSIBLE")

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

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

Solution (Python):

from collections import defaultdict, deque
import math
from math import factorial
import fractions
import re

BIGNUM = 10 ** 9 + 7

def main():
    A, B = map(int, input().split())

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

if __name__ == '__main__':
    main()

Solution (Python):
ini=input().split()

N=int(ini[0])
K=int(ini[1])

mod=(N+K)%2
if mod==1:
    print("IMPOSSIBLE")
else:
    print(int((N+K)/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
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, d=DVSR): return pow(x, d - 2, d)
def DIV(x, y, d=DVSR): return (x * INV(y, d)) % d
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())

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

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

if A <0 and B<0:
    print('IMPOSSIBLE')
else:
    m = abs(A-B)
    if m%2==1:
        print('IMPOSSIBLE')
    else:
        print(int(m/2+min(A,B)))

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

sum = a + b
if sum % 2 == 1:
  print("IMPOSSIBLE")
else:
  print(sum // 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:
    print(0)
elif (A+B) / 2 == (A+B) // 2:
    print((A+B) // 2)
elif (A-B) / 2 == (A-B) // 2:
    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((A+B)//2)
else:
    print("IMPOSSIBLE")

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

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

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

Solution (Python):
x = input().split()

a = int(x[0])
b = int(x[1])

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

Solution (Python):
from heapq import heappush, heappop
from collections import deque
import itertools
from itertools import permutations
import sys
import bisect
sys.setrecursionlimit(10**6)
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]
YN=['Yes','No']
YNeos='YNeos'
mo=10**9+7
imp='IMPOSSIBLE'


n,m=MI()
ans=(n+m)//2 if (n-m)%2==0 else imp

print(ans)

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

if a > b:
    small = b
    big = a
elif a == b:
    print(0)
    exit()
else:
    small = a
    big = b

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

Solution (Python):
s = input().split(' ')

a = int(s[0])
b = int(s[1])

sub = a+b

if(sub % 2 == 0):
    print(sub // 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 = list(map(int, input().split()))
if a==b:
  print(0)
else:
  t = (a+b)/2
  if t%1==0:
    print(int(t))
  else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = [int(i) for i in 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())
print((a+b)//2 if (a+b)%2==0 else "IMPOSSIBLE")

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

sums=a+b

if sums//2 == sums/2:
  print(sums//2)
else:
  print('IMPOSSIBLE')

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

Solution (Python):


from itertools import combinations
from collections import defaultdict
from pprint import pprint
import math
import datetime
import sys

A, B = [int(x) for x 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) / 2


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

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

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

Solution (Python):
from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    if abs(A - B) % 2:
        print('IMPOSSIBLE')
        return
    print(max(A, B) - (abs(A - B) // 2))


if __name__ == "__main__":
    main()

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

    K = (A ** 2 - B ** 2) / (2 * (A-B))
    if K.is_integer():
        print(int(K))
    else:
        print('IMPOSSIBLE')

main()

Solution (Python):
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations

from itertools import accumulate
from bisect import bisect_left, bisect_right

import re



def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e18)
MOD = int(1e9)+7 


def create_grid(W, H, value = 0):
    return [[ value for _ in range(H)] for _ in range(W)]



A, B = l_inpl()

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

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

AB = (A + B) / 2

if AB.is_integer():
    print(int(AB))
else:
    print("IMPOSSIBLE")

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

c = abs(a-b)

if c % 2 == 0 :
  x = abs((a**2 - b**2)/(2*b - 2*a))
  print(int(x))
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):
def main():
    a,b = map(int,input().split())
    k = (a**2-b**2)/(a-b)/2
    if k == int(k):
        print(int(k))
    else:
        print("IMPOSSIBLE")
    
    
if __name__ == '__main__':
    main()

Solution (Python):

import sys;
import string;
sys.setrecursionlimit(20000) 

import copy
import math
import itertools

from functools import lru_cache


PPP = 1000000007








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
































import re
import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

def ton(n, k, x):
  s = ""
  while n > 0:
    s = str(n%k) + s
    n //= k
  return s





def getEnergy():
  for y in b:
    yield y

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

def yn():
  if doit():
    return "Yes"
  else:
    return "No"




try:
  doit()
  
  
except Exception as e:
  print("e", e, file=sys.stderr)

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

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


c = a + b


print('{}'.format(int(c/2))) if c % 2 == 0 else print('IMPOSSIBLE')

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

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

if a%2 != b%2:
    print("IMPOSSIBLE")
else:
    m = max(a,b)
    n = min(a,b)
    print((m-n)//2 + n)

Solution (Python):
ab = [int(x) for x in input().split(' ')]

if(ab[0] == ab[1]):
    print("0")
elif((ab[0] + ab[1]) % 2 == 0):
    print((ab[0] + ab[1])//2)
else:
    print("IMPOSSIBLE")

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

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

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

Solution (Python):
from enum import Enum
from queue import Queue
import collections

import sys
import math

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

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())

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

Solution (Python):

X = [int(el) for el in input().split(' ')]

if X[0] == X[1]:
    print(0)
else:
    k = (X[0] + X[1])/2
    if k.is_integer():
        print(int(k))
    else:
        print('IMPOSSIBLE')

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

if (b-a)%2==0:
    print(a+(b-a)//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):
s = input().split()
A=int(s[0])
B = int(s[1])
c=A+B
if c%2==0:
    print(int(c/2))
else:
    print('IMPOSSIBLE')

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

a = max(A, B)
b = min(A, B)

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

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

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

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