{$APPTYPE CONSOLE}
program box;

const
        st1='box.in';
        st2='box.out';
var
        ok:boolean;
        c:array[1..6] of boolean;
        a,b:array[1..6] of integer;
        x,y:integer;
{******************}
procedure look;
begin
        assign(input,st1); reset(input);
        assign(output,st2); rewrite(output);

        for x:=1 to 6 do begin
                read(a[x],b[x]);
        end;
end;
{******************}
procedure action;
begin
        fillchar(c,sizeof(c),false); ok:=false;

        for x:=1 to 5 do if not c[x] then begin
            for y:=x+1 to 6 do begin
                if (a[x]=a[y]) and (b[x]=b[y]) then begin
                        c[x]:=true; c[y]:=true; ok:=true; end;
                if (a[x]=b[y]) and (b[x]=a[y]) then begin
                        c[x]:=true; c[y]:=true; ok:=true; end;
                if ok then begin ok:=false; break; end;
            end;
        end;
end;
{******************}
procedure finish;
begin
        for x:=1 to 6 do if not c[x] then begin
                writeln('IMPOSSIBLE'); close(output); halt(0); end;

        writeln('POSSIBLE');
        close(input); close(output);
end;
{******************}
begin
        look;
        action;
        finish;
end.
