#include<algorithm>
#include"vector"
#include<string>
#include<iostream>
#include<fstream>
using namespace std;

ifstream fi("box.in");
ofstream fo("box.out");
typedef vector<int> veci;typedef vector<double> vecd;typedef vector<string> vecs;

#define forn(i,n) if(true)for(int i=0;i<(n);i++)
#define feach(i,v) forn(i,((int)v.size()))
#define VA(v) v.begin(),v.end()

veci d;
int sx[6],sy[6];

int fits(int a,int b,int ii){
	int w=sx[ii];
	int h=sy[ii];
	if(a>b) swap(a,b);
	return a==w && b==h;
}

int check(int a,int b,int c){
	int was[6]={0,0,0,0,0,0};
	forn(i0,6){
		if(was[i0]) continue;
		if(!fits(a,b,i0)) continue;
		was[i0]=1;
	forn(i1,6){
		if(was[i1]) continue;
		if(!fits(a,b,i1)) continue;
		was[i1]=1;
	forn(i2,6){
		if(was[i2]) continue;
		if(!fits(a,c,i2)) continue;
		was[i2]=1;
	forn(i3,6){
		if(was[i3]) continue;
		if(!fits(a,c,i3)) continue;
		was[i3]=1;
	forn(i4,6){
		if(was[i4]) continue;
		if(!fits(c,b,i4)) continue;
		was[i4]=1;
	forn(i5,6){
		if(was[i5]) continue;
		if(!fits(c,b,i5)) continue;
		was[i5]=1;
		return 1;
		was[i5]=1;
	}
		was[i4]=1;
	}
		was[i3]=1;
	}
		was[i2]=1;
	}
		was[i1]=1;
	}
		was[i0]=1;
	}
	return 0;
}

int main(){

	int w,h;
	
	forn(i,6){
		fi>>w>>h;if(w>h) swap(w,h);
		sx[i]=w;sy[i]=h;
		d.push_back(w);
		d.push_back(h);
	}

	sort(VA(d));
	//d.resize(unique(VA(d))-d.begin());

	feach(i,d){
		feach(j,d){
			feach(k,d){
				if(check(d[i],d[j],d[k])){
					fo<<"POSSIBLE";
					return 0;
				}
			}
		}
	}
	
	fo<<"IMPOSSIBLE";
	return 0;
}