#include <fstream.h>

void swap(int* a, int* b)
{
	int t = *a;
	*a = *b;
	*b = t;
}

int main()
{
	int a[6];
	int b[6];
	ifstream fin("box.in");
	ofstream fout("box.out");
	for(int i = 0; i < 6; i++)
	{
		fin >> a[i] >> b[i];
		if(a[i] > b[i])
			swap(a + i, b + i);
	}
	for(i = 0; i < 6; i++)
	{
		for(int j = i + 1; j < 6; j++)
		{
			if(a[i] > a[j])
			{
				swap(a + i, a + j);
				swap(b + i, b + j);
			}
			if(a[i] == a[j])
			{
				if(b[i] > b[j])
				{
					swap(a + i, a + j);
					swap(b + i, b + j);
				}
			}
		}
	}
	for(i = 0; i < 6; i += 2)
	{
		if(a[i] != a[i + 1] || b[i] != b[i + 1])
		{
			fout << "IMPOSSIBLE" << endl;
			return 0;
		}
	}
/*	if(a[2] != a[1] && b[2] != a[1])
	{
		fout << "IMPOSSIBLE" << endl;
		return 0;
	} */
/*	if(a[2] == b[1])
	{
		swap(a + 2, b + 2);
		swap(a + 3, b + 3);
	} 
	if(a[4] != b[2] && a[4] != b[0])
	{
		fout << "IMPOSSIBLE" << endl;
		return 0;
	}
	if(b[0] == b[2])
	{
		if(b[4] != b[0])
		{
			fout << "IMPOSSIBLE" << endl;
			return 0;
		}
	}
	if(a[4] == b[2])
	{
		if(b[4] != b[0])
		{
			fout << "IMPOSSIBLE" << endl;
			return 0;
		}
	}
	else
	{
		if(b[4] != b[2])
		{
			fout << "IMPOSSIBLE" << endl;
			return 0;
		}
	} */
	if(a[0] != a[2])
	{
		fout << "IMPOSSIBLE";
		return 0;
	}
	if(a[4] == b[0])
	{
		if(b[2] != b[4])
		{
			fout << "IMPOSSIBLE";
			return 0;
		}
		else
		{
			fout << "POSSIBLE" << endl;
			return 0;
		}
	}
	if(a[4] == b[2])
	{
		if(b[0] != b[4] || b[1] != b[5])
		{
			fout << "IMPOSSIBLE";
			return 0;
		}
		else
		{
			fout << "POSSIBLE" << endl;
			return 0;
		}
	}
	fout << "IMPOSSIBLE" << endl;
	return 0;
}