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:
#!/usr/bin/env python3
import sys

NO = "IMPOSSIBLE"  # type: str

def solve(A: int, B: int):
    if (A + B) % 2 == 0:
        print(int((A + B) / 2))
        return
    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 = map(int, input().split())
K = int((A + B) / 2)
K_float = (A + B) / 2

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

Submission status: Accepted

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

print (k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import glob


# 問題ごとのディレクトリのトップからの相対パス
REL_PATH = 'ABC\\135\\A'

# テスト用ファイル置き場のトップ
TOP_PATH = 'C:\\AtCoder'

class Common:

    problem = []
    index = 0

    def __init__(self, rel_path):
        self.rel_path = rel_path

    def initialize(self, path):
        file = open(path)
        self.problem = file.readlines()
        self.index = 0
        return

    def input_data(self):
        try:
            IS_TEST
            self.index += 1
            return self.problem[self.index-1]

        except NameError:
            return input()

    def resolve(self):
        pass

    def exec_resolve(self):
        try:
            IS_TEST
            for path in glob.glob(TOP_PATH + '\\' + self.rel_path + '/*.txt'):
                print("Test: " + path)
                self.initialize(path)
                self.resolve()
                print("\n\n")
        except NameError:
            self.resolve()


class A(Common):

    def resolve(self):

        tmp = [int(i) for i in self.input_data().split()]
        A = tmp[0]
        B = tmp[1]

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


solver = A(REL_PATH)
solver.exec_resolve()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

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((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:
def A_Harmony():
    A, B = map(int, input().split())
    result = A+B
    if result % 2:
        result = "IMPOSSIBLE"
    else:
        result //= 2
    print(result)
    
if __name__ == "__main__":
    A_Harmony()

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:
# -*- coding: utf-8 -*-

a_b_list = list(map(int,input().split()))
a = a_b_list[0]
b = a_b_list[1]

k = (a + b) / 2
l = (a + b) % 2

if l == 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 == 1:
    print('IMPOSSIBLE')
else:
    print(int((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:
A,B=map(int,input().split())

temp =( A + B)//2

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

Submission status: Accepted

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

b = a[0] + a[1]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

A, B = map(int, input().split())
K = [0]*4
K[0] = (A+B)/2
K[1] = (A-B)/2
K[2] = -(A+B)/2
K[3] = -(A-B)/2

for i in K:
    if abs(A-i) == abs(B-i):
        if int(i) == i:
            print(int(i))
            sys.exit()

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

Submission status: Accepted

Solution code:
a, b =map(int, input().split())
#A^2 -2AK-K^2=B^2 -2BK -K^2
#A^2-B^2=2(A-B)K
#(A+B)/2=K

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

Submission status: Accepted

Solution code:
a, b =map(int, input().split())
#A^2 -2AK-K^2=B^2 -2BK -K^2
#A^2-B^2=2(A-B)K

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

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    p_a()

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 = (A+B)//2
if abs(A-K) == abs(B-K):
  print(K)  
else:
  K,m = (max(A,B)-min(A,B))//2,(max(A,B)-min(A,B))%2
  if abs(A-K) == abs(B-K) and m == 0:
    print(K)
  else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = [int(i) for i in input().split()]
k = (num[0] + num[1]) / 2
if k > int(k):
  print('IMPOSSIBLE')
else:
  print(int(k))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#入力
A = input().split()

#A,B ＝　数値化　M,m　＝　初期化
A[0] = int(A[0])
A[1] = int(A[1])
m = 0

#K探し
m = ( A[0] + A[1] ) / 2

#K判定
if m.is_integer():
    print( '%d' %m)
else :
    print('IMPOSSIBLE')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import itertools

def getint(): return int(input())
def getints(): return list(map(int, input().split()))

a,b=list(sorted(getints()))


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

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

Submission status: Accepted

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


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


if __name__ == "__main__":
    test()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if(a==b or (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:
    tmp = A
    A = B
    B = tmp

if (B-A)%2 == 0:
    print(B-(B-A)//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:
ab = input()
a = int(ab.split(' ')[0])
b = int(ab.split(' ')[1])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions;

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

ave = (a + b) // 2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Aug  9 22:36:19 2019

@author: kohei
"""

N = input()

A = int(N.split()[0])
B = int(N.split()[1])

if A==B:
    print('IMPOSSIBLE')

else:
    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=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 abs(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())
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())
dif = abs(A - B)
print(min(A, B) + dif//2 if dif%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 = map(int,input().split(" "))
x = (A + B)
if x % 2 == 0:
    print(x // 2)
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
b = a[0] + a[1]
if b%2 == 0:
  print(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:
"""
# 標準入力取得
## 文字列
     = sys.stdin.readline().rstrip()
     = list(sys.stdin.readline().rstrip())

## 数値
     = int(sys.stdin.readline())
     = map(int, sys.stdin.readline().split())
     = list(map(int, sys.stdin.readline().split()))
     = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
     A, B = map(int, sys.stdin.readline().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 = int((a+b)/2)
if a%2 ==b%2:
  print(c)
else:
  print('IMPOSSIBLE')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = (a+b)/2

if ans%1==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:
List = list(map(int,input().split()))

A = List[0]
B = List[1]

Flag = False
if (A + B) % 2 == 0:
    K = int((A + B)/2)
    Flag = True

if Flag == True:
    print(K)
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input().split()
a = int(n.pop(0))
b = int(n.pop(0))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:


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

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

Submission status: Accepted

Solution code:
def solve(string):
    a, b = map(int, string.split())
    return str(abs(a + b) // 2) if ((a + b) / 2).is_integer() else "IMPOSSIBLE"


if __name__ == '__main__':
    print(solve(input()))

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

Submission status: Accepted

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

if B < A:
    A, B = B, A

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

if int(K)==K:
    output=int(K)
else :
    output="IMPOSSIBLE"
    
print(output)

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

# (a-k)2 = (b-k)2
# a2 -2ak +k2 = b2 -2bk +k2
# a2 -2ak = b2 -2bk
# a2-b2 = 2ak-2bk
# (a+b)(a-b)=2(a-b)k
# (a+b)=2k

if ((A + B) % 2) == 1:
	print("IMPOSSIBLE")
	exit(0)

K = (A + B)//2

print(K)

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(i) for i in 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 k == int(k):
    print(int(k))
else:
    print("IMPOSSIBLE")

Submission status: Accepted

Solution code:
import sys
from collections import deque
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:
    print("IMPOSSIBLE")
else:
    print(int(abs(A+B)/2))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

k2 = a+b
if k2 % 2 != 0:
    print("IMPOSSIBLE")
else:
    print(k2//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(i) for i in input().split()]

n = A + B
if n % 2 == 0:
    ans = n // 2
else:
    ans = 'IMPOSSIBLE'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = sum(list(map(int, input().split())))/2
if k % 1:
    print('IMPOSSIBLE')
    exit()
print(int(k))

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

Submission status: Accepted

Solution code:
def solve():
    a, b = map(int, input().split())
    if a == b:
        return a
    elif abs(a - b) % 2 == 0:
        return int(min(a, b) + (max(a, b) - min(a, b)) / 2)
    else:
        return "IMPOSSIBLE"


if __name__ == "__main__":
    print(solve())

Submission status: Accepted

Solution code:
"""
- https://atcoder.jp/contests/abc136/tasks/abc135_a
- |A−K|=|B−K| (others:IMPOSSIBLE)
- reg: 0≤A, B≤10^9
"""

a, b = map(int, input().split())
# 三項演算子
k = int ((a+b)/2) if (a+b) % 2 == 0 else '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=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:
input1 = input()
 
num = input1.split()
 
num1 = int(num[0])
num2 = int(num[1])
 
total = num1 + num2
 
if total%2 != 0:
	print('IMPOSSIBLE')
else:
	print(int(total/2))

Submission status: Accepted

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

Submission status: Accepted

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

inputAB = input().split()

inputA = int(inputAB[0])
inputB = int(inputAB[1])

# print(inputA, inputB)

if inputA > inputB:
    largeNum = inputA
    smallNum = inputB
else:
    largeNum = inputB
    smallNum = inputA

# print(largeNum, smallNum)

if ((largeNum - smallNum) % 2) == 1:
    print("IMPOSSIBLE")
else:
    answer = smallNum + int((largeNum - smallNum) / 2)
    print(answer)

Submission status: Accepted

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

inputAB = [int(e) for e in input().split()]

inputA = int(inputAB[0])
inputB = int(inputAB[1])

# print(inputA, inputB)

if inputA > inputB:
    largeNum = inputA
    smallNum = inputB
else:
    largeNum = inputB
    smallNum = inputA

# print(largeNum, smallNum)

if ((largeNum - smallNum) % 2) == 1:
    print("IMPOSSIBLE")
else:
    answer = smallNum + int((largeNum - smallNum) / 2)
    print(answer)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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,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())
if a%2!=b%2:
    print("IMPOSSIBLE")
else:
    print((a+b)//2)

Submission status: Accepted

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

# get two integers separated with half-width break
b, c = map(int, raw_input().split())
# get a string
if (b+c)%2 ==0:
  print((b+c)/2)
else:
  print('IMPOSSIBLE')

Submission status: Accepted

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

n1 = sum(n)%2
n2 = sum(n)/2

if(n1 == 0):
 print(round(n2))
else:
 print("IMPOSSIBLE")

Submission status: Accepted

Solution code:
a,b=map(int,input().split());p=abs(a-b);print(abs(max(a,b)-p//2) if p%2==0 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:
# -*- coding: utf-8 -*-


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

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

Submission status: Accepted

Solution code:

def main():
    a,b = input().split(' ')
    a = int(a)
    b = int(b)
    c = (a + b)/2
    if int(c%1*10) >0:
        print("IMPOSSIBLE")
    else:
        print(int(c))
        
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

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