#include <fstream.h>

int main()
{
	ofstream out("box.out");
	ifstream in ("box.in");

	int ar[12]={0};
	int br[10001]={0};
	int i,j=0;

	bool c = false;

	int temp;
	while( in>>temp )
	{
		++br[temp];
		for( i=0; i<j; i++ )
		{
			c = false;
			if( ar[i]==temp )
			{ c = true; break; }
		}

		if( !c )
		{ ar[j]=temp; ++j; }
	}

	c = true;
	for( i=0; i<j; i++ )
	{
		if( br[ar[i]]%2==0 && br[ar[i]]>=4 )
		{continue;}
		else
		{ c = false; break; }
	}

	if(  c  )
	{ out<<"POSSIBLE"; }
	else
	{ out<<"IMPOSSIBLE"; }	

	return 0;
}