program xxxx;
const inp='box.in';
     outp='box.out';
var i:longint;
    f:boolean;
    a,b,x,y,xx,yy:array[1..6]of longint;
    used:array[1..6]of boolean;

procedure check;
var k:longint;
begin
 for k:=1 to 6 do
  if b[k]=0 then begin xx[k]:=x[a[k]]; yy[k]:=y[a[k]] end
          else begin xx[k]:=y[a[k]]; yy[k]:=x[a[k]]; end;
 if (xx[1]=xx[6])and(xx[1]=xx[5])and(xx[3]=xx[5])and(xx[3]=xx[6])and
 (yy[1]=yy[2])and(yy[1]=yy[4])and(yy[4]=yy[3])and(yy[2]=yy[3])and
 (yy[6]=xx[2])and(xx[2]=yy[5])and(yy[5]=xx[4])and(xx[4]=yy[6])
 then
  begin
    f:=true;
  end;
end;

procedure sol(o:longint);
var k:longint;
begin
 if f then exit;
 if o=6 then begin check; exit; end;
   begin
    b[o+1]:=0;
    sol(o+1);
    b[o+1]:=1;
    sol(o+1);
   end;

end;

procedure rec(o:longint);
var k:longint;
begin
 if f then exit;
 if o=6 then begin sol(0); exit; end;
 for k:=1 to 6 do
  if not used[k] then
   begin
    used[k]:=true;
    a[o+1]:=k;
    rec(o+1);
    used[k]:=false;
   end;

end;

begin
 assign(input,inp); reset(input);
 assign(output,outp); rewrite(output);
 for i:=1 to 6 do read(x[i],y[i]);
 fillchar(used,sizeof(used),false);
 f:=false;
 rec(0);
 if f then writeln('POSSIBLE') else
 writeln('IMPOSSIBLE');

 close(input); close(output);
end.
