program Bproblem;

{$APPTYPE CONSOLE}
const
    pos='POSSIBLE';
    im='IMPOSSIBLE';
type
    sides=record
        w,h:integer;
    end;
var
    a:ARRAY[1..6]OF sides;
    an:ARRAY[1..6,1..2]OF boolean;
    l:ARRAY[1..6]OF boolean;
    c:array[1..3]of integer;
    f:boolean;

procedure Load;
var i,x,y,z:integer;
Begin
    x:=0;y:=0;z:=0;
    for i:=1 to 6 do begin
        read(a[i].w,a[i].h);
        if x=0 then x:=a[i].w;
        if y=0 then x:=a[i].h;

    end;

End;

procedure Compute;
var i,j,x,y,t,xx,zz,yy:integer;
Begin
fillchar(an,sizeof(an),true);
fillchar(c,sizeof(c),0);
x:=0;y:=0;
f:=true;
i:=1;

while (i<=2)and f do begin
    fillchar(l,sizeof(l),true);
    for j:=1 to 6 do begin
        if an[j][1] then  begin
            t:=a[j].w;
            an[j][1]:=false;
            l[j]:=false;
            break;
        end;
        if an[j][2] then  begin
            t:=a[j].h;
            an[j][2]:=false;
            l[j]:=false;
            break;
        end;
    end;
    for j:=1 to 6 do begin
        if l[j] and an[j][1] and ((t=a[j].w)) then begin
            an[j][1]:=false;
            inc(c[i]);
            l[j]:=false;
        end;
        if l[j] and an[j][2] and ((t=a[j].h)) then begin
            an[j][2]:=false;
            inc(c[i]);
            l[j]:=false;
        end;
        if c[i]=3 then break;
    end;
    if c[i]=3 then inc(i)
    else f:=false;
end;

i:=1;
fillchar(c,sizeof(c),0);
fillchar(l,sizeof(l),true);
while (i<=3)and f do begin
    for j:=1 to 6 do begin
        if l[j] then begin
            x:=a[j].w;
            t:=a[j].w;
            y:=a[j].h;

            l[j]:=false;
            inc(c[i]);
            break;
        end;
    end;
    for j:=1 to 6 do begin
        if l[j] then
            if ((x=a[j].w) and (y=a[j].h))or
                ((x=a[j].h)and(y=a[j].w)) then begin
                inc(c[i]);
                l[j]:=false;
                if(c[i]=2)then break;
            end;
    end;
    if c[i]=2 then inc(i)
    else f:=false;
end;
End;
{===============================================================================}
begin
assign(input,'box.in');reset(input);
assign(output,'box.out');rewrite(output);
load;
Compute;

if f then writeln(pos)
    else writeln(im);

close(input);close(output);
end.
