// BB.cpp : Defines the entry point for the console application.
//

#include <fstream.h>

int main()
{
	ifstream fin("box.in");
	ofstream fout("box.out");
	long a[7],b[7],d[7],ii,l;
	int i,j,k,kk;
	int m[7];

	while(fin >> a[0] >> b[0])
	{
		if (a[0]<1 || b[0]<1) {fout << "IMPOSSIBLE" <<endl; goto Keyin;}
		d[0]=1;
		for(i=1; i<6; i++)
		{

			fin >> a[i] >> b[i];
			if (a[i]<1 || b[i]<1) {fout << "IMPOSSIBLE" <<endl; goto Keyin;}
			d[i]=1;
		}
		kk=0;
		for(i=0; i<5; i++)
		{
			k=0;
			if(d[i]==0){ k=1; goto Davom;}
			for(j=i+1; j<6; j++)
			{
				if(d[j]==1 &&
				  ((a[i]==a[j] && b[i]==b[j]) || 
				  (a[i]==b[j] && b[i]==a[j]))) {d[j]=0; k=1; goto Davom;}
			}
Davom:;
	  
	  if(k==0) {kk=1; break;}
		}
		if(kk) fout << "IMPOSSIBLE"<<endl;
		else
		{
			for(i=0; i<6; i++)
			{
				l=0;
				for(j=0; j<6; j++)
				{
					if(a[i]==a[j] || a[i]==b[j]) 
					{l++;}
					
				}
				if(l<4)  { fout << "IMPOSSIBLE" << endl; goto Keyin;}
				l=0;
				for(j=0; j<6; j++)
				{
					if(b[i]==a[j] || b[i]==b[j]) 
					{l++;}
				}
				if(l<4)  {
					fout << "IMPOSSIBLE" << endl; goto Keyin;
				}
			}
			
				for(j=1; j<6; j++)
				{
					if((a[0]!=a[j] && a[0]!=b[j]) && (b[0]!=a[j] && b[0]!=b[j])) { fout << "IMPOSSIBLE" << endl; goto Keyin;}
										
				}
					


			fout << "POSSIBLE" << endl;
		}

Keyin:;
	}


	return 0;
}

