// 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], c[7], d[7];
	int i,j,k,kk;
	while(fin >> a[0] >> b[0])
	{
		if (a[0]<1 || b[0]<1) {fout << "IMPOSSIBLE" <<endl; goto Keyin;}
		c[0]=a[0]*b[0];
		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;}
			c[i]=a[i]*b[i];
			d[i]=1;
		}
		kk=0;
		for(i=0; i<6; i++)
		{
			k=0;
			if(d[i]==0){ k=1; goto Davom;}
			for(j=i+1; j<6; j++)
			{
				if((c[i]==c[j] && 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 fout << "POSSIBLE" << endl;
Keyin:;
	}
	return 0;
}

