{$APPTYPE CONSOLE}

uses
  SysUtils;
type kabs=record
h,w:integer;
tab:boolean;
end;
var inf,outf:textfile;kab:array[1..12]of integer;
i,j:integer;po,pop:boolean;k:integer;kk,kki:array[1..6]of kabs;
ab:array[1..3] of integer;a,b,c:integer;
begin
  { TODO -oUser -cConsole Main : Insert code here }
  assignfile(inf,'box.in');
  reset(inf);
  assignfile(outf,'box.out');
  rewrite(outf);
  k:=0;po:=true;
  for i:=1 to 6 do
  begin
  readln(inf,kab[2*i-1],kab[2*i]);
  kki[i].h:=kab[2*i-1];  kki[i].w:=kab[2*i];
  kk[i].tab:=false;
  end;
  for i:=1 to 12 do
  begin
  pop:=false;
  for j:=1 to 3 do
  if kab[i]=ab[j] then pop:=true;
  if (not pop and (k=3)) then
  po:=false;
  if (not pop and (k<>3)) then
  begin
  inc(k);
  ab[k]:=kab[i];
  end;
  end;
  a:=ab[1];b:=ab[2];c:=ab[3];

  kk[1].h:=a; kk[1].w:=b;
  kk[2].h:=a; kk[2].w:=c;
  kk[3].h:=b; kk[3].w:=c;
  kk[4].h:=b; kk[4].w:=a;
  kk[5].h:=c; kk[5].w:=a;
  kk[6].h:=c; kk[6].w:=b;
  for i:=1 to 6 do
  for j:=1 to 3 do
  begin
  if kk[j].tab=false then
  if ((kki[i].h=kk[j].h)and(kki[i].w=kk[j].w))or((kki[i].h=kk[j+3].h)and(kki[i].w=kk[j+3].w)) then kk[j].tab:=true;
  end;
  k:=0;
  for i:=1 to 3 do
  if kk[i].tab then inc(k);
//  if (po and (k<>6)) then po:=false;
  if (po)and(k=3) then
  writeln(outf,'POSSIBLE') ELSE
  WRITELN(OUTF,'IMPOSSIBLE');
  closefile(inf);
  closefile(outf);
end.

