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

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

Submission status: Accepted

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

Submission status: Accepted

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

if((s[0]-s[1])%2 == 1):
  print("IMPOSSIBLE")
  exit()

if(s[0]==s[1]):
  print(0)
  exit()

if(s[0]<s[1]):
  print(int(s[0]+(s[1]-s[0])/2))
else:
  print(int(s[1]+(s[0]-s[1])/2))

Submission status: Accepted

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

up = (A**2-B**2)
down = (2 * ( A-B ))

if up % down == 0:
	print(int(up/down))
else:
	print("IMPOSSIBLE")

Submission status: Accepted

Solution code:
tmp = input()
fi = int(tmp.split(" ")[0])
se = int(tmp.split(" ")[1])
k = int(abs(fi + se)/2)
mod = abs(fi + se) % 2
if mod == 1:
  print("IMPOSSIBLE")
else:
  print(k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力

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

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

else:
	K = (A+B)//2
	print(K)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = (int(i) for i in 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 (max(a,b) - min(a, b)) % 2 == 1:
    print("IMPOSSIBLE")
else:
    print(min(a,b)+ (max(a,b) - min(a, b))//2)

Submission status: Accepted

Solution code:
import sys

i = list(map(int, input().split()))

k = (i[0] + i[1]) / 2

print(int(k), end="") if int(k) == k else print("IMPOSSIBLE", end="")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

mid2 = a + b

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

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=list(map(int,input().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=input().split()
num1=int(a[0])
num2=int(a[1])
k=(num1+num2)/int(2)
if  (num1+num2)%int(2)!=0:
    print("IMPOSSIBLE")
if (num1+num2)%int(2)==0:
    print(int(k))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = list(map(int, input().split()))
max_num = max(N)

if N[0]%2 != N[1]%2:
  print("IMPOSSIBLE")
else:
  print(int((N[0] + N[1])/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

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

if (a+b)%2 == 1:
  print("IMPOSSIBLE")
  sys.exit(0)

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

Submission status: Accepted

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

Submission status: Accepted

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

k = a + b

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

else:
    print('IMPOSSIBLE')

Submission status: Accepted

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

ave = abs(x + y) / 2

if int((ave - int(ave)) * 10) == 0:
  print(int(ave))
  exit()
print("IMPOSSIBLE")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
a,b=map(int,input().split())
k = (a+b)/2
if k == int(k):
    print(int(k))
else:
    print('IMPOSSIBLE')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
Tmp = []
Tmp = input().rstrip().split(' ')
 
nA = int(Tmp[0])
nB = int(Tmp[1])
 
nAns = nA + nB
 
nTmp = nAns % 2
 
if nTmp == 1:
  print("IMPOSSIBLE")
else:
  nAns /= 2
  print("%d" %(nAns))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if mod ==  0:
    print(q)
else:
    print("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=list(map(int,input().split()))
print(int(sum(a)/2) if int(sum(a)/2)==sum(a)/2 else "IMPOSSIBLE")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
t=eval(input().replace(" ","+"));print(t//2 if t%2^1 else "IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
 
K=(A+B)/2
 
def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False
 
if is_integer_num(K)==False:
  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:
#!/usr/bin/env python3
import sys

a,b = list(map(int,input().split()))
if (a + b) % 2:
	print('IMPOSSIBLE')
	sys.exit()
print((a+b)//2)

Submission status: Accepted

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

Submission status: Accepted

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

# AとBの偶奇が一致する場合 存在する
# AとBの偶奇が一致しない場合 存在しない

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

Submission status: Accepted

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

if(N+Y)%2 == 0 :
	print((N+Y)//2)
else:
	print("IMPOSSIBLE")

Submission status: Accepted

Solution code:
inp = input().split()
a = int ( inp[0] )
b = int ( inp[1] )

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
A = np.arange(1<<27,dtype=np.int32)


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

Submission status: Accepted

Solution code:
import numpy as np
A = np.zeros(1<<27,dtype=np.int32)


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(num) for num in input().split()]
Ave = (A + B) / 2
if Ave % 1 == 0:
    print(int(Ave))
else:
    print("IMPOSSIBLE")

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())
c = a + b
if c % 2 == 0:
    print(c//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 abs(A-B)%2==0:
  tmp = abs(A-B)//2
  li = [abs(A+tmp),abs(A-tmp),abs(B+tmp),abs(B-tmp)]
  li.sort()
  for i in range(3):
    if li[i]==li[i+1]:
      print(li[i])
else:
  print("IMPOSSIBLE")

Submission status: Accepted

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

diff = abs(A - B)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = (int(i) for i in 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())
m=(a+b)//2
if m==(a+b)/2:
    print(m)
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

N, M = map(int, input().split())

if (N + M) % 2 == 0:
    print((N + M) // 2)
else:
    print("IMPOSSIBLE")

Submission status: Accepted

Solution code:
# -.- coding:utf8 -.-

hl = [int(i) for i in input().split()]
center = hl[0]+hl[1]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

import sys
import copy

sys.setrecursionlimit(1000000)

input = sys.stdin.readline
from collections import defaultdict

# ~~~~~~~~~~~~~~~~~~~~~_(＾～＾ ｣ ∠)_~~~~~~~~~~~~~~~~~~~~~

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if ((a%2 == 1)and(b%2==1)):
    c = (a+b)/2
    print(int(c))

elif ((a%2==0)and(b%2==0)):
    c =(a+b)/2
    print(int(c))

else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# a - harmony

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

Submission status: Accepted

Solution code:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/

import math
import statistics

# fact(int)
def fact(n):
  if(n == 1):
    return 1
  else:
    return (n * fact(n - 1))

# gcd(int,int)
def gcd(a,b):
  if a == 0:
    return b
  elif b == 0:
    return a
  else:
    return gcd(b,a % b)

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

# qsort(array[])
def qsort(seq):
  if len(seq) < 1:
      return seq
  pivot = seq[0]
  left = []
  right = []
  for x in range(1, len(seq)):
    if seq[x] <= pivot:
        left.append(seq[x])
    else:
        right.append(seq[x])
  left = qsort(left)
  right = qsort(right)
  foo = [pivot]
  return (left + foo + right)

a,b = map(int, input().split())
#  = int(input())
#  = raw_input().split()
#  = list(int(i) for i in input().split())  

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

Submission status: Accepted

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

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

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%2!=b%2:
    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:
    print(0)
else:
    if (A+B)%2 == 0:
        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:
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=(int(x) for x in input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
K=(A+B)/2
k=int(K)
print([k,"IMPOSSIBLE"][k!=K])

Submission status: Accepted

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

if X%2==1:
  print("IMPOSSIBLE")
else:
  print(str(X//2).strip("-"))

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=sum(map(int,input().split()));print(a%2*'IMPOSSIBLE'or a//2)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 29 01:57:09 2019

@author: matsui
"""


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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
  a,b = (int(i) for i in input().split())
  if (b-a)%2 != 0:
    print('IMPOSSIBLE')
  else:
    tmp = (b-a)//2
    print(b-tmp)
  
solve()

Submission status: Accepted

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

n = (A + B) / 2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 整数の入力
A, B = map(int, input().split())

# 整数Kの存在判定と出力
if (A + B) % 2 == 0:
  K = int((A + B) / 2)
  print("{}".format(K))

else:
  print("IMPOSSIBLE")

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main36():
    data = input().split()
    num = []
    for i in range(2):
        num.append(int(data[i]))
    if int(abs(num[0]-num[1])) % 2 == 1:
        print("IMPOSSIBLE")
        return
    result = int(abs(num[0] + num[1]) / 2)
    print(result)
 
if __name__ == "__main__":
    main36()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if abs(abs(a) + abs(b))%2 == 0:
    print(abs(abs(a) + abs(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:
List = list(map(int,input().split())) 
List.sort()
K = List[1]-List[0]
if (K%2==0):
  print(List[0]+(K//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:
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**2-b**2)%(2*(a-b))==0:
    print((a**2-b**2)//(2*(a-b)))
else:
    print("IMPOSSIBLE")

Submission status: Accepted

Solution code:
N = list(map(int, input().split()))
A = max(N) + min(N)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

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 = "IMPOSSIBLE"

if A == B:
    ans = 0
elif abs(A + B) % 2 == 0:
    ans = abs(A + B) // 2

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

mid = (a+b)/2

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

Submission status: Accepted

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