#include <fstream>
#include <iostream>
#include <deque>
#include <utility>
#include <algorithm>

typedef std::pair<int, int> point;

bool operator == (point p, int i)
{
	return p.first == i && p.second == i;
}

#include <functional>
std::deque<point> mas;

int gxa(int x, int n)
{
	if(x==0) return mas[n].first; else return mas[n].second;
}

int main()
{	
	std::ifstream in ("box.in");
	std::ofstream out ("box.out");
	point p2;
	p2.first = p2.second = -1;
	point p;
	{
		for (int i =0;i < 6;i++)
		{
			in >>p.first >>p.second;
			mas.push_back(p);
		}
	}

	for (size_t i = 0;i < mas.size();i++)
	{
		for (size_t j = i+1;j < 6;j++)
		{
			if	(
				(mas[i].first == mas[j].first && mas[i].second == mas[j].second) ||
				(mas[i].first == mas[j].second && mas[i].second == mas[j].first)
				) {mas[j] = p2;break;}
		}
	}	

	for (std::deque<point>::iterator k = mas.begin();;k++)
	{
		if (k == mas.end()) break;
		if (*k == -1)
		{
			mas.erase(k);
			k = mas.begin();
		}
	}

//	for (size_t l = 0;l < mas.size();l++)
//		std::cout <<mas[l].first <<" " <<mas[l].second <<std::endl;
	int c[3];
	if(mas.size()!=3) out<<"IMPOSSIBLE"; else
	{
		int efl=0;
		for(i=0; i<8; i++)
		{
			c[0]=(i%2)>0;
			c[1]=(i%4)>1;
			c[2]=(i%8)>3;
			if ((gxa(c[0],0)==gxa(1-c[1],1))&&
				(gxa(c[1],1)==gxa(1-c[2],2))&&
				(gxa(c[2],2)==gxa(1-c[0],0))) efl=1;
		}
		if(efl==0) out<<"IMPOSSIBLE"; else out<<"POSSIBLE";
	}
	return 0;
}