{$A+,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1}
{$MINSTACKSIZE $00004000}
{$MAXSTACKSIZE $00100000}
{$IMAGEBASE $00400000}
{$APPTYPE CONSOLE}

var qc:array[1..6,1..2]of longint;
    i,j,h:longint;
    ass:boolean;
begin
assign(input,'box.in');
assign(output,'box.out');
reset(input);
rewrite(output);
for i:=1 to 6 do
        for j:=1 to 2 do
                read(qc[i,j]);
for i:=1 to 6 do
        begin
        if qc[i,1]>qc[i,2] then
                begin
                h:=qc[i,1]; qc[i,1]:=qc[i,2]; qc[i,2]:=h;
                end;
        end;
for i:=1 to 5 do
        for j:=i+1 to 6 do
                begin
                if ((qc[i,1]>qc[j,1])or((qc[i,1]=qc[j,1])and(qc[i,2]>qc[j,2]))) then
                        begin
                        h:=qc[i,1]; qc[i,1]:=qc[j,1]; qc[j,1]:=h;
                        h:=qc[i,2]; qc[i,2]:=qc[j,2]; qc[j,2]:=h;
                        end;
                end;
ass:=false;
for i:=1 to 3 do
        for j:=1 to 2 do
        if qc[2*i-1,j]<>qc[2*i,j] then ass:=true;
if qc[2,1]<>qc[3,1] then ass:=true;
if qc[2,2]<>qc[5,1] then ass:=true;
if qc[4,2]<>qc[5,2] then ass:=true;
if ass then writeln('IMPOSSIBLE') else writeln('POSSIBLE');
end.
