#include <stdio.h>
#include <time.h>


int main()
{
	FILE* in;
	FILE* out;
	int i;
	int w;
	int h;
	int n = 6;
	int arr[6][2];
	int table[3][2];

	in = fopen("box.in", "rt");
	for(i = 0; i < n; i++){
		fscanf(in, "%d", &arr[i][0]);
		fscanf(in, "%d", &arr[i][1]);
	}
	fclose(in);

	w = arr[0][0];
	h = arr[0][1];

	bool flag = false;
	int ans[6];
	int k = 0;
	int l = 0;
	int iind = 0;
	int m;
	int j;
//	int jind = 0;
	for(j = 0; j < n; j++){
		for(i = 1; i < n; i++){
			w = arr[i][0];
			h = arr[i][1];
			for(m = 0; m < n; m++){
				if(ans[m] == i || ans[m] == j)
					flag = true;
			}
			if(i != j && flag == false){
				if((arr[j][0] == w && arr[j][1] == h) || (arr[j][0] == h && arr[j][1] == w)){
					table[k][0] = w;
					table[k][1] = h;
					k++;
					ans[l] = i; l++;
					ans[l] = j; l++;
					flag = false;
					break;

				}
			}
			flag = false;

		}
	}


	bool answer = false;
	int a = table[0][0];
	int b = table[0][1];
	int c = table[1][0];
	int d = table[1][1];
	int e = table[2][0];
	int f = table[2][1];

	if(a == c && d == e && f == b && answer == false)
		answer = true;
	if(a == c && d == f && e == b && answer == false)
		answer = true;
	if(a == d && c == f && e == b && answer == false)
		answer = true;
	if(a == d && c == e && f == b && answer == false)
		answer = true;

	if(a == e && f == c && d == b && answer == false)
		answer = true;
	if(a == e && f == d && c == b && answer == false)
		answer = true;
	if(a == f && e == c && d == b && answer == false)
		answer = true;
	if(a == f && e == d && e == b && answer == false)
		answer = true;

	
	if(b == c && d == e && f == a && answer == false)
		answer = true;
	if(b == c && d == f && e == a && answer == false)
		answer = true;
	if(b == d && c == f && e == a && answer == false)
		answer = true;
	if(b == d && c == e && f == a && answer == false)
		answer = true;

	if(b == e && f == c && d == a && answer == false)
		answer = true;
	if(b == e && f == d && c == a && answer == false)
		answer = true;
	if(b == f && e == c && d == a && answer == false)
		answer = true;
	if(b == f && e == d && e == a && answer == false)
		answer = true;


	out = fopen("box.out", "wt");
	if(answer){
		fprintf(out,"POSSIBLE");
	}
	else
		fprintf(out,"IMPOSSIBLE");
	fclose(out);



	return (0);
}