#include <fstream>
#include <map>

using namespace std;

ifstream fin("box.in");
ofstream fout("box.out");

map<int, int> m;



int main()
{
	int b[6][2], i;

	for (i = 0; i < 6; i++) {
		fin >> b[i][0] >> b[i][1];
		m[b[i][0] * 10001 + b[i][1]]++;
		m[b[i][1] * 10001 + b[i][0]]++;
	}

	for (i = 0; i < 6; i++) if (m[b[i][0] * 10001 + b[i][1]] != 2) break;

	fout << (i < 6 ? "IMPOSSIBLE\n" : "POSSIBLE\n");

	return 0;
}