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):
import statistics
import sys
import math
INPUT = sys.stdin.readline

def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()
 
def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False
    
A = MULT_INT_LIST()
mean = statistics.mean(A)
 
if is_integer_num(mean):
  print(int(mean))
else:
  print('IMPOSSIBLE')

Solution (Python):
x,y=map(int,input().split())
if((x+y)%2==0):
  print((x+y)//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

if __name__ == '__main__':
    input = list(map(int, input().split()))
    inputA = input[0]
    inputB = input[1]
    
    if inputA < 0:
        sys.stdout.write("IMPOSSIBLE")
        sys.exit()
    
    if inputB < 0:
        sys.stdout.write("IMPOSSIBLE")
        sys.exit()

    if inputA == inputB:
        sys.stdout.write("IMPOSSIBLE")
        sys.exit()

    if (inputA + inputB) % 2 == 0:
        sys.stdout.write(str(int((inputA + inputB) / 2)))
        sys.exit()
      
    sys.stdout.write("IMPOSSIBLE")
    sys.exit()

Solution (Python):
inp = input().split(" ")
a = int(inp[0])
b = int(inp[1])
 
c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)
 
  m = (max(abs_a, abs_b) - min(abs_a, abs_b)) /2
  ans = max(abs_a, abs_b) - m
  print(int(ans))
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):

import math

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

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

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

K = (A+B)/2
K_ = (A+B)%2
if K_>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 = map(int,input().split())

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

Solution (Python):
import sys

def main():
    A,B = tuple(map(int, sys.stdin.readline().split()))
    ans = (A+B)/2
    if ans.is_integer():
        print(int(ans))
    else:
        print('IMPOSSIBLE')

if __name__=='__main__':
    main()

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    a, b = map(int, input().split())
    K = (a + b) // 2
    if abs(a - K) == abs(b - K):
        return K
    else:
        return 'IMPOSSIBLE'


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

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

