#include <fstream.h>
#include <math.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

struct rect{
	long a,b;
} mas[6], s[3];
int used[6], bad;

int operator != (rect r1, rect r2){
	if (r1.a == r2.a && r1.b == r2.b)
		return 0;
	return 1;
}

void Input(){
	long t;
	for (long i = 0; i < 6; i++){
		cin >> mas[i].a >> mas[i].b;
		if (mas[i].a < mas[i].b){
			t = mas[i].a;
			mas[i].a = mas[i].b;
			mas[i].b = t;
		}
	}
}

void Solve(){
	long i, pos, p, t, j, k;
	memset(used, 0, sizeof used);
	rect p1, p2, p3;
	pos = 0;
	for (i = 0; i < 3; i++){
		while (used[pos]) pos++;
		if (pos >= 6){
			bad = 1;
			return;
		}
		used[pos] = 1;
		for (p = pos + 1; p < 6 && (used[p] || mas[p] != mas[pos]); p++);
		if (p >= 6){
			bad = 1;
			return;
		}
		used[p] = 1;
		s[i] = mas[pos];
	}
	bad = 1;
	for (i = 0; i < 3; i++)
		for (j = 0; j < 3; j++)
			for (k = 0; k < 3; k++){
				if (i == j || i == k || k == j)
					continue;
				for (long bi = 0; bi < 2; bi++)
					for (long bj = 0; bj < 2; bj++)
						for (long bk = 0; bk < 2; bk++){
							p1 = s[i];
							if (bi){
								t = p1.a;
								p1.a = p1.b;
								p1.b = t;
							}
							p2 = s[j];
							if (bj){
								t = p2.a;
								p2.a = p2.b;
								p2.b = t;
							}
							p3 = s[k];
							if (bk){
								t = p3.a;
								p3.a = p3.b;
								p3.b = t;
							}
							if (p1.a == p3.b && p2.a == p1.b && p2.b == p3.a){
								bad = 0;
								return;
							}
						}
			}
}

void Output(){
	if (!bad)
		cout << "POSSIBLE";
	else
		cout << "IMPOSSIBLE";
}

int main(){
	ifstream fi("box.in");
	ofstream fo("box.out");
	cin = fi;
	cout = fo;
	Input();
	Solve();
	Output();
	return 0;
}
