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

Solution in C# (Mono 4.6.2.0) (judge verdict: Wrong Answer)

using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using static System.Math;

//#if true
#if false
#define UTAKA_DEBUG
#endif

namespace UtakaApp
{
    public class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine(9.ToString());
            
#if UTAKA_LOCAL
            var testCaseChecker = new TestCaseChecker();
            testCaseChecker.TestProblems();
#else
            var answer = new Program().Solve(Console.In);
            Console.Write(answer);
#endif
        }

        public string Solve(TextReader textReader)
        {
            var cin = new ConsoleInput(textReader);

            var sb = new StringBuilder();

            sb.AppendLine(9.ToString());

            return sb.ToString();
        }
    }

    public class ConsoleInput
    {
        private readonly TextReader _stream;
        private char _separator = ' ';
        private Queue<string> inputStream;

        public ConsoleInput(TextReader stream, char separator = ' ')
        {
            this._separator = separator;
            this._stream = stream;
            inputStream = new Queue<string>();
        }

        public string Read
        {
            get
            {
                if (inputStream.Count != 0) return inputStream.Dequeue();
                string[] tmp = _stream.ReadLine().Split(_separator);
                for (int i = 0; i < tmp.Length; ++i)
                {
                    inputStream.Enqueue(tmp[i]);
                }

                return inputStream.Dequeue();
            }
        }

        public string ReadLine => _stream.ReadLine();
        public int ReadInt => int.Parse(Read);
        public long ReadLong => long.Parse(Read);
        public double ReadDouble => double.Parse(Read);

        public string[] ReadStrArray(long N)
        {
            var ret = new string[N];
            for (long i = 0; i < N; ++i) ret[i] = Read;
            return ret;
        }

        public int[] ReadIntArray(long N)
        {
            var ret = new int[N];
            for (long i = 0; i < N; ++i) ret[i] = ReadInt;
            return ret;
        }

        public long[] ReadLongArray(long N)
        {
            var ret = new long[N];
            for (long i = 0; i < N; ++i) ret[i] = ReadLong;
            return ret;
        }
    }

#if UTAKA_LOCAL

    public class TestCaseChecker
    {
        private const string ContestName = "abc135";
        private const string ProblemName = "A";
        private string DirectoryPath => $"../../../../{ContestName}/{ProblemName}";

        private string GetInputFilePath(int testCaseNumber)
        {
            return $"{DirectoryPath}/in_{testCaseNumber}.txt";
        }

        private string GetOutputFilePath(int testCaseNumber)
        {
            return $"{DirectoryPath}/out_{testCaseNumber}.txt";
        }

        public bool TestProblem(int testCaseNumber)
        {
            var inputFilePath = GetInputFilePath(testCaseNumber);
            var outputFilePath = GetOutputFilePath(testCaseNumber);

            TextReader inputStream = new StreamReader(inputFilePath);

            string output = null;
            try
            {
                output = new Program().Solve(inputStream);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }

            TextReader outputStream = new StreamReader(outputFilePath);
            var outputAnswer = outputStream.ReadToEnd();

#if UTAKA_DEBUG
            Console.WriteLine(output);
            Console.WriteLine(outputAnswer);
#endif


            var isCorrect = output == outputAnswer;

            return isCorrect;
        }

        public void TestProblems()
        {
            var testCaseNumber = 1;
            while (true)
            {
                var inputFileName = GetInputFilePath(testCaseNumber);
                if (!File.Exists(inputFileName))
                {
                    break;
                }

                var result = TestProblem(testCaseNumber);

                if (result)
                {
                    Console.WriteLine($"TestCase {testCaseNumber} : Success");
                }
                else
                {
                    Console.WriteLine($"TestCase {testCaseNumber} : Failure");
                }

                testCaseNumber++;
            }
        }
    }

#endif
}