program BOX1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
fin,fout: textfile;
a: array[1..6, 1..2] of integer;
c: array[1..12] of integer;
c1: array[1..3] of integer;
i,i1,j,s,s1,ind,n,r: 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);
  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;
  c[i]:=s;
  {if (s<>2) and (s<>4) and (s<>6) then b:=0;}
                   end;


 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 c1[1]:=r else
     begin
     s:=0;
     for i1:=1 to n do
     begin
     if c1[i1]<>r then s:=s+1;
     if s=n then begin c1[n+1]:=r; n:=n+1; end;
     end;
     end;
  end;




  rewrite(fout);
  ind:=0;
  s:=0;
  for i:=1 to 6 do if c[i]=2 then s:=s+1;
  if s=6 then begin
  if n=3 then begin
  write(fout,'POSSIBLE'); ind:=1; end;
  end;

  s:=0;
  for i:=1 to 6 do if c[i]=6 then s:=s+1;
  if s=6 then begin
  if n=2 then begin write(fout,'POSSIBLE');ind:=1 end;
  end;

  s:=0;
  for i:=1 to 6 do if c[i]=2 then s:=s+1;
  s1:=0;
  if s=2 then for i:=1 to 6 do if c[i]=4 then s1:=s1+1;
  if s1=4 then begin if n=1 then  begin write(fout,'POSSIBLE'); ind:=1 end;end;

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





end.
