#include <stdio.h>

struct tp {
	int	w,h;
};

void	swap(int &a, int &b) {
	int	tmp=a;
	a=b;
	b=tmp;
}

int main() {
	FILE	*FI, *FO;
	FI=fopen("box.in","rt");
	FO=fopen("box.out","wt");
	tp		p[6];
	tp		u[3];
	int		i, j;
	for (i=0; i<6; i++) {
		fscanf(FI,"%d %d",&p[i].w,&p[i].h);
		if (p[i].w>p[i].h) swap(p[i].w,p[i].h);
	}
	fclose(FI);
	int		mask[6]={0};
	int		cnt=0;
	for (i=0; i<6; i++) if (mask[i]==0) {
		for (j=i+1; j<6; j++) if (p[i].w==p[j].w && p[i].h==p[j].h) {
			mask[i]=1;
			mask[j]=1;
			u[cnt]=p[i];
			cnt++;
			break;
		}
	}
	if (cnt<3) {
		fprintf(FO,"IMPOSSIBLE\n");
		fclose(FO); 
		return 0;
	}
	if (u[2].w==u[0].h || u[2].h==u[0].h) {
		swap(u[1].h,u[2].h);
		swap(u[1].w,u[2].w);
	}
	if (u[0].h==u[1].h) swap(u[1].h,u[1].w);
	if (u[1].h==u[2].h) swap(u[2].h,u[2].w);
	if (u[0].h==u[1].w && u[1].h==u[2].w && u[2].h==u[0].w) fprintf(FO,"POSSIBLE\n");
	else fprintf(FO,"IMPOSSIBLE\n");
		
	fclose(FO); 
	return 0;
}