{$APPTYPE CONSOLE}
const
    _fin='box.in';
    _fout='box.out';

var
    sz:array[1..6,1..2] of longint;
    s:array[1..6] of longint;
    zz:array[1..6,1..6] of longint;
    tt,j,c,a,b,i:longint;
    res,z:boolean;
function min(a,b:longint):longint;
begin
    if a<b then min:=a else min:=b;
end;

function max(a,b:longint):longint;
begin
    if a>b then max:=a else max:=b;
end;

procedure  process;
var i,s:longint;
begin
    if c>3 then begin
        res:=false;
        exit;
    end;
    fillchar(zz,sizeof(zz),0);
    for i:=1 to 6 do
    begin
        inc(zz[sz[i,1],sz[i,2]]);
        if sz[i,1]<>sz[i,2] then
        inc(zz[sz[i,2],sz[i,1]]);
    end;
    for i:=1 to c do
    begin
        s:=0;
        for j:=1 to c do
        begin
            s:=s+zz[i,j];
            if odd(zz[i,j]) then begin
                res:=false;
                exit;
            end;
        end;
        if (s<>4)and(s<>6) then   begin
                res:=false;
                exit;
            end;
    end;
    res:=true;
end;
begin
    assign(input,_fin);reset(input);
    c:=0;
    for i:=1 to 6 do
    begin
        read(a,b);
        z:=false;
        for j:=1 to c do
            if s[j]=a then begin z:=true;tt:=j;break;end;
        if not z then begin
            inc(c);s[c]:=a;tt:=c;end;
        sz[i,1]:=tt;
        z:=false;
        for j:=1 to c do
            if s[j]=b then begin z:=true;tt:=j;break;end;
        if not z then begin
            inc(c);s[c]:=b;tt:=c;end;
        sz[i,2]:=tt;
    end;
    close(input);
    process;
    assign(output,_fout);rewrite(output);
    if res then writeln('POSSIBLE') else
        writeln('IMPOSSIBLE');
    close(output);
end.