program box;

const
     Filein='box.in';
     Fileout='box.out';
Var
w,h               :array [1..6] of integer;
i,j,a,b,c,q       :integer;
F                 :BOOLEAN;
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];
     f:=true;
     if a=h[1] then begin
        f:=false;
        For i:=2 to 6 do begin
            if (a<>h[i]) or (a<>w[i]) then begin f:=true; break; end;
        End;
     End;
     if not f 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 h[i]>0 then begin
                       For j:=i+1 to 6 do begin
                           if (w[j]=h[i]) then inc(q)
                                          else if h[j]=h[i] then inc(q);
                       end;
                       break;
                  end;
        if w[i]>0 then begin
                       For j:=i+1 to 6 do begin
                           if (w[j]=w[i]) then inc(q)
                                          else if h[j]=w[i] then inc(q);
                       end;
                       break;
                  end ;
    end;
End;


Procedure WriteFile;
Begin
     Assign(output,Fileout);
     Rewrite(output);
     if (not f) or (q=9) then write('POSSIBLE')
                         else write('IMPOSSIBLE'); 
End;

Begin
    Load;
    Work;
    WriteFile;
End.
