Language: C++

from bisect import bisect_left, bisect_right; from collections import Counter, defaultdict, deque, OrderedDict; from copy import deepcopy; from fractions import gcd; from functools import lru_cache, reduce; from math import ceil, floor; from sys import stdin, setrecursionlimit
import heapq as hq; import itertools as its; import operator as op


# globals
inf = float('inf')
input = stdin.readline


def main():
    a, b = get_li()
    if abs(a - b) % 2 == 0:
        print((a + b) // 2)
    else:
        print('IMPOSSIBLE')
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def gets(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input().strip()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().strip().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    setrecursionlimit(4100000)
    main()


Compiler output:
a.cc:5:3: error: invalid preprocessing directive #globals
    5 | # globals
      |   ^~~~~~~
a.cc:6:13: warning: multi-character character constant [-Wmultichar]
    6 | inf = float('inf')
      |             ^~~~~
a.cc:15:15: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   15 |         print('IMPOSSIBLE')
      |               ^~~~~~~~~~~~
a.cc:52:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   52 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from bisect import bisect_left, bisect_right; from collections import Counter, defaultdict, deque, OrderedDict; from copy import deepcopy; from fractions import gcd; from functools import lru_cache, reduce; from math import ceil, floor; from sys import stdin, setrecursionlimit
      | ^~~~
a.cc:1:47: error: 'from' does not name a type
    1 | from bisect import bisect_left, bisect_right; from collections import Counter, defaultdict, deque, OrderedDict; from copy import deepcopy; from fractions import gcd; from functools import lru_cache, reduce; from math import ceil, floor; from sys import stdin, setrecursionlimit
      |                                               ^~~~
a.cc:1:113: error: 'from' does not name a type
    1 | from bisect import bisect_left, bisect_right; from collections import Counter, defaultdict, deque, OrderedDict; from copy import deepcopy; from fractions import gcd; from functools import lru_cache, reduce; from math import ceil, floor; from sys import stdin, setrecursionlimit
      |                                                                                                                 ^~~~
a.cc:1:140: error: 'from' does not name a type
    1 | from bisect import bisect_left, bisect_right; from collections import Counter, defaultdict, deque, OrderedDict; from copy import deepcopy; from fractions import gcd; from functools import lru_cache, reduce; from math import ceil, floor; from sys import stdin, setrecursionlimit
      |                                                                                                                                            ^~~~
a.cc:1:167: error: 'from' does not name a type
    1 | from bisect import bisect_left, bisect_right; from collections import Counter, defaultdict, deque, OrderedDict; from copy import deepcopy; from fractions import gcd; from functools import lru_cache, reduce; from math import ceil, floor; from sys import stdin, setrecursionlimit
      |                                                                                                                                                                       ^~~~
a.cc:1:208: error: 'from' does not name a type
    1 | from bisect import bisect_left, bisect_right; from collections import Counter, defaultdict, deque, OrderedDict; from copy import deepcopy; from fractions import gcd; from functools import lru_cache, reduce; from math import ceil, floor; from sys import stdin, setrecursionlimit
      |                                                                                                                                                                                                                ^~~~
a.cc:1:238: error: 'from' does not name a type
    1 | from bisect import bisect_left, bisect_right; from collections import Counter, defaultdict, deque, OrderedDict; from copy import deepcopy; from fractions import gcd; from functools import lru_cache, reduce; from math import ceil, floor; from sys import stdin, setrecursionlimit
      |                                                                                                                                                                                                                                              ^~~~
a.cc:2:21: error: 'import' does not name a type
    2 | import heapq as hq; import itertools as its; import operator as op
      |                     ^~~~~~
a.cc:2:21: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:46: error: 'import' does not name a type
    2 | import heapq as hq; import itertools as its; import operator as op
      |                                              ^~~~~~
a.cc:2:46: note: C++20 'import' only available with '-fmodules-ts'