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



Sample input:
2 16


Sample output:
9

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if a == b:
  print("IMPOSSIBLE")
  exit()

if a > b:
  diff = a - b
else:
  diff = b - a

print(diff)

for i in range(diff):
  one = abs(a - i)
  two = abs(b - i)

#  print(i, one, two)

  if one == two:
    print(i)
    exit()
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def harmony(x,y):
    z=0
    for i in range(0,y):
        x=abs(x-i)
        y=abs(y-i)
        z=i
        if x==y:
            break
    if x==y:
        print (z)
    else:
        print ("IMPOSSIBLE")

Submission status: Wrong Answer

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

if a == b:
  print("IMPOSSIBLE")
  exit()

diff = b - a 

for i in range(diff):
  one = abs(a - i)
  two = abs(b - i)

#  print(i, one, two)

  if one == two:
    print(i)
    exit()
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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

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

if a==b:
    print(0)

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

Submission status: Wrong Answer

Solution code:
def harmony(x,y):
    z-0
    for i in range(0,y):
        x=abs(x-i)
        y=abs(y-i)
        z=i
        if x==y:
            break
    if x==y:
        print (z)
    else:
        print ("IMPOSSIBLE")

Submission status: Wrong Answer

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

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

if a==b:
    print(0)

else:
    k=int((a-b)/2)

    if abs(a-k)==abs(b-k):
        print(k)

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().strip().split()))
half = int((a[1]-a[0])/2)
for k in range(a[0]+1,half):
  if abs(a[0]-k) == abs(a[1]-k):
    print(k)
  else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().strip().split()))
half = int((a[1]+a[0])/2)
for k in range(a[0]+1,half):
  if abs(a[0]-k) == abs(a[1]-k):
    print(k)
  else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
 
if A > B:
  for i in range(A):
    k = abs(A-i)
    l = abs(B-i)
    if k == l:
      print(i)
  else:
    print('IMPOSSIBLE')
if A < B:
  for i in range(B):
    k = abs(A-i)
    l = abs(B-i)
    if k == l:
      print(i)
  else:
    print('IMPOSSIBLE')

Submission status: Wrong Answer

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

if a == 0:
  print("IMPOSSIBLE")
  exit()

if a == b:
  print("IMPOSSIBLE")
  exit()

for i in range(1000000000):
  one = abs(a - i)
  two = abs(b - i)

  print(one, two, i)

  if one == two:
    print(i)
    exit()
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A=5
B=-5
print(A)

Submission status: Wrong Answer

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

if a < 0:
  print("IMPOSSIBLE")
  exit()

if a == b:
  print("IMPOSSIBLE")
  exit()

for i in range(1000000000):
  one = abs(a - i)
  two = abs(b - i)

  print(one, two, i)

  if one == two:
    print(i)
    exit()
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
for i in range(a,1000000000,1):
    if abs(a-i) == abs(b-i):
        print(i)
        exit()
print('IMPOSSIBLE')

Submission status: Wrong Answer

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

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

if a==b:
    print(0)

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
print('IMPOSSIBLE')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
# ----------------------------------------------------------------
# Use Solve Function

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 !!
#
solve(lines)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = input().split()
a, b = int(a), int(b)
if (a + b) % 2 == 0:
  	print("YES")
else:
  	print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A > B:
  for i in range(A):
    k = abs(A - i)
    l = abs(B - i)
    if k == l:
      print(i)
    else:
      print('IMPOSSIBLE')

if A < B:
  for i in range(B):
    k = abs(A - i)
    l = abs(B - i)
    if k == l:
      print(i)
    else:
      print('IMPOSSIBLE')

Submission status: Wrong Answer

Solution code:
a = input()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1000000000):
  one = abs(a - i)
  two = abs(b - i)

  print(one, two)

  if one == two:
    print(i)
    exit()
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A,B = [int(i) for i in input().split(" ")]
flag = 0
 
if A>B:
	leng = A
else:
    leng = B
  
for k in range(leng):
    if (abs(A-k) == abs(B-k)):
        flag = 1
        print(k)
        break
    
if flag == 0:
    print("IMPOSSIBL")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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(k)
  else:
    k = a + (b-a)/2
    print(k)

Submission status: Wrong Answer

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

x = abs(a-b)

print(x)

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

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

Submission status: Wrong Answer

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

print(int(a - ((a-b)//2)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = (int(i) for i in input().split())
if (A == 0) | (B == 0):
    print('IMPOSSIBLE')
else:
    print(int((B/ 2) + (A / 2)))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().strip().split()))
for i in range(a[0]+1,a[1]):
  if ((a[0]-i) == (a[1]-i)) or ((a[0]-i) == (i-a[1])):
    print(i)
  else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if a>b:
  big=a
  small=b
else:
  big=b
  small=a
t=(big-small)/2
if big-t==small+t:
  print(int(big-t))
else:
  print('IMPOSSIBLE')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = list(map(int, input().split()))
K = 0
while K < (A+B)/2:
    ans1 = A-K
    ans2 = B-K
    if abs(A) == abs(B):
        print(K)
        break
    K = K + 1
print("IMPOSSIBLE")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().strip().split()))
for i in range(a[0]+1,a[1]):
  if (a[0]-i)**2 == (a[1]-i)**2:
    print(i)
  else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
A, B = list(map(int, input().split()))
K = 0
while K < A:
    ans1 = A-K
    ans2 = B-K
    if abs(A) == abs(B):
        print(K)
        break
    K = K + 1
print("IMPOSSIBLE")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
input_data = input().split()
A = int(input_data[0])
B = int(input_data[1])

answer = (A+B)/2
if answer.is_integer() == True:
  print(int(answer))
