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

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

};

int main(){

	int poss = 1;
	box boxes[7];
	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=0;
	}
	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 != 1) {poss = 0;}
	}
	if (poss == 1) fo << "POSSIBLE";
	if (poss == 0) fo << "IMPOSSIBLE";

	return 0;
}