{$APPTYPE CONSOLE}
program box;

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

        for x:=1 to 6 do
        readln(a[1,x],a[2,x]);
end;
{******************}
procedure action;
begin
        ok:=false;

        for x:=1 to 5 do if (a[1,x]>0) then begin
                for y:=x+1 to 6 do begin
                        if (a[1,x]=a[1,y])and(a[2,x]=a[2,y]) then begin
                            a[2,y]:=0; a[1,y]:=0; break; end;

                        if (a[1,x]=a[2,y])and(a[2,x]=a[1,y]) then begin
                            a[2,y]:=0; a[1,y]:=0; break; end;
                end;
        end;

        for x:=1 to 2 do for y:=1 to 6 do if a[x,y]>0 then inc(count);
        if count>6 then exit;

        for x:=1 to 2 do
        for y:=1 to 6 do if a[x,y]>0 then begin
                count:=0;
                for i:=1 to 2 do
                for j:=1 to 6 do
                if (a[i,j]=a[x,y])and(i<>x) then begin
                        a[i,j]:=0;
                        a[x,y]:=0;
                        break;
                end;
        end;

        for x:=1 to 2 do for y:=1 to 6 do if a[x,y]>0 then exit;
        ok:=true;
end;
{******************}
procedure finish;
begin

        if not ok then writeln('IMPOSSIBLE')
        else           writeln('POSSIBLE');

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