program b;{$APPTYPE CONSOLE} {
1234 4567
1234 4567
4567 4321
4321 4567
4321 1234
4321 1234

1345 2584
2584 683
2584 1345
683 1345
683 1345
2584 683
1 1
1 1
2 2
2 2
3 3
3 3
}

{$R+,Q+,I+,O-,A+,B-}
var
t,k,j,i,n:longint;
w,h:array[1..6]of longint;
label k0;

function tryy(w1,h1,w2,h2,w3,h3:longint):boolean;
begin
tryy:=
(w1=w2)and(h2=h3)and(w3=h1) or
(h1=w2)and(h2=h3)and(w3=w1) or
(w1=h2)and(w2=h3)and(w3=h1) or
(h1=h2)and(w2=h3)and(w3=w1) or
(w1=w2)and(h2=w3)and(h3=h1) or
(h1=w2)and(h2=w3)and(h3=w1) or
(w1=h2)and(w2=w3)and(h3=h1) or
(h1=h2)and(w2=w3)and(h3=w1);
end;


begin
assign(input,'box.in'); reset(input);
//assign(input,'b.dpr'); reset(input); readln;
assign(output,'box.out'); rewrite(output);
for i:=1 to 6 do begin
	read(w[i],h[i]);
	if w[i]<h[i] then begin t:=w[i];w[i]:=h[i];h[i]:=t; end;
	end;

for i:=1 to 5 do begin
	k:=i;
	for j:=i+1 to 6 do
		if (w[j]<w[k]) or (w[i]=w[k]) and (h[i]=h[k]) then k:=j;
	t:=w[i];w[i]:=w[k];w[k]:=t;
	t:=h[i];h[i]:=h[k];h[k]:=t;
	end;

if (w[1]<>w[2]) or (h[1]<>h[2]) or
	 (w[3]<>w[4]) or (h[3]<>h[4]) or
	 (w[5]<>w[6]) or (h[5]<>h[6]) then begin writeln('IMPOSSIBLE'); goto k0; end;

if tryy(w[1],h[1],w[3],h[3],w[5],h[5]) or
	 tryy(w[1],h[1],w[5],h[5],w[3],h[3]) then writeln('POSSIBLE')
	 else writeln('IMPOSSIBLE');

k0:
close(output);
end.
