{$APPTYPE CONSOLE}
Const
     Filein='box.in';
     Fileout='box.out';
Var
w,h               :array [1..6] of integer;
i,j,a,b,c,q       :integer;

Procedure Load;
Begin
    Assign(input,filein);
    Reset(input);
    For i:=1 to 6 do
        Read(w[i],h[i]);
End;


Procedure work;
Begin
     a:=w[1];
     b:=h[1];
     For i:=2 to 6 do begin
         if (w[i]<>a) and (w[i]<>b) then c:=w[i];
         if (h[i]<>a) and (h[i]<>b) then c:=h[i];
     end;
     if c=0 then exit;
     For i:=2 to 6 do begin
         if (a=w[i]) then begin
                          w[i]:=0;
                          inc(q);
                     end
                     else begin
                          if a=h[i] then begin
                                        h[i]:=0;
                                        inc(q);
                          end;
                     end;
           if q=3 then break;
    end;
    if q<3 then exit;
For i:=2 to 6 do begin
         if (b=w[i]) then begin
                          w[i]:=0;
                          inc(q);
                     end
                     else begin
                          if b=h[i] then begin
                                        h[i]:=0;
                                        inc(q);
                          end;
                     end;
           if q=6 then break;
    end;
    if q<6 then exit;
    For i:=2 to 6 do begin
         if (c=w[i]) then begin
                          w[i]:=0;
                          inc(q);
                     end
                     else begin
                          if c=h[i] then begin
                                        h[i]:=0;
                                        inc(q);
                          end;
                     end;
           if q=9 then break;
    end;
    if q<9 then exit;


    End;


Procedure WriteFile;
Begin
     Assign(output,Fileout);
     Rewrite(output);
     If (q=9) or ((c=0) and (a=b)) then Write('POSSIBLE')
                                    else Write('IMPOSSIBLE');
End;

Begin
    Load;
    Work;
    WriteFile;
End.
