program b;

{$APPTYPE CONSOLE}
{$R+,Q+,S+,H+}

uses
  Math,
  SysUtils;

Type
  Integer=LongInt;
  Real=Extended;

Const
  TaskID='box';
  InFile=TaskID+'.in';
  OutFile=TaskID+'.out';

Var
  D:Array[1..12]Of Integer;
  Mark:Array[1..12]Of Boolean;
  S:Array[1..12]Of Integer;
  NS:Integer;
  Res:Boolean;

Procedure Load;
Var
  I:Integer;
Begin
  ReSet(Input,InFile);
  For I:=1 To 12 Do Read(D[I]);
  Close(Input);
End;

Procedure Solve;
Var
  I,J:Integer;
  ToGo:Integer;
  W,H,N12,N23,N13:Integer;
Begin
  Res:=False;
  FillChar(Mark,SizeOf(Mark),True);
  NS:=0;
  For I:=1 To 12 Do If Mark[I] Then Begin
    Inc(NS);
    S[NS]:=D[I];
    Mark[I]:=False;
    ToGo:=3;
    For J:=I+1 To 12 Do If Mark[J] And (D[J]=D[I]) Then Begin
      Dec(ToGo);
      Mark[J]:=False;
      If ToGo=0 Then Break;
    End;
    If ToGo>0 Then Exit;
  End;
  If (NS<>3) Then Exit;
  N12:=2;
  N23:=2;
  N13:=2;
  For I:=1 To 6 Do Begin
    W:=D[I*2-1];
    H:=D[I*2];
    If ((W=S[1]) And (H=S[2]) Or (W=S[2]) And (H=S[1])) And (N12>0) Then Dec(N12) Else
    If ((W=S[1]) And (H=S[3]) Or (W=S[3]) And (H=S[1])) And (N13>0) Then Dec(N13) Else
    If ((W=S[2]) And (H=S[3]) Or (W=S[3]) And (H=S[2])) And (N23>0) Then Dec(N23) Else
     Exit;
  End;
  If (N12<>0) Or (N23<>0) Or (N13<>0) Then Exit;
  Res:=True;
End;

Procedure Save;
Begin
  ReWrite(Output,OutFile);
  If Res Then WriteLn('POSSIBLE') Else WriteLn('IMPOSSIBLE');
  Close(Output);
End;

begin
  Load;
  Solve;
  Save;
end.
 