program b;

{$APPTYPE CONSOLE}

Var I,J,K,L,N,M:Longint;
    A:Array[1..6,1..2] Of Longint;
    BB:Boolean;

begin
  Assign(input,'box.in');
  Reset(input);
  Assign(output,'box.out');
  ReWrite(output);
   For I:=1 To 6 Do
    Begin
      ReadLn(A[I,1],A[I,2]);
      If A[I,1]>A[I,2] Then
       Begin
         K:=A[I,1];
         A[I,1]:=A[I,2];
         A[I,2]:=K;
       End;
    End;
   For I:=1 To 5 Do
    For J:=I+1 To 6 Do
     If (A[I,1]>A[J,1]) Or ((A[I,1]=A[J,1]) And (A[I,2]>A[J,2])) Then
      Begin
        K:=A[I,1];
        A[I,1]:=A[J,1];
        A[J,1]:=K;
        K:=A[I,2];
        A[I,2]:=A[J,2];
        A[J,2]:=K;
      End;
   BB:=True;
   For I:=1 To 3 Do
    If Not ((A[2*I-1,1]=A[2*I,1]) And (A[2*I-1,2]=A[2*I,2])) Then
     BB:=False;
   If Not (((A[1,1]=A[3,1]) And (A[1,2]=A[5,1]) And (A[3,2]=A[5,2])) Or
      ((A[1,1]=A[5,1]) And (A[1,2]=A[3,2]) And (A[3,1]=A[5,1]))) Then
    BB:=False;
   If BB Then
    Write('POSSIBLE')
   Else
    Write('IMPOSSIBLE');    
  Close(input);
  Close(output);
end.
 