program BOX1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
fin,fout: textfile;
a: array[1..6, 1..2] of integer;
i,i1,s,b: integer;

begin
  { TODO -oUser -cConsole Main : Insert code here }
  assign(fin,'box.in');
  assign(fout,'box.out');
  reset(fin);
  for i:=1 to  6 do read(fin,a[i,1],a[i,2]);
  close(fin);
  b:=1;
  for i:=1 to 6 do begin
                   s:=0;
  for i1:=1 to 6 do if (a[i,1]=a[i1,1]) and (a[i,2]=a[i1,2]) or (a[i,1]=a[i1,2]) and (a[i,2]=a[i1,1]) then s:=s+1;
  if (s<>2) and (s<>4) and (s<>6) then b:=0;
                   end;




  rewrite(fout);
  if b=1 then write(fout,'POSSIBLE');
  if b=0 then write(fout,'IMPOSSIBLE');
  close(fout);





end.
