#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <memory.h>
#include <malloc.h>
#include <cassert>
//#include <vector>
#include <algorithm>

int *B [6], *A [3];

bool less (int *A, int *B)
{
	return A [0] < B [0] ||
		A [0] == B [0] && A [1] < B [1];
}

bool search (int k, int b, int cc)
{
	//printf ("%d %d\n", k, b);
	if (cc == 3)
		return true;
	int i, j;
	int v = A [k][b], vv = A [k][1-b];
	if (v == -1 || vv == -1)
		return false;
	if (cc != 0)
		A [k][b] = -1;
	A [k][1-b] = -1;
	for (i = 0; i < 3; i++)
		if (i != k)
			for (j = 0; j < 2; j++)
				if (vv == A [i][j])
				{
					if (search (i, j, cc+1))
					{
						A [k][b] = v;
						A [k][1-b] = vv;
						return true;
					}
				}
	A [k][b] = v;
	A [k][1-b] = vv;
	return false;
}

int main ()
{
	int i, j, k, a, b, c;
	bool ans = true;

	freopen ("box.in", "rt", stdin);
	freopen ("box.out", "wt", stdout);
	
	for (i = 0; i < 6; i++)
	{
		B [i] = new int [2];
		for (j = 0; j < 2; j++)
			scanf ("%d ", &B [i][j]);
		std::sort (B [i], B [i] + 2);
	}

	std::sort (B, B + 6, less);

	for (i = 0; i < 3; i++)
	{
		k = 2*i;
		if (B [k][0] != B [k+1][0] ||
				B [k][1] != B [k+1][1])
		{
			ans = false;
			break;
		}
		A [i] = B [k];
	}

	if (ans)
		ans = search (0, 0, 0);

	printf ("%s\n", (ans ? "POSSIBLE" : "IMPOSSIBLE"));

	fclose (stdin);
	fclose (stdout);
	return 0;
}