program box;

const
     Filein='box.in';
     Fileout='box.out';
Var
w,h,l             :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 Sort;
Begin
 For i:=1 to 6 do begin
     if w[i]>h[i] then begin
                       j:=h[i];
                       h[i]:=w[i];
                       w[i]:=j;
                  end;
 end;
End;

Procedure Para(t:integer);
Begin
    For i:=1 to 5 do begin
        if l[i]=0 then begin
                       For j:=i+1 to 6 do begin
                           if (w[i]=w[j]) and (h[i]=h[j]) then begin
                                                               l[i]:=t;
                                                               l[j]:=t;
                                                          end;
                            if l[i]>0 then exit;
                       end;
                  end;
    end;
End;

Procedure work;
Begin
   Sort;
   Para(1);
   Para(2);
   Para(3);
   For i:=1 to 6 do begin
       if l[i]=0 then begin
                      f:=false;
                      exit;
                 end;
   end;
   For j:=1 to 3 do begin
       For i:=1 to 6 do begin
           if l[i]=j then begin
                          w[i]:=0;
                          h[i]:=0;
                          break;
                     end;
       end;
   end;
   For i:=1 to 5 do begin
       if w[i]>0 then begin
                      For j:=i+1 to 6 do begin
                          if w[i]=w[j] then begin
                                            w[j]:=0;
                                            w[i]:=0;
                                            break;
                                       end;
                          if w[i]=h[j] then begin
                                            w[i]:=0;
                                            h[j]:=0;
                                            break;
                                       end;
                      end;
                 end;
       if h[i]>0 then begin
                      For j:=i+1 to 6 do begin
                          if h[i]=w[j] then begin
                                            w[j]:=0;
                                            h[i]:=0;
                                            break;
                                       end;
                          if h[i]=h[j] then begin
                                            h[i]:=0;
                                            h[j]:=0;
                                            break;
                                       end;
                      end;
                 end;
   end;
   f:=true;

   For i:=1 to 5 do begin
       if (h[i]>0) or (w[i]>0) then begin f:=false; exit; end;
   end;

End;



Procedure WriteFile;
Begin
     Assign(output,Fileout);
     Rewrite(output);
     if (h[6]<>w[6]) then f:=false;
     if f  then write('POSSIBLE')
           else write('IMPOSSIBLE');
End;

Begin
    Load;
    Work;
    WriteFile;
End.
