#include <iostream.h>

struct pallete
{
	int w,h;
};

int main()
{
	int a,b;
	int i, j, count = 0;
	pallete p[6], uniqueP[3];
	bool flag[6];

	for ( i = 0; i< 6; i++)
	{
	cin >> a >> b;
	//(a > b ) ? (p[i].w = a; p[i].h = b;) : (p[i].w = b; p[i].h = a;);
	if ( a > b) {
		p[i].w = a; 
		p[i].h = b;
	}
	else {
	
		p[i].w = b; 
		p[i].h = a;
	}
	
	flag[i] = false;
	}
	
	for (i = 0; i < 6; i++)
	{
		if (flag[i] != true)
		flag[i] = true;
		else continue;

		for (j = i + 1; j < 6; j++)
		{	
			if ( (p[i].w == p[j].w && p[i].h == p[j].h && flag[j] != true) )
			{
					flag[j] = true;
					uniqueP[count] = p[i];
					count++;
					break;
			}

		}
	}
	
	int ch1, ch2;

	if  ( uniqueP[0].h == uniqueP[1].h )
	{
		ch1 = uniqueP[0].w;
		ch2 = uniqueP[1].w;
	}
	else if ( uniqueP[0].h == uniqueP[1].w )
	{
		ch1 = uniqueP[0].w;
		ch2 = uniqueP[1].h;

	}
	else if ( uniqueP[0].w == uniqueP[1].w )
	{
		ch1 = uniqueP[0].h;
		ch2 = uniqueP[1].h;

	}
	else if ( uniqueP[0].w == uniqueP[1].h )
	{
		ch1 = uniqueP[0].h;
		ch2 = uniqueP[1].w;

	}

	if ( (ch1 == uniqueP[2].h && ch2 == uniqueP[2].w) || 
		 (ch1 == uniqueP[2].w && ch2 == uniqueP[2].h) )	
		 cout << "POSSIBLE" << endl;
	else cout << "IMPOSSIBLE"<< endl;
	
	return 0;
}