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

Solution code:
nums = input().split(" ")
if (int(nums[0])+int(nums[1])) % 2 == 1:
  print("IMPOSSIBLE")
else:
  print(int((int(nums[0])+int(nums[1]))/2))

Submission status: Accepted

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

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

else:
    print(int((A+B)/2))

Submission status: Accepted

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

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

else:
    print(str(int(a/2)))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
A,B=input().split()

A=int(A)
B=int(B)

def abs(x):
    if x>=0:
        return x
    else:
        return -x
        
if abs(A-B)%2==0:
    print(min(A,B)+int(abs(A-B)/2))
else:
    print('IMPOSSIBLE')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-                                                                              

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

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

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip('\n').split()))
    if (a + b) % 2 == 0:
        print((a + b) // 2)
    else:
        print("IMPOSSIBLE")


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print((a + b) // 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
if (A[0] - A[1]) %2 != 0:
  print('IMPOSSIBLE')
  exit()
print( int( abs(A[0]+ (A[1] - A[0])/2 ) ) )

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

t = a + b

if t % 2 == 1:
	print('IMPOSSIBLE')
else:
	print(t // 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# インプットの入力
A, B = map(int, input().split())

if (abs(A - B) % 2 == 0) :
	X = int(abs(A - B) / 2) + min([A, B])
else:
	X = "IMPOSSIBLE"

# 出力
print("{0}".format(X))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if(abs(a-b)%2==0):  
  print('{:.0f}'.format(abs(max(a,b)-(abs(a-b)/2))))
else:
  print("IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

NO = "IMPOSSIBLE"  # type: str

def solve(A: int, B: int):
    if(abs((A-B)%2) == 0):
        print(min(A,B)+int(abs(A-B)/2))
    else:
        print(NO)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# a,b=map(int,input())
# n=int(input())
# n=input()
a,b=[int(s) for s in input().split()]
ans=(a+b)/2
if ans==int(ans):
    print(int(ans))
else:
    print('IMPOSSIBLE')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split())
ans = "IMPOSSIBLE"
mod = (a + b) % 2
if mod == 0 or a == b:
    print(int(abs((a+b))/2))
else:
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

q =int((a+b) %2)


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

mid = int((max(A, B) - min(A, B)) / 2)
ans = max(A, B) - mid
if abs(A - ans) == abs(B - ans):
    print(ans)
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

c = (a+b)%2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: UTF-8 -*-

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

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

else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

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

if A % 2 != B % 2:
    print("IMPOSSIBLE")

else:
    print(int((A + B) / 2))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#A問題
A,B = map(int,input().split())
wr = "IMPOSSIBLE"

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

num = (a+b)/2

if num == int(num):
  print(int(num))
else:
  print("IMPOSSIBLE")

Submission status: Accepted

Solution code:
# coding: utf-8
'''
#a, b = input().split() #(int(i) for i in input.split())
a, b = map(int, input().split())
print(a,b)
c1 = abs(a-b)//2;
c2 = abs(b-a)/2;
if c1==c2:
  	print(str(abs(c1)))

else:         
	print('IMPOSSIBLE')
'''
    
# coding: utf-8
a, b = map(int, input().split())
if abs(b - a) // 2 == abs(b - a) / 2:
    print(abs(max(a, b) - abs(b - a) // 2))
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! /usr/bin/env python3
# -*- coding:utf-8

FALSE_MESSAGE = "IMPOSSIBLE"

def harmony(a, b):
    if((a+b)%2): return FALSE_MESSAGE
    return int((a+b)/2)

def main():
    a, b = map(int, input().split())
    print(harmony(a, b))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if 0 <= a <= 10 ** 9 and 0 <= b <= 10 ** 9 and a != b:
    if 0 == (abs(a - b)) % 2:
        if a < b:
            k = (b - a) / 2 + a
            print(int(k))
        else:
            k = (a - b) / 2 + b
            print(int(k))
    else:
        print('IMPOSSIBLE')
else:
    print('Invalid value')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
# coding: utf-8
number = list(map(int,input().split()))
k = (number[0]+number[1])/2

if list(str(k))[-1] == "0":
    if number[0]<=k<=number[1] or number[1]<=k<=number[0]:
        print(int(k))
    else:
        print("IMPOSSIBLE")
else:
        print("IMPOSSIBLE")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
num = (A+B)//2
if (abs(A-num) == abs(B-num)):
    print(num)
else:
    print('IMPOSSIBLE')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def getlist():
	return list(map(int, input().split()))

A, B = getlist()
A, B = sorted([A, B])
if (B - A) % 2 == 0:
	print(int((A + B) // 2))
else:
	print("IMPOSSIBLE")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

# 演算子%は余りを出す　//は小数切り捨てて整数値を出す
if (a + b) % 2 == 0:
    print((a+b)//2)
else:
    print('IMPOSSIBLE')

Submission status: Accepted

Solution code:
c,d = map(int,input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

temp=list(map(int, input().split()))
temp=np.mean(temp)
if temp-int(temp)>0:
  output='IMPOSSIBLE'
else:
  output=int(temp)
  
print(output)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = (a+b)/2
check = (a+b)%2

if check == 0:
    print(int(ans))
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

Solution code:
input_data = input().split(" ")

a = int(input_data[0])
b = int(input_data[1])
# A - K = - (B - K) (A ! = B)
k = (a+b)/2
if k.is_integer():
  print(int(k))
else:
  print("IMPOSSIBLE")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

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

Submission status: Accepted

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

Submission status: Accepted

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

p = a+b

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [int(s) for s in input().split()]
p = (a[0] + a[1]) / 2
if p == int(p):
  print(int(p))
else:
  print("IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if (a+b) & 1 == 1:
    print('IMPOSSIBLE')
else:
    print((a+b)//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
K = (A**2 - B**2) / (2*(A-B))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

buf = a + b

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

Submission status: Accepted

Solution code:
from sys import stdin

a,b = map(int,stdin.readline().rstrip().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#A-Harmony
X=list(map(int, input().split()))
K=(X[0]+X[1])/2
if (X[0]+X[1])%2==0:
    print(int(K))
else:
    print("IMPOSSIBLE")