program BOX;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
fin,fout: textfile;
a: array[1..6, 1..2] of integer;
r,i,j,i1,n,s: integer;
c:array [1..3,1..2] of 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);
  n:=1;
  for i:=1 to 6 do
  for j:=1 to 2 do
  begin
     r:=a[i,j];
     if (i=1) and (j=1) then c[1,1]:=r else
     begin
     s:=0;
     for i1:=1 to n do
     begin
     if c[i1,1]<>r then s:=s+1;
     if s=n then begin c[n+1,1]:=r; n:=n+1; end;
     end;
     end;
  end;
  for i:=1 to n do
  begin
     for i1:=1 to 6 do
     begin
        for j:=1 to 2 do
        begin
           if a[i1,j]=c[i,1] then c[i,2]:=c[i,2]+1;
        end;
     end;
  end;
  rewrite (fout);
if (c[1,2]+c[2,2]+c[3,2]=12) and (c[1,2] mod 4=0) and (c[2,2] mod 4=0) and
(c[3,2] mod 4=0) then writeln (fout,'POSSIBLE') else writeln (fout,'IMPOSSIBLE');
  close(fout);
end.
