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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

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
# Your code here!
A,B=map(int,input().split())

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

Submission status: Accepted

Solution code:
# 2019-11-15 14:37:47(JST)
import sys
# import collections
import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# from scipy.misc import comb # float
# import numpy as np 

def main():
    a, b = [int(x) for x in sys.stdin.readline().split()]
    if abs(a) == abs(b):
        ans = 0
    else:
        ans = (a + b) / 2
    
    print(int(ans) if ans == math.floor(ans) else 'IMPOSSIBLE')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

# %%
if __name__ == '__main__':
    main()

# %%
# from atcoder_test import doTest
# doTest("abc135","a",main)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def print_ans(A, B):
    """Test Case
    >>> print_ans(2, 16)
    9
    >>> print_ans(0, 3)
    IMPOSSIBLE
    >>> print_ans(998244353, 99824435)
    549034394
    """
    if (A + B) % 2 == 0:
        print((A + B) // 2)
    else:
        print("IMPOSSIBLE")

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

Submission status: Accepted

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

print(K)

Submission status: Accepted

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

w = ( A + B )

if w % 2 == 0:
    print(int( w / 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 = (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:
i = list(map(int, input().split()))
if (i[0] - i[1]) % 2 == 0:
  print(min(i[0],i[1]) + abs(i[0] - i[1]) // 2)
else:
  print("IMPOSSIBLE")

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


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


def ceil(a, b):
    return (a + b - 1) // b


# 初項s, 交差dのn個の数列の和
def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


# aとbの最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


# aとbの最小公倍数
def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
if (n-m)%2==0:
  print(min(n,m)+abs(n-m)//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 = map(int, input().split())
K = (A + B) / 2
L = (A + B) // 2
if K.is_integer():
  print(L)
else:
  print('IMPOSSIBLE')

Submission status: Accepted

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

k = (a+b)/2

#kが整数か調べる場合
#print(k.is_integer())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b  = map(int,input().split())
print('IMPOSSIBLE' if (a+b)%2 else abs((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:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    a,b=map(int,input().split())
    if((a+b)%2):
        print("IMPOSSIBLE")
    else:
        print((a+b)//2)
resolve()

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:
    print(int((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:
# ABC 135: A – Harmony
a, b = [int(s) for s in 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==1:
    print('IMPOSSIBLE')
else:
    print(int((a+b)/2))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!


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

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

Submission status: Accepted

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

else:
  print("IMPOSSIBLE")

Submission status: Accepted

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

NO = "IMPOSSIBLE"  # type: str


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


# Generated by 1.1.6 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 = 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())

# A**2 - 2AK + K**2 = B**2 - 2BK + K**2
# 2(B - A)K = B**2 - A**2
# K = (A + B) / 2

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 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(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())
k=(a+b)/2

if k%1==0:
  print(int(k))

else:
  print('IMPOSSIBLE')

Submission status: Accepted

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

k = int((ab[0] + ab[1]) /2)

if abs(ab[0] - k) == (abs(ab[1] - k)):
    print(int(k))
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

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
if K == int(K):
  print(int(K))
else:
  print('IMPOSSIBLE')

Submission status: Accepted

Solution code:
import unittest


class TestA(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(2, 16), '9')

    def test_2(self):
        self.assertEqual(think(0, 3), 'IMPOSSIBLE')

    def test_3(self):
        self.assertEqual(think(998244353, 99824435), '549034394')


def solve():
    a, b = read()
    result = think(a, b)
    write(result)


def read():
    return read_int(2)


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_float(n):
    return list(map(lambda x: float(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a, b):
    if abs(a - b) % 2 == 0:
        return str(min(a, b) + abs(a - b) // 2)
    return 'IMPOSSIBLE'


def write(result):
    print(result)


if __name__ == '__main__':
    # unittest.main()
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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:
# ABC135A - Harmony
def main():
    A, B = map(int, input().split())
    flg = (A + B) % 2 == 0
    print((A + B) // 2 if flg else "IMPOSSIBLE")


if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

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:
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):
    a,b = b,a

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

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
"""#失敗
answer = (A + B) // 2# //で切り捨て除算
print(answer)
if A + B % 2 == 0:
    print(A+B/2)
else:
    print("IMPOSSIBLE")
"""

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

Submission status: Accepted

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

0<=A
B<=10**9

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

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:
num = [int(e) for e in input().split()]

a = num[0]
b = num[1]

K =int((a+b)/2)


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

if (A+B)%2 == 0:
    result = str((A + B) // 2)
else:
    result =  '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:
a, b = map(int, input().split())
n = (a + b)/2
if n == int(n):
    print(int(n))
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()]

if (A-B)%2 == 0:
    print(int(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(c)

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

x = max(a,b)
y = min(a,b)
ans = x - ((x - y)*0.5)

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    a, b = [int(x) for x in input().split()]
    if (a+b)%2 == 0:
        k = int((a+b)/2)
        if (a<k and k<b) or (b<k and k<a):
            print(k)
    else:
        print('IMPOSSIBLE')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
K = (A**2 - B**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:
  k = (A + B) // 2
  print(k)
  exit()
else:
  print('IMPOSSIBLE')
  exit()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B = list(map(int,input().split()))
a = abs(A+B) % 2
if a == 1:
  print("IMPOSSIBLE")
else:
  print(int(abs(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:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

q,r = divmod(A+B,2)

if r == 1:
    print('IMPOSSIBLE')
else:
    print(q)

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
A=a[0]
B=a[1]
if ((A+B)/2).is_integer():
    print('{:.0f}'.format((A+B)/2))
else:
    print('IMPOSSIBLE')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
g=raw_input().split()
a=int(g[0])
b=int(g[1])
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 == 1:
	print("IMPOSSIBLE")
else:
	print(int((A+B)/2))

Submission status: Accepted

Solution code:

def main():
    A, B = [int(x) for x in 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("IMPOSSIBLE")
else:
  print((a+b)//2)

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

Submission status: Accepted

Solution code:
#1行に入力が複数の場合
a, b = map(int, input().split())

#絶対値が等しい＝距離が等しいと考える（なんかSさんに怒られそうな表現ww）
#a-bから距離が等しいということはa-b間にKがあるのは自明
#a-bの外側にKは存在しない
#また、そのような値は2点の中点であることは自明

#ただし、制約でKは整数なので中点が整数にならない場合
#条件を満たすKは存在しない

#a-bの中点が2で割り切れる=中点が整数である場合
if (a + b) % 2 == 0:
    #2点の中点を出力
    print((a + b) // 2)
#整数となるKが存在しない場合
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

N = int((B + A) / 2)

if abs(A - N) == abs(N - B):
    print(N)
    exit()

print("IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=[int(x) for x in 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).is_integer():
  print((a+b)//2)
  exit()
print("IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

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

if((A+B) % 2 == 0):
    print(int(ans))
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())
c=a+b
if c%2==0:
    print(c//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(min(A, B) + abs(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())
print(int((a+b)/2) if (a+b)/2%1==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 == 0:
    print(int((a+b)/2))
else:
    print('IMPOSSIBLE')

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B = tuple(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())
ab = a + b
if ab % 2 == 0:
    print(ab//2)
else:
    print('IMPOSSIBLE')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if (max(a, b) - min(a, b)) % 2 == 0:
  print(((max(a, b) - min(a, b)) // 2) + min(a, b))
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:
def slove():
    import sys
    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip('\n').split()))
    print((a + b) // 2 if (a + b) % 2 == 0 else "IMPOSSIBLE")


if __name__ == '__main__':
    slove()