#include <stdio.h>
#include <stdlib.h>

typedef struct
{
	int length;
	int used1, used2;
} TVertex;

TVertex vx[12];

int test(void)
{
	int i,j;
	int n = 0;

	for (i = 0; i < 12; i++)
	{
		if (!vx[i].used1)
		{
			int ok = 0;
			for (j = 0; j < 12; j++)
			{
				if (!vx[j].used1 && vx[i].length == vx[j].length && i != j)
				{
					ok = 1;
					vx[i].used1 = vx[j].used1 = 1;
					break;
				}
			}

			if (!ok) return 0;
		}

		if (!vx[i].used2)
		{
			n++;
			for (j = 0; j < 12; j++)
			{
				if (vx[i].length == vx[j].length)
				{
					vx[j].used2 = 1;
				}
			}
		}
	}

	return n <= 3;
}

int main(void)
{
	FILE * in = fopen("box.in", "rt");
	FILE * out = fopen("box.out", "wt");

	int i;

	for (i = 0; i < 12; i++)
	{
		fscanf(in, "%d", &vx[i].length);
		vx[i].used1 = vx[i].used2 = 0;
	}

	fputs(test() ? "POSSIBLE" : "IMPOSSIBLE", out);

	fcloseall();

	return 0;
}