else:
  print('impossible')

Submission status: Wrong Answer

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

K=abs(A+B)/2

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

k = (a+b) / 2

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

Submission status: Wrong Answer

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

c = a + b

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

k = (a + b) / 2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = list(map(int, input().split()))
K = 0
while K < 100000:
    ans1 = A-K
    ans2 = B-K
    if abs(ans1) == abs(ans2):
        print(K)
        break
    K = K + 1
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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


c  = abs((b-a)/2)

if c.is_integer() == True:
  print(int(c))


else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

if (x + y) % 2 == 0:
    print((x+y)/2)
else:
    print('IMPOSSIBLE')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int,input().split())
kk =  (a - b) / 2
if ((a - kk) == (b - kk)) or ((a - kk) == (b + kk)) :
    print(a - kk)
else :
    print('IMPOSSIBLE')

Submission status: Wrong Answer

Solution code:
x=list(map(int,input().split()))

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

k = (a+b) / 2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A , B = (int(x) for x in input().split())
k = (B + A) / 2
K = (B + A) % 2
if K == 0:
    print(k)
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

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

ans = 0

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if int(ans) == int(round((A+B)/2)):
    print(int(ans))
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x = abs(a-b)
if x % 2 == 0:
  print(abs(x - a))
else:
  print('IMPOSSIBLE')

Submission status: Wrong Answer

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


c = abs((b-a) /2)

if c.is_integer() == True:
  print(int(c))


else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

n = max(a, b)

for i in range(b//2, b+1):
    if abs(a-i) == abs(i-b):
        print(i)
        exit()

print('IMPOSSIBLE')

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
x = abs(a-b)
if x % 2 == 0:
  print('IMPOSSIBLE')
else:
  print(abs(x - a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
k=abs((a-b)/2)
if (a-b)%2==0:
  if (a<b):
    print(b-k)
  else:
    print(a-k)

else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
ans = abs((A-B)/2)
ans2 = abs((A-B)//2)
if ans == ans2:
  print(int(ans))
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
s = (a+b)/2

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

Submission status: Wrong Answer

Solution code:
x=list(map(int,input().split()))

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
c = 'IMPOSSIBLE'
for i in range(a, b):
    if abs(a-i) == abs(b-i):
        c = int(i)
print(c)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
k=(a-b)/2
if (a-b)%2==0:
  if (a<b):
    print(b-k)
  else:
    print(a-k)

else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split() )
 
if abs(b-a)%2==0:
    print(int(abs(b-a)/2))
else:
    print('IMPSSOIBLE')

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for x in range(A, B + 1):
    if (A - x)**2 == (B - x)**2:
        print(x)
        break
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split()) 
x = (a + b) / 2
print(int(x))

Submission status: Wrong Answer

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

print(a)
print(b)

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

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
if (n+m)%2 == 0:print((n+m)/2)
else:print("IMPOSSIBLE")

Submission status: Wrong Answer

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

s = a+b

if s < 0:
    s = 0-s

print(s)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ab = int(abs(A-B)/2)

if A == 0 or B == 0:
    print("IMPOSSIBLE")
else:
    print(min(abs(A), abs(B))+ab)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for x in range(A, B):
    if (A - x)**2 == (B - x)**2:
        print(x)
        break
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)


def li(): return map(int, stdin.readline().split())


def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())


def lf(): return map(float, stdin.readline().split())


def ls(): return stdin.readline().split()


def ns(): return stdin.readline().rstrip()


def lc(): return list(ns())


def ni(): return int(stdin.readline())


def nf(): return float(stdin.readline())

A, B =  li()

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

Submission status: Wrong Answer

Solution code:
import string
while True:
    try:
        a,b=map(int,input().split())
        if a!=b:
            if str((a+b)/2.0).isdecimal():
                print(int((a+b)/2))
            else:print("IMPOSSIBLE")
        else:print(int(a+b))
    except:break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b = list(map(int,input().split()))
c = 0
d = 0
c = (b-a)/2
d = a + c

if(type(d) is int):
  print(d)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = input()
A = int(s.split()[0])
B = int(s.split()[1])

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
c = B**2-A**2
if c % 2== 1:
  print('IMPOSSIBLE')
else:
  print(c/(2*(B-A)))

Submission status: Wrong Answer

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

def calc(a, b):
    # a < b
    c = b - a
    if c % 2 == 0:
        return (c/2) + a
    return 'IMPOSSIBLE'
if a < b:
    print(calc(a, b))
else:
    print(calc(b, a))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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()

Submission status: Wrong Answer

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

ab = int(abs(A-B)/2)

if A == 0 or B == 0:
    print("IMPOSSIBLE")
else:
    print(min(A,B)+ab)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if (abs(A-B)/2) % 1 != 0:
	print('IMPOSSIBLE')
else:
	print(int(abs(A-B)/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

c=(a+b)/2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

mod=(N+K)%2
if mod==1:
    print("IMPOSSIBLE")
else:
    print((N+K)/2)

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
if (max(a, b) + min(a, b)) % 2 == 1:
  print('Impossible')
else:
  print((max(a, b) + min(a, b)) // 2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
s = input()
A = int(s.split()[0])
B = int(s.split()[1])

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for x in range(A, B):
    if (A - x)**2 == (B - x)**2:
        print(x)
        break
    else:
        print("IMPOSSIBLE")
        break

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print((a+b)/2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = input().split()
a = int(a)
b = int(b)
k = (a + b) / 2.0

if k.is_integer():
    print(int(k))

Submission status: Wrong Answer

Solution code:
a=[]
for x in input().split(" "):
    a.append(int(x))

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