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

#include <stdio.h>

struct side{
	int a,b;
	bool inuse;
};

int main(int argc, char* argv[])
{
	FILE *in;
	FILE *out;
	
	int a,b,i,j,s = 0;
	
	bool ok;
	
	in=fopen("box.in", "r");
	out=fopen("box.out", "w");
	
	side mas[6];
	
	for (i=0; i<6; i++)
	{
		fscanf(in, "%d", &mas[i].a);
		fscanf(in, "%d", &mas[i].b);
		mas[i].inuse = false;
	}
	///Проверка на вшивость
	for (i=0; i<6; i++) //цикл по всем
	{
		if (!mas[i].inuse)
		{
			a = mas[i].a;
			b = mas[i].b;
			mas[i].inuse = true;
			
			ok = false;
			for (j=0; j<6; j++)
			{
				if ((!mas[j].inuse)&&(!ok))
				{
					if (((mas[j].a==a)&&(mas[j].b==b))||((mas[j].a==b)&&(mas[j].b==a)))
					{
						mas[j].inuse = true;
						ok = true;
					}
					else ok = false;
				}
			}
			if (!ok) mas[i].inuse = false;
		}
	}

	for (i=0; i<6; i++)
	{
		if (mas[i].inuse == true) s++;
	}
	
	if (s==6) fprintf(out, "POSSIBLE"); else fprintf(out, "IMPOSSIBLE");

	return 0;
}

