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<iostream>
#include<string>
#include<cmath>
#include<algorithm>
#define INF 10e10

using namespace std;

//  #define y cout << "yes"<< endl
  #define Y cout << "YES" << endl
  #define y cout << "Yes" << endl
//  #define n cout << "no"<< endl
  #define N cout << "NO" << endl
  #define n cout << "No" << endl
  #define pu(q) cout << q ;
  #define put(q) cout << q << " ";
  #define puts(q) cout << q << endl;
  
  
	long a,b,c,d,e,f,g,h,ans,res;
//	char a,b,c,d,e,f,g,h,ans,res;
//	string a,b,c,d,e,f,g,h,ans,res;
//	double a,b,c,d,e,f,g,h,ans,res;
	
void take(int x);
  
int main(void){
	take(2);//数
	if(a>b)swap(a,b);
	if(a==0){puts("IMPOSSIBLE");
	}else {puts((a+b)/2);
	}
	/*
	if(a==b){
		puts(0);
		
	//	y;	//Yes
	//	Y;	//YES
	//	n;	//No
	//	N;	//NO
	}
	if(a>b)swap(a,b);//a<b
	else if((a+b)/2){
		
		
	//	y;
	//	Y;
	//	n;
	//	N;
		
	}
	else if(){
		
		
	//	y;
	//	Y;
	//	n;
	//	N;
		
	}
	else if(){
		
		
	//	y;
	//	Y;
	//	n;
	//	N;
		
	}
	
	else{
		
		
	//	y;
	//	Y;
	//	n;
	//	N;
		
	}*/
//	cout << ans << endl;
	
	return 0;
}
void take(int x){
	if(x==1)
		cin >> a;
	else if(x==2)
		cin >> a >> b;
	else if(x==3)
		cin >> a >> b >> c;
	else if(x==4)
		cin >> a >> b >> c >> d;
	else if(x==5)
		cin >> a >> b >> c >> d >> e;
	else if(x==6)
		cin >> a >> b >> c >> d >> e >> f;
	else if(x==7)
		cin >> a >> b >> c >> d >> e >> f >> g;
	else if(x==8)
		cin >> a >> b >> c >> d >> e >> f >> g >> h;
	return ;
}