program Project2;
uses
  SysUtils;
var     f1,f2:textfile;
        a,b:array of integer;
        a1,a2,b1,b2,c1,c2,i:integer;
label chiq,Impos;
begin
        setlength(a,7);
        setlength(b,7);
        assignfile(f1,'box.in');
        assignfile(f2,'box.out');
        reset(f1);
        rewrite(f2);
        a1:=1;
        b1:=0;
        c1:=0;
        for i:=1 to 6 do
        read(f1,a[i],b[i]);
        for i:=1 to 6 do
        begin
                if (a[i]>b[i]) then
                begin
                        a1:=a[i];
                        a[i]:=b[i];
                        b[i]:=a1;
                end;
        end;
//        for i:=1 to 6 do
//       writeln(f2,a[i],' ',b[i]);
        a1:=1;
        a2:=0;
        for i:=2 to 6 do
        begin
                if (a[i]=a[1]) and (b[i]=b[1]) then
                begin
                        a2:=i;
                end;
        end ;
        if a2=0 then goto Impos;
        if a2=2 then b1:=3;
        if a2>2 then b1:=2;
        b2:=0;
        for i:=2 to 6 do
        begin
                if ((not ((a1=i) or (b1=i))) and ((a[i]=a[b1]) and (b[i]=b[b1]))) then
                begin
                        b2:=i;
                end;
        end ;
        if b2=0 then goto Impos;
        for i:=2 to 6 do
        begin
                if (not ((a1=i) or (b1=i) or (b2=i)))then
                begin
                        c1:=i;
                end;
        end ;
        c2:=0;
        for i:=2 to 6 do
        begin
                if (not ((a1=i) or (b1=i) or (b2=i) or (c1=i)) and ((a[c1]=a[i]) and (b[c1]=b[i])))then
                begin
                        c2:=i;
                end;
        end ;
        if c2=0 then goto Impos;
        if (((a[a1]=a[c1]) and (b[a1]=b[c1])) or ((a[a1]=b[c1]) and (b[a1]=a[c1]))) then
                begin
                if  (((a[a1]=a[b1]) and (b[a1]=b[b1])) or ((a[a1]=b[b1]) and (b[a1]=a[b1]))) then
                        begin
                if (((a[b1]=a[c1]) and (b[b1]=b[c1])) or ((a[b1]=b[c1]) and (b[b1]=a[c1]))) then
                begin
                        write(f2,'POSSIBLE');
                        goto CHIQ;
                end;
                end;
        end;
        write(f2,'POSSIBLE');
        goto CHIQ;
Impos:  write(f2,'IMPOSSIBLE');
//        writeln(f2,a[a1],' ',b[a2]);
//        writeln(f2,a[b1],' ',b[b2]);
//        writeln(f2,a[c1],' ',b[c2]);
CHIQ:   closefile(f1);
        closefile(f2);
end.
