#include <stdio.h>
#define MAX 6

int w[MAX],h[MAX];
int n=6;
int found=0;
int tec[MAX];
int pr[MAX];

void swap(int &p1,int &p2)
	{
	int p3=p1;p1=p2;p2=p3;
	}

int Equal(int p1,int p2,int p3,int p4)
	{
	if (p1!=p2) return 0;
	if (p1!=p3) return 0;
	if (p1!=p4) return 0;
	return 1;
	}

int Valid()
	{
	int w1[MAX],h1[MAX];
	int i;
	for (i=0;i<n;i++)
		if (pr[i]==1) {w1[i]=w[tec[i]];h1[i]=h[tec[i]];}
		else {w1[i]=h[tec[i]];h1[i]=w[tec[i]];}

	if (!Equal(h1[0], h1[3], h1[5], h1[1]) ) return 0;
	if (!Equal(w1[0], w1[4], w1[5], w1[2]) ) return 0;
	if (!Equal(w1[1], h1[4], w1[3], h1[2]) ) return 0;

	return 1;
	}

void Solve(int q)
	{
	if (q==n)
		{
		if (Valid()) found=1;
		return;
		}

	pr[q]=1;
	Solve(q+1);
	pr[q]=0;
	Solve(q+1);
	}
void Perm(int q)
	{
	if (found) return;
	if (q==n)
		{
		Solve(0);
		return;
		}
	int i;
	for (i=q;i<n;i++)
		{
		swap(tec[i], tec[q]);
		Perm(q+1);
		swap(tec[i], tec[q]);
		}
	}
int main()
	{
	freopen("box.in","rt",stdin);
	freopen("box.out","wt",stdout);

	int i;
	//scanf("%d", &n);
	for (i=0;i<n;i++)
		{
		scanf("%d %d", &w[i], &h[i]);
		tec[i]=i;
		}
			
	Perm(0);
	if (found) printf("POSSIBLE\n");
	else printf("IMPOSSIBLE\n");
	return 0;
	}