#include <stdio.h>
#include <string.h>
#include <math.h>
#define truestr "POSSIBLE"
#define falsestr "IMPOSSIBLE"

struct side
{
	int x;
	int y;
};

bool sideeq(side * a,side * b)
{
	int maxa=a->x>a->y?a->x:a->y;
	int mina=a->x<a->y?a->x:a->y;
	int maxb=b->x>b->y?b->x:b->y;
	int minb=b->x<b->y?b->x:b->y;
	return (maxa==maxb&&mina==minb);
}

void sidechange(side * a)
{
	int temp=a->x;
	a->x=a->y;
	a->y=temp;
}


side A;
side dside[6];
int dsidecount[6]={0,0,0,0,0,0};

int k;
int main()
{
	int i,j;k=0;
	freopen("box.in","r",stdin);
	freopen("box.out","w",stdout);

	for(i=0;i<6;i++)
	{
		scanf("%d %d",&A.x,&A.y);
		for(j=0;j<k;j++)
		{
			if (sideeq(&A,&dside[j]))
			{
				dsidecount[j]++;
				goto cont1;
			}
		}
		dside[k].x=A.x;
		dside[k].y=A.y;
		dsidecount[k]++;
		k++;
cont1:;
	}
	if (k>3) {printf(falsestr);return 0;}
	for (i=0;i<k;i++) if ((dsidecount[i]&1)==1) {printf(falsestr);return 0;}
	if (k==1) 
	{
		if (dside[0].x==dside[0].y) {printf(truestr);return 0;}
		printf(falsestr);return 0;
	}
	if (k==2)
	{
		if (dside[0].x==dside[0].y&&dsidecount[0]==2)
		{
			if (dside[1].x==dside[0].x||dside[1].y==dside[0].x) {printf(truestr);return 0;}
			printf(falsestr);return 0;
		}
		if (dside[1].x==dside[1].y&&dsidecount[1]==2)
		{
			if (dside[0].x==dside[1].x||dside[0].y==dside[1].x) {printf(truestr);return 0;}
			printf(falsestr);return 0;
		}
		printf(falsestr);return 0;
	}
	if (k==3)
	{
		for (i=0;i<3;i++)
			if (dside[i].x==dside[i].y) {printf(falsestr);return 0;}
		if (dside[0].x==dside[1].x||dside[0].x==dside[1].y)
			sidechange(&dside[0]);
		if (dside[1].y==dside[0].y)
			sidechange(&dside[1]);
		if (dside[2].y==dside[1].y)
			sidechange(&dside[2]);
		if (dside[0].y==dside[1].x&&dside[1].y==dside[2].x&&dside[2].y==dside[0].x)
		{	printf(truestr);return 0;}
	}
	printf(falsestr);
	return 0;

}