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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a,b=LI()

  if a%2!=b%2:
    return 'IMPOSSIBLE'
  return (a+b)//2

# main()
print(main())

Submission status: Accepted

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

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

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:
    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 isinstance(k, int):
  print(int(k))
elif isinstance(k, float) and k.is_integer():
  print(int(k))
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())
print((A+B)//2 if (A+B)%2 == 0 else 'IMPOSSIBLE')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC135A - Harmony
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==1:
    print("IMPOSSIBLE")
else:
    print(int((a+b)/2))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import math
a,b=map(int,input().split())
k=abs((a+b)/2)  
k1=math.trunc(k)
if (k-k1)==0 and k!=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:
x=eval(input().replace(' ','+'))
if x%2 == 0:
  print(x//2)
else:
  print('IMPOSSIBLE')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
s=list(map(int,input().split()))
a=int(s[0])
b=int(s[1])
c=(a+b)/2
if math.floor(c)<c<math.ceil(c):
  print('IMPOSSIBLE')
else:
  print(int(c))

Submission status: Accepted

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

length = max(a - b , b- a)

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

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

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

Submission status: Accepted

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


def solve(A: int, B: int):

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


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:
def main():
    a, b = map(int, open(0).read().split())

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

solve()

Submission status: Accepted

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

s = a+b

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

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

Submission status: Accepted

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

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

if k%2 == 1:
  print('IMPOSSIBLE')

Submission status: Accepted

Solution code:
A , B = map(int , input().split())
check = str((A + B) / 2 - (A + B) // 2)
#print(check)
if check[2] == "0":
    print(((A + B) // 2 ))
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

K = (L[0] + L[1]) 

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

Submission status: Accepted

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

Submission status: Accepted

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

if A%2 != 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())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a,b = map(int,input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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, sys.stdin.readline().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 = "IMPOSSIBLE"
if ((a+b)%2 == 0):
    ans = round((a+b)/2)
print(ans)

Submission status: Accepted

Solution code:
K=eval(input().replace(" ","+"))
print((K//2,"IMPOSSIBLE")[K%2])

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

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

# print(ans)

Submission status: Accepted

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

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:
    K = int((A+B)/2)
    print(K)
elif (A+B) % 2 == 1:
    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:
#135a
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*a - b*b)/(2*a-2*b)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
AB=input()
AB=AB.split(" ")
A=int(AB[0])
B=int(AB[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())
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 abs(A+B) % 2 == 0:
    print(abs(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:
temp = list(map(int, input().split()))

A = max(temp)
B = min(temp)

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

Submission status: Accepted

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

k=0
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()]

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

Submission status: Accepted

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

if a == b:
	print("1")

elif (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:
    ans = int((a + b) / 2)
    print(str(ans))

Submission status: Accepted

Solution code:
A,B = map(int, input().split())
k = (A + B) / 2
if (A + B) % 2 == 0:    
    if A - k > 0 and B - k < 0:
        #print('pat1')
        print(int(k))
    elif A - k < 0 and B - k > 0:
        #print('pat2')
        print(int(k))    
    else:
        print('IMPOSSIBLE')
else:
    print('IMPOSSIBLE')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import exit, stdin
A, B = [int(_) for _ in stdin.readline().rstrip().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())

x = (a + b)/2

if (a + b)%2 == 0 and abs(a - x) == abs(b - x):
    print(int(x))

else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N , K = map(int, input().split())
q,r = divmod(N+K,2)
if r==0:
  print(q)
else:
  print("IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
x = a + b
if x % 2:
    print('IMPOSSIBLE')
else:
    print(x // 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 math
a = list(map(int,input().split()))
a.sort()
if (a[1]-a[0])%2 == 0:
  print(math.ceil((a[1]-a[0])/2+a[0]))
else:
  print("IMPOSSIBLE")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
def kansu_return_flag(a,b):
    ans = 0
    flag = 0

    if abs(a-b)%2 != 0:
        flag = 0
    else:
        ans = (a+b)/2
        flag = 1
    return flag,ans

flag,ans = kansu_return_flag(a,b)

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

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

Submission status: Accepted

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


def main():
    a, b = map(int, input().split())
    # a^2 -2ak+k^2 = b^2-2bk+k^2
    # 2k(a-b) = a^2-b^2
    # 2k=a+b
    # k = a+b/2
    k = (a + b) / 2
    if k.is_integer():
        print(int(k))
    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("IMPOSSIBLE")
else:
  print((A+B)//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(): 

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

    d = (a+b) / 2

    s = (a+b) % 2

    if(s == 0):
        print(int(d))
    else:
        print('IMPOSSIBLE')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

d=a+b
if d%2 == 0:
    print(int(d/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:
N=input().split()
A=int(N[0])
B=int(N[1])
      
total=A+B
if total%2==0:
  center=int(total/2)
  print(center)
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((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())
wa = a + b
if wa % 2 == 0 :
    print(int(wa / 2))
else :
    print("IMPOSSIBLE")

Submission status: Accepted

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

if (A-B)%2==0:
  print(answer)
else :
  print('IMPOSSIBLE')

Submission status: Accepted

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

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

print(K)

Submission status: Accepted

Solution code:
import math

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

m = abs(pow(a,2) - pow(b,2))
n = abs(2 * (a - b))
ans = m / n
if ans - int(ans) == 0:
	print(int(ans))
else:
	print('IMPOSSIBLE')

Submission status: Accepted

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

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

Submission status: Accepted

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

K = int()

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


# Generated by 1.1.5 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())
print((a+b)//2 if a%2==b%2 else '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:

    
import sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	
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:
def harmony(a,b):
    if b < a:
        a,b = b,a    
    c = b-a
    if c % 2 == 0:
        return int(a + c/2)
    else:
        return 'IMPOSSIBLE'
A, B = map(int,input().split())
print(harmony(A,B))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while True:
    try:
        A, B = map(int, input().split())
        if abs(A-B) % 2 == 0:
            K = min(A, B) + abs(A-B) // 2
            print(K)
        else:
            print("IMPOSSIBLE")
    except:
        break

Submission status: Accepted

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

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

Submission status: Accepted

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

a = abs(a)
b = abs(b)

c = a + b

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

ans = (A + B) /2

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

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().split())
print('IMPOSSIBLE' if A%2 != B%2 else min(A, B) + abs(B-A) // 2)

Submission status: Accepted

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

K = int((A+B)/2)
K_remaindar = (A+B)%2

if K_remaindar != 0 :
        print("IMPOSSIBLE")
else :
        print(K)

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
Q=(A+B)/2
if Q.is_integer():
    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:
#Coding:Utf-8

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

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

Submission status: Accepted

Solution code:
# -*- coding:utf8 -*-

l = sorted(list(map(int,input().split())))
a, b = l[0], l[1]
ans = int(a + ((b - a) / 2)) if (b - a) % 2 == 0 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())
print('IMPOSSIBLE' if (a+b)%2 else (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:
from sys import exit, stderr, stdin
input = stdin.readline
# setrecursionlimit(10**7)

def debug(var, name="hoge"):
    print(name +":" + str(type(var)) + " = " + repr(var), file=stderr)
    return


def main():
    A, B = [int(n) for n in input().split()]

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



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    A_B = list(map(int, input().split()))
    if sum(A_B) % 2 == 0:
        print(sum(A_B) // 2)
    else:
        print('IMPOSSIBLE')

Submission status: Accepted

Solution code:
A, B = [int(i) for i in input().split()]
X = abs((A+B)/2)
if X == int(X):
    ans = int(X)
else:
    ans = "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:
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:
  K = int((A + B) / 2)
else:
  K = 'IMPOSSIBLE'

print(K)

Submission status: Accepted

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

k = a+ b

if k % 2 == 0:
    ans = k // 2
else:
    ans = "IMPOSSIBLE"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
 
a, b = [int(x) for x in stdin.readline().rstrip().split()]

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