#include <stdio.h>

FILE *f;

int a[3];
int b[3];
int cnt[3];

void minmax(int &a, int &b)
{
	int tmp;
	if (a>b)
	{
		tmp = a;
		a = b;
		b = tmp;
	}
}

int main()
{
	int w, h;
	int i, j;
	bool res = false;

	cnt[0] = cnt[1] = cnt[2] = 0;
	f = fopen("box.in","rt");

	for (i=0; i<6; i++)
	{
		fscanf(f, "%d %d", &w, &h);
		minmax(w,h);
		for (j=0; j<3; j++)
		{
			if ((cnt[j] == 0) || ((cnt[j] == 1)&&(a[j]==w)&&(b[j]==h)))
			{
				a[j] = w;
				b[j] = h;
				cnt[j]++;
				goto NXT;
			}
		}
		goto KONEC;
	NXT:;
	}

	
	
	if (a[0] == a[1])
	{
		w = b[0]; h = b[1];
		minmax(w,h);
		if ((w == a[2]) && (h == b[2]))
			res = true;
	}

	if (a[0] == b[1])
	{
		w = b[0]; h = a[1];
		minmax(w,h);
		if ((w == a[2]) && (h == b[2]))
			res = true;
	}

	if (a[0] == a[2])
	{
		w = b[0]; h = b[2];
		minmax(w,h);
		if ((w == a[1]) && (h == b[1]))
			res = true;
	}

	if (a[0] == b[2])
	{
		w = b[0]; h = a[2];
		minmax(w,h);
		if ((w == a[1]) && (h == b[1]))
			res = true;
	}


KONEC:
	fclose(f);
	f = fopen("box.out","wt");
	fprintf(f, res?"POSSIBLE\n":"IMPOSSIBLE\n");
	fclose(f);

	return 0;
}