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

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


Procedure work;
Begin
    For i:=2 to 6 do begin
        if w[i]=w[1] then begin
                          w[i]:=0;
                          inc(q1);
                     end
                     else if h[i]=w[1]
                     then begin
                          h[i]:=0;
                          inc(q1);
                     end;
        if q1=3 then break;
    end;
    if q1<3 then exit;
    For i:=2 to 6 do begin
        if w[i]=h[1] then begin
                          w[i]:=0;
                          inc(q1);
                     end
                     else if h[i]=h[1]
                     then begin
                          h[i]:=0;
                          inc(q1);
                     end;
        if q1=6 then break;
    end;
    if q1<6 then exit;
    For i:=2 to 5 do begin
        if h[i]>0 then begin
                  For j:=i+1 to 6 do
                      if (h[i]=h[j]) then inc(q1)
                                     else if h[i]=w[j] then inc(q1);
        end;
    end;
End;

Procedure WriteFile;
Begin
     Assign(output,Fileout);
     Rewrite(output);
     If q1=9 then Write('POSSIBLE')
             else Write('IMPOSSIBLE');
End;

Begin
    Load;
    Work;
    WriteFile;
End.
