program BOX;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
fin,fout: textfile;
a: array[1..6, 1..2] of integer;
r,s,b: integer;
i,j,i1,j1: 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 for j:=1 to 2 do begin
                                r:=a[i,j];
                                s:=0;
           for i1:=1 to 6 do
           begin
           for j1:=1 to 2 do
           begin
           if r=a[i1,j1] then s:=s+1;
           end;
           end;
           if (s<>4)and(s<>8)and(s<>12)and(s<>16) then  b:=0;

                                    end;

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





end.