Solution (Python):
a,b=map(int,input().split())
if((a+b)%2==0):
  print('{0}'.format((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):
l = map(int, raw_input().split())
a = l[0]
b = l[1]
c = int(a + b)

def judge_int():
    if c % 2 == 0:
        return c/2
    elif c % 2 != 0:
        return "IMPOSSIBLE"

print(judge_int())

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

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

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

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

c = max(a,b) -((max(a,b)-min(a,b)) // 2)

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

Solution (Python):
def getIntList(): return [int(x) for x in input().split()]

x = getIntList()
if((x[0]+x[1])%2==0):
    print(int((x[0]+x[1])/2))
else:
    print('IMPOSSIBLE')

Solution (Python):

(N,M) = (int(i) for i in input().split(" "))
if (N+M)%2==1:
	print("IMPOSSIBLE")
else:
	print(int((N+M)/2))

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

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

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

result = (a+b)/2

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

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

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

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

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

Solution (Python):
a, b = map(int, input().split())
large = max(a, b)
ans = ((a + b) / 2)

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

Solution (Python):


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

if A%2 == B%2:
    ptn1 = (A+B) / 2
    ptn2 = (A-B) / 2
    ptn3 = (B-A) / 2
    ptn4 = (-A-B) / 2
    if abs(A - ptn1) == abs(B - ptn1):
        print(int(ptn1))
    elif abs(A - ptn2) == abs(-B + ptn2):
        print(int(ptn2))
    elif abs(-A + ptn3) == abs(B - ptn3):
        print(int(ptn3))
    elif abs(-A + ptn4) == abs(-B + ptn4):
        print(int(ptn4))
else:
    print("IMPOSSIBLE")

Solution (Python):
a,b=[int(x) for x in input().split()] 
c=(a+b)/2
k=(a+b)//2
if(k==c):
  if(abs(a-k)==abs(b-k)):
     print(k)
else:
     print("IMPOSSIBLE")

Solution (Python):
import statistics
import sys
import math
INPUT = sys.stdin.readline

def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()

def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False
    
A = MULT_INT_LIST()
mean = statistics.mean(A)

if is_integer_num(mean):
  print(int(mean))
else:
  print('IMPOSSIBLE')

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

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

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

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

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

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

print(["IMPOSSIBLE",int((A+B)/2)][(A+B)%2 == 0])

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,input().split())

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

else:
    k=int((a+b)/2)
    if abs(a-k)==abs(b-k):
        print(k)

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

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

Solution (Python):
IN = [ int(item) for item in input().split()]
a = IN[0]
b = IN[1]

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

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

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

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

print(answer)

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

k = abs(a - b)
if (k % 2 != 0):
    print('IMPOSSIBLE')
else:
    print(min(a, b) + k // 2)

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

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

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

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

K = (max(A,B)-min(A,B))

if K % 2 == 0:
	print(int(abs(max(A,B)-K/2)))
else:
    print('IMPOSSIBLE')

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

Solution (Python):

def main():

    A,B = map(int,input().split())
    if A==0 or B==0:
        print("IMPOSSIBLE")
        exit()
    if A%2!=B%2:
        print("IMPOSSIBLE")
        exit()

    small = min(A,B)
    large = max(A,B)
    large -= small
    print(int(large/2+small))




if __name__== "__main__":
    main()

Solution (Python):
A, B = map(int, input().split())
print(abs(A-B) // 2 + min(A, B) if (A-B) % 2 == 0 else "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:
  if a > b:
    k = b + (a-b)/2
    print(int(k))
  else:
    k = a + (b-a)/2
    print(int(k))

Solution (Python):
a,b = map(int,list((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:
    a, b = b, a

if (a-b)%2 == 0:
    k = (a - b) // 2
    print(k+b)
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):
import sys



def solve(lines):
    A,B = map(int, lines.pop(0).split(' '))
    c = abs(A+B)

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

lines = [x.strip() for x in sys.stdin.readlines()]




solve(lines)

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

Solution (Python):
a, b = input().split()
a, b = int(a), int(b)
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(int(c/2))
else:
  print("IMPOSSIBLE")

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

A = abs(int(S[0]) - int(S[1]))
ans = 0
if A % 2 == 0:
  ans = int(A / 2) 
  if int(S[0]) > int(S[1]):
    print(ans + int(S[1]))
  else:
    print(ans + int(S[0]))
else:
  print('IMPOSSIBLE')

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

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

Solution (Python):
arr = input().split(" ")
A = int(arr[0])
B = int(arr[1])
 
if (A + B) % 2 == 0:
    print(int((A + B) / 2))
else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())
max_N = max(A, B)
min_N = min(A, B)
if (max_N % 2 == 0 and min_N % 2 == 0) or (max_N % 2 == 1 and min_N % 2 == 1):
    print(max_N - ((max_N - min_N) // 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:
    print('IMPOSSIBLE')
else:
    print((a + b) // 2)

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

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

Solution (Python):
LARGE = 10 ** 9 + 7


def solve_a(test=False, a=2, b=16):

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


def solve_b(test=False, n=5, p_list=[5, 2, 3, 4, 1]):

    if not test:
        n = int(input())
        p_list = list(map(int, input().split()))

    r = 0
    for i in range(n):
        if p_list[i] != i + 1:
            r += 1
    if r == 0 or r == 2:
        print("YES")
    else:
        print("NO")


def solve_c(test=False, n=2, a_list=[3, 5, 2], b_list=[4, 5]):

    if not test:
        n = int(input())
        a_list = list(map(int, input().split()))
        b_list = list(map(int, input().split()))

    res = 0
    for i in range(n):
        if b_list[i] <= a_list[i]:
            res += b_list[i]
            a_list[i] -= b_list[i]
        elif b_list[i] < a_list[i] + a_list[i + 1]:
            res += b_list[i]
            a_list[i + 1] -= b_list[i] - a_list[i]
            a_list[i] = 0
        else:
            res += a_list[i] + a_list[i + 1]
            a_list[i] = 0
            a_list[i + 1] = 0

    print(res)


def solve_d(test=False, s='??2??5'):

    if not test:
        s = input()

    l = len(s)
    res_list_new = [0] * 13
    res_list_old = [0] * 13
    zero_mod = int(s.replace('?', '0')) % 13
    res_list_new[zero_mod] += 1

    for i in range(1, l + 1):
        if s[-i] == '?':
            for k in range(13):
                res_list_old[k] = res_list_new[k] % LARGE
            base_mod = pow(10, i-1, 13)
            for j in range(1, 10):
                for k in range(13):
                    res_list_new[(k + base_mod * j) % 13] += res_list_old[k]

    print(res_list_new[5] % LARGE)



















solve_a()

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

if a >= b:
    max = a
    min = b
else:
    min = a
    max = b

ans = int((max-min) / 2)
if abs(max - ans) == abs(min + ans):
    print(abs(max-ans))
else:
    print("IMPOSSIBLE")

Solution (Python):
def main():
	import sys
	input = sys.stdin.readline
	A, B = list(map(int, input().split()))
	if (A - B) % 2 == 0:
		ans = (A + B) / 2
		print(int(ans))
	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())

ab = (A + B) / 2

if ab.is_integer():
    print(int(ab))
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 (b+a)%2 != 0:
    print("IMPOSSIBLE")
else :
    print(int((b+a)/2))

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys, math, bisect, random, itertools
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    a, b = LI()
    if (a + b) % 2:
        print("IMPOSSIBLE")
        return
    print((a + b) // 2)
    return


def B():
    n = II()
    p = LI()
    for i in range(n):
        for k in range(i+1, n):
            pi = p[::1]
            pi[i], pi[k] = pi[k], pi[i]
            for j in range(n-1):
                if pi[j] > pi[j + 1]:
                    break
            else:
                print("YES")
                return
    print("NO")
    return


def C():
    n = II()
    a = LI()
    b = LI()
    ans = 0
    for i in range(n):
        if a[i] >= b[i]:
            ans += b[i]
            continue
        ans += a[i]
        b[i] -= a[i]
        if a[i + 1] >= b[i]:
            ans += b[i]
            a[i + 1] -= b[i]
            continue
        ans += a[i + 1]
        a[i + 1] = 0
    print(ans)
    return


def D():
    s = S()
    s = s[::-1]
    dp = [[0] * 13 for _ in range(len(s))]
    remain = 1
    if s[0] == "?":
        for i in range(10):
            dp[0][i] = 1
    else:
        dp[0][int(s[0])] = 1
    for i in range(1, len(s)):
        remain = (remain * 10) % 13
        dpi = dp[i]
        dpi1 = dp[i-1]
        if s[i] == "?":
            for k in range(10):
                for j in range(13):
                    dpi[(j + remain * k) % 13] += dpi1[j]
                    dpi[(j + remain * k) % 13] %= mod
        else:
            for j in range(13):
                dpi[(j + remain * int(s[i])) % 13] += dpi1[j]
    print(dp[-1][5])
    return


def E():
    return


def F():
    return


if __name__ == '__main__':
    A()

Solution (Python):
a, b = map(int, input().split())
c = abs(a-b)
print(abs(max(a,b) - int(c/2))) if c%2 ==0 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())
ans=int((A+B)/2)

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

Solution (Python):
a,b=(int(x) for x in input().split())
k = (a+b)/2
if int(k.is_integer()) == True:
    print(int(k))
else :
    print('IMPOSSIBLE')

Solution (Python):
a = list(map(int, input().split()))
b = a[0] + a[1]
c =int( b / 2)
d = b % 2

if d == 1:
    print ("IMPOSSIBLE")
else:
    print (c)

Solution (Python):
N=[int(i) for i in input().split()]
A=int(N[0])
B=int(N[1])

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

Solution (Python):


if __name__ == "__main__":
    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")

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

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

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

aa=0;bb=0
if a>b :
  sm=b
else:
  sm=a

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

Solution (Python):
import numpy

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

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

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

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

A = i[0]
B = i[1]

k = (A + B) / 2

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

Solution (Python):
from numpy.linalg import solve
a, b = map(int, input().split())
x = [[1, 1],[1, -1]]
ans = solve(x,[a, b])
ans = ans[0]
if int(ans) != ans:
    ans = 'IMPOSSIBLE'
else:
    ans = abs(int(ans))
print(ans)

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

Solution (Python):
def LI(): return list(map(int, input().split()))
a, b = LI()
a, b = min(a, b), max(a, b)

d = b - a
if d % 2 == 0:
  print(a + d // 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 = list(map(int,input().split()))
c = 0
d = 0
e = 0
c = (b-a)/2
e = (c*10)%10
if(e==0):
  d = int((a + c))
  print(d)
else:
  print("IMPOSSIBLE")

Solution (Python):
a, b = (int(i) for i in input().split()) 
if a == 0 or b > 10**9 or b == 0 or a == b:
  print('IMPOSSIBLE')
  
elif (a + b) % 2 != 0:
  print('IMPOSSIBLE')
else:
  x = (a + b) / 2
  print(int(x))

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

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

Solution (Python):
def is_integer(n):
	try:
		float(n)
	except ValueError:
		return False
	else:
		return float(n).is_integer()

a,b = map(int, input().split())
evenNum = (int(a) + int(b)) / 2

if(is_integer(evenNum)):
	print(int(evenNum))
else:
	print("IMPOSSIBLE")

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    a, b = [int(i) for i in input().split()]
    k = (a + b) // 2
    if abs(a - k) == abs(b - k):
        print(k)
    else:
        print("IMPOSSIBLE")


if __name__ == "__main__":
    main()

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

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

kari = (a + b) /2

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

Solution (Python):
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")


def main():
    A, B = map(int, input().split())
    logging.info("Hello!")

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

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

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

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

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

k=0
tmp = a + b

if tmp%2 == 0:
    k = tmp//2
else:
    k = "IMPOSSIBLE"

print(k)

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

Solution (Python):
A, B = (int(i) for i in input().split())
if (A == 0) | (B == 0):
    print('IMPOSSIBLE')
elif (abs(A - B) % 2 == 1):
    print('IMPOSSIBLE')
else:
    print(int((B/ 2) + (A / 2)))

Solution (Python):


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


if __name__ == '__main__':
    solve()

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

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

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

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

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

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

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

else:
    print('IMPOSSIBLE')

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

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

x = abs(a-b)

if x % 2 != 0:
    print("IMPOSSIBLE")
    exit()

if a < b:
    print(a + (x // 2))
else:
    print(b + (x // 2))

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

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

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

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


def solve(a, b):
    k = (a + b)/2
    if k == int(k):
        return int(k)
    return "IMPOSSIBLE"


def main():
    a, b = input_from_console()
    print(solve(a, b))


if __name__ == "__main__":
    import sys

    if sys.gettrace():  
        check_cases()
    else:
        main()

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

Solution (Python):

A,B = map(int, input().split())
ans = ( A + B ) / 2
ansstr = ans.is_integer()

if ansstr == True:
    print (int(ans))
else :
    print ("IMPOSSIBLE")

Solution (Python):
Ask = input()
puts = Ask.split()


A = int(puts[0])
B = int(puts[1])
Ans = 0

Pos = False

if (A == B):
	Pos = True
elif (A**2 - B**2) % (2*(A-B)) == 0:
	Pos= True
	Ans =  (A**2 - B**2) / (2*(A-B))
	
if not Pos:
	print('IMPOSSIBLE')
else:
	print(int(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:
    a,b = b,a
k = int((a - b)/2)
p = a-k
if a-p == abs(b-p):
    print(p)
else:
    print("IMPOSSIBLE")

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

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

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

Solution (Python):
p=input().rstrip().split(' ')
if ((int(p[0]) + int(p[1]))%2)==0:
    print((int(p[0]) + int(p[1]))//2)
else:
    print("IMPOSSIBLE")

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

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

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

isFloat = (A + B) % 2 
result = (A + B) / 2 


if (isFloat > 0) :
    print("IMPOSSIBLE")
else:
    print(int(result))

Solution (Python):
a, b = (int(x) for x in input().split())
result = (b ** 2 - a ** 2) / (-2 * a + 2 * b)
if result.is_integer():
    print(int(result))
else:
    print("IMPOSSIBLE")

Solution (Python):
import sys

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

K = (A + B)/2

if 2*K != (A+B):
    print 'IMPOSSIBLE'
    sys.exit(0)

print  K

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

import numpy as np

a,b=acinput()

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

Solution (Python):
N = input().split(" ")
A = int(N[0])
B = int(N[1])

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

Solution (Python):


import sys

sys.setrecursionlimit(10**7)


input = sys.stdin.readline


def read_h(typ=int):
    return list(map(typ, input().split()))


def read_v(n, m=1, typ=int):
    return [read_h(typ) if m > 1 else typ(input()) for _ in range(n)]


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


if __name__ == '__main__':
    main()

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

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

if (arr[0]+arr[1])%2==0:
    print(int((arr[0]+arr[1])/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:
    c = A - B
else:
    c = B - A

q, mod = divmod(c, 2)
if mod == 1:
    print("IMPOSSIBLE")
else:
    print(max(A, B) - q)

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

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

print("IMPOSSIBLE")

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

s = a + b

if s % 2 == 1:
  print("IMPOSSIBLE")
else:
  print(int(s / 2))

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

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

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

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

if(a < b):
  swap = b
  b = a
  a = swap

k = (a + b) // 2

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