#include <iostream>
#include <fstream>
#include <algorithm>

std::ifstream* from = new std::ifstream("box.in");
std::ofstream* to = new std::ofstream("box.out");

struct plate
{
	int a;
	int b;
	int num;
};

struct info
{
	int a;
	int num;
};

plate arr[6];
int n_arr = 0;
info inf[12];
int n_inf = 0;

int main(void)
{
	int p, q;
	bool find;
	for(int i = 0; i < 6; i++)
	{
		*from >> p >> q;
		find = false;
		for(int j = 0; j < n_arr; j++)
		{
			if((arr[j].num < 2) && (((arr[j].a == p) && (arr[j].b == q)) || ((arr[j].a == q) && (arr[j].b == p))))
			{
				arr[j].num++;
				find = true;
				break;
			}
		}
		if(!find)
		{
			arr[n_arr].a = p;
			arr[n_arr].b = q;
			arr[n_arr++].num = 1;
		}
	}
	for(i = 0; i < n_arr; i++)
		if(arr[i].a > arr[i].b)
			std::swap<int>(arr[i].a, arr[i].b);

	if((arr[0].num == 2) && (arr[1].num == 2) && (arr[2].num == 2)) 
	{
		if((arr[0].a == arr[1].a) && (arr[0].b == arr[2].a) && (arr[1].b == arr[2].b))
			*to << "POSSIBLE" << std::endl;
		else if((arr[0].a == arr[1].a) && (arr[0].b == arr[2].b) && (arr[1].b == arr[2].a))
			*to << "POSSIBLE" << std::endl;
		else if((arr[0].a == arr[1].b) && (arr[0].b == arr[2].a) && (arr[1].a == arr[2].b))
			*to << "POSSIBLE" << std::endl;
		else if((arr[0].a == arr[1].b) && (arr[0].b == arr[2].b) && (arr[1].a == arr[2].a))
			*to << "POSSIBLE" << std::endl;
		else
			*to << "IMPOSSIBLE" << std::endl;
	}
	else
		*to << "IMPOSSIBLE" << std::endl;
	delete from;
	delete to;
	return 0;
}