{******************From team T03************************}

program Project1;
 {$APPTYPE CONSOLE}
 Var a : array[1..12] of integer;
     b : array[1..6] of byte;
     vse : array[1..20000] of byte;
     ans : boolean;

 Procedure Load;
 Var i : integer;
 Begin
  assign(input,'box.in');
  reset(input);
  For i:=1 to 6 do
   readln(a[i*2-1],a[i*2]);
  close(input);
 End;
{--------------------------------------------------------------------------}
 Procedure Solve;
 Var i,j : integer;
 Begin
  fillchar(vse,sizeof(vse),0);
  For i:=1 to 12 do
   Inc(vse[a[i]]);
  ans:=true;
  For i:=1 to 20000 do
   If(vse[i]=0)or(vse[i]=4)or(vse[i]=8)or(vse[i]=12)Then
   Begin
   End
   Else
    ans:=false;
 End;
{--------------------------------------------------------------------------}
 Procedure Save;
 Begin
  assign(output,'box.out');
  rewrite(output);
  If ans Then
  Begin
   write('POSSIBLE')
  End
  Else
   write('IMPOSSIBLE');
  close(output);
 End;
{--------------------------------------------------------------------------}
 BEGIN
  Load;
  Solve;
  Save;
 END.
