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++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("avx,avx2,fma")
//#pragma comment(linker, "/stack:200000000")

using namespace std;
typedef long long ll;
#define pb push_back
#define mp make_pair
//#define ff first
//#define ss second
//#define ipq priority_queue<ll, vector<ll>, greater<ll> >
//#define dpq priority_queue<ll>
#define len(v) ((int)v.size())
#define all(v) v.begin(), v.end()
//#define PQ(type) priority_queue<type>
//#define PQD(type) priority_queue<type,vector<type>,greater<type> >
//#define umap unordered_map<ll,ll> 
//#define vpair vector<pair<ll,ll>>

  
#define oset tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> 
ll f[1001],ifact[1001];
ll mod=1e9+7;
long long mul(long long x,long long y,long long z){
	long long res =0;
	while(y){
		if(y&1) res = (res+x)%z;
		x =(2*x)%z;
		y/=2;
	}
	return res;
}
 
long long power(long long x, long long y, long long p)
{
    long long res = 1;      
   
     x=x%p;           
 
    while (y )
    {
        
        if (y & 1)
            res = mul(res,x,p)%p ;
 
        x=mul(x,x,p)%p;
        y/=2;
    }
    return res;
}
void fact()
{
        ll mod=1e9+7;
        f[0]=f[1]=1;
        for(int i=2;i<=1000;i++)
        {
            f[i]=(f[i-1]*i)%1000000007;
        }
        ifact[1000] = power(f[1000],mod-2,mod);
	    for(int i=1000; i>=1; i--) {
	    	ifact[i-1] = (i * ifact[i]) % mod;
        }
}


ll NCR(ll n, ll r,ll mod)
{
       
    long long ans = f[n];
 
    ans = ((ans%mod)*(ifact[n-r]%mod))%mod;
    ans = ((ans%mod)*(ifact[r]%mod))%mod;
 
	   return ans;
}
int main()
{
    
    
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    fact();
    cout<<NCR(5,2,mod);
    
    
    
}