#include <iostream.h>
#include <fstream.h>

class box{
public:
	int w,h,c;

};

int main(){

	int poss=1;
	box boxes[7];
	int S[13];
	int s=0;
	int c=0;
	fstream f("box.in",ios::in);
	fstream fo("box.out",ios::out);

	for (int i = 1; i <= 6; i++){
		f >> boxes[i].w >> boxes[i].h;
		boxes[i].c=1;
		S[i*2-1]=boxes[i].w; 
		S[i*2]=boxes[i].h; 
	}


	for (i = 1; i <= 6; i++){
		for (int j = 1; j <= 6; j++){
			if ((i != j) && ((boxes[i].w == boxes[j].w  && boxes[i].h == boxes[j].h ) || (boxes[i].w == boxes[j].h  && boxes[i].h == boxes[j].w ))){
				boxes[i].c++;
			}
	}
}

	for (i = 1; i <= 6;i++){
		if (boxes[i].c%2 == 1) poss = 0;
	}

	int ss[13];
	int a;
	a=2;
	ss[1]=S[1];
	for (i=2;i<13;i++)
	{
		bool b=false;
		for(int j=1;j<a;j++) 
		{
			if(ss[j]==S[i])
			{
				b=true;
			}
		}
		if(!b)
		{
			ss[a++]=S[i];
		}
	}
	if (a-1 > 3) poss=0;
	
	if (poss == 1) fo << "POSSIBLE";
	if (poss == 0) fo << "IMPOSSIBLE";

	return 0;
}