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:
A, B = map(int, input().split())

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

Submission status: Accepted

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

k = abs(b + a) // 2

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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=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:
"""
author : halo2halo
date : 10, Jan, 2020
"""

import sys

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

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

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

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

Submission status: Accepted

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

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:
def main():
    import sys
    input = sys.stdin.readline

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


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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('IMPOSSIBLE')
else:
    print((A + B) // 2)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if a>b: # make a<b
    a,b=b,a

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
sum = A + B
if sum%2==0:
  print(sum//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())

K = (A + B) / 2

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

 
if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
x=(a+b)/2
if x.is_integer()==1:print(int(x))
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==0:
    print((A+B)//2)
else:
    print('IMPOSSIBLE')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 = map(int,input().split())
if a%2 != b%2 :
    print("IMPOSSIBLE")
else:
    x = (a+b)/2
    print(int(abs(x)))

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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:
import sys

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

k = ( a + b )

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

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:
a,b = (int(i) for i in input().split())
s = abs(a-b)
if s%2 == 1:
  print("IMPOSSIBLE")
else:
  print(max(a,b)-s//2)

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

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

Submission status: Accepted

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

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

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:
# abc 135
import math
input_list = list(map(int,input().split()))
a = input_list[0]
b = input_list[1]
x = (a+b)/2

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

else:
    print("IMPOSSIBLE")

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
if (a+b)%2==0:
    print(str((a+b)//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(K)
else:
    print('IMPOSSIBLE')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = list(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())

k = (a+b)/2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = [int(x) for x in 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())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

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


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

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

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

K_before = (A+B)

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

Submission status: Accepted

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

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 = (int(x) for x in input().split())
K = (A + B) / 2
if A == B:
  print(0)
else:
  if K.is_integer():
    print(int(K))
  else:
    print('IMPOSSIBLE')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

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:
def main():
    a, b = [int(ip) for ip in input().split()]

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

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



if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
K = abs(A+B)/2
if K % 1 == 0:
	print(int(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:
# -*- coding: utf-8 -*-
import math
import datetime

# 入力
#N = int(input())
#S = str(input())
#N, A, B = map(int, input().split())
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 (b-a)%2 == 1:
  print('IMPOSSIBLE')
else:
  print((b+a)//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=(int(x) for x in input().split())

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

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

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())
print([(a+b)//2,'IMPOSSIBLE'][(a+b)%2])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))
if A == B:
    print(1)
elif (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 == 1:
  print('IMPOSSIBLE')
else:
  print((A+B)//2)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

    k = (a + b)/2

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

if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

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,raw_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, raw_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((A + B) // 2) if (A + B) % 2 == 0 else print('IMPOSSIBLE')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import heapq
import sys
from collections import Counter
import numpy as np

#N,K=map(int, input[0].split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
#x=list(map(int, input[1].split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき
#s = [input() for i in range(3)]

A,B=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき


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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
A, B = [int(x) for x in 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())

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

Submission status: Accepted

Solution code:
ab = list(map(int, input().split()))
a = ab[0]
b = ab[1]

ans = "IMPOSSIBLE"

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 0

total = a + b

if total % 2 == 1:
  print('IMPOSSIBLE')
  sys.exit()

ans = total // 2

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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