program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var q:array[1..6,1..2]of integer;w:array[1..12]of integer;
a,b,c,k,d,i,kk,j,s,s1,www,www1,aaa:integer;
minb,maxb,minx,maxx,min,max,minq,maxq:integer;
f,ff:text;
begin
min:=10000;   max:=0;
  { TODO -oUser -cConsole Main : Insert code here }
 assign(f,'box.in');reset(f);
 for i:=1 to 6 do
 begin
        readln(f,a,b);
        if a>b then begin c:=b; b:=a; a:=c; end;
        if b>max then max:=b;
        if a<min then min:=a;
        q[i,1]:=a;     q[i,2]:=b;
 end;
close(f);

//for i:=1 to 6 do
//writeln(q[i,1], q[i,2]); readln;

 assign(ff,'box.out');rewrite(ff);
for i:=1 to 6 do
    begin
        if q[i,1]=min then minq:=minq+1 else begin minb:=minb+1; minx:=q[i,1];end;
        if q[i,2]=max then maxq:=maxq+1 else begin maxb:=maxb+1; maxx:=q[i,2];end;
    end;

for i:=1  to 6 do
        begin
        if q[i,2]=min then www:=www+1;
        if q[i,1]=max then www1:=www1+1;
        end;

if (min=max) or ((((
                   (
                        (minq=4) and (maxq=4) and (minb=2) and (maxb=2)
                    )
                        and (minx=maxx)
                    )
                    )
                    )
    or ((((minq=6) and (maxq=4)) and (www=2)))
    or ((((maxq=6) and (minq=4)) and (www1=2))))
            then aaa:=1;


//writeln(min,' ', max,' ', minx,' ',maxx); readln;

     if aaa=1 then   writeln(ff,'POSSIBLE')

        else writeln(ff,'IMPOSSIBLE');

    close(ff);
end.
