program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  f,f1:text;
 P,K,J ,i:integeR;

 a:ARRAY[1..6,1..2]of integer;
 ab:ARRAY[1..12]of integer;


begin
 assign(f,'box.in');
 reset(f);
 assign(f1,'box.out');
 rewrite(f1);
 for i:=1 to 6 do
 readln(f,a[i,1],a[i,2]);
{ b[1]:=true;
     for i:=2 to 6 do

      if ((a[1,1]=a[i,1])and (b[i]<>true)and (a[1,2]=a[i,2]))or ((a[1,1]=a[i,2]) and (a[i,2]=a[i,1]) and (b[i]<>true)) then
      begin
      b[i]:=true;
      for j:=1 to 6 do
      if ((a[1,1]=a[j,1]) and (b[j]<>true)) or ((a[1,1])=a[j,2]) and (b[j]<>true)) then
      begin
      b[j]:=true
      for k:=
  }


   for i:=1 to 6 do begin
   ab[i]:=a[i,1];
   ab[i+6]:=a[i,2];
   end;
 p:=0;
 for i:=1 to 12 do begin
    k:=0;
    for j:=1 to 12 do

   if  ab[i]=ab[j] then k:=k+1;
   if   k<>4 then BEGIN
   writeln(f1,'IMPOSSIBLE');
   BREAK;
   END
   else  p:=p+1;
   end;

   if p=12 then begin

   p:=0;
   for i:=1 to 6 do
   begin
   k:=0;
   for j:=1 to 6 do
   if ((a[i,1]=a[j,1])and(a[i,2]=a[j,2]))or((a[i,1]=a[j,2])and(a[i,2]=a[j,1]))then
   k:=k+1;
   if k<>2 then
   BEGIN
   writeln(f1,'IMPOSSIBLE');
   BREAK;
   END

   else p:=p+1;
   end;
   if p=6 then writeln(f1,'POSSIBLE');
   END;
 close(f1);
 close(f);

end.
