program pb;

{$APPTYPE CONSOLE}

type
        dsp = record
                w :word;
                h :word;
        end;
        pair = record
                f :dsp;
                s :dsp;
        end;

var
        dsps :array[1..6] of dsp;
        pairs :array[1..3] of pair;
        f :text;
        i,j,k :byte;
        sign :word;

begin
sign:=11000;
k:=1;
assignfile(f,'box.in');
reset(f);
for i:=1 to 6 do
begin
        read(f,dsps[i].w);
        readln(f,dsps[i].h);
end;
closefile(f);
for i:=1 to 5 do for j:=i+1 to 6 do
if not (dsps[i].w>10000) then if ((dsps[i].w = dsps[j].h) and (dsps[i].h = dsps[j].w))
or ((dsps[i].w = dsps[j].w) and (dsps[i].h = dsps[j].h)) then
begin
        pairs[k].f:=dsps[i];
        pairs[k].s:=dsps[j];
        dsps[j].w:=sign;
        dsps[j].h:=sign;
        inc(sign);
        inc(k);
end;
assignfile(f,'box.out');
rewrite(f);
if k=4 then writeln(f,'POSSIBLE') else writeln(f,'IMPOSSIBLE');
closefile(f);
end.
