
{$APPTYPE CONSOLE}
const
 inp='box.in';
  out='box.out';
var
 a:array[1..6]of record
    i,j:integer;END;
 bol:boolean;

procedure init;
var i,k:integer;
 begin
  assign(input,inp);
   reset(input);
     for i:=1 to 6 do begin

      read(a[i].i,a[I].j);
      if a[i].i>a[i].j then begin
          k:=a[i].i;
           a[i].i:=a[i].j;
          a[i].j:=k;end;
     end;
   close(input);
end;
Procedure solve;
var c:array[1..6]of boolean;
i,j:integer;
begin
bol:=true;fillchar(c,sizeof(c),false);

 for i:=1 to 5 do
  if c[i]=false then
   for j:=i+1 to 6 do
    if c[j]=false then
     if (a[i].I=a[j].i)and(a[i].j=a[j].j) then begin
        c[i]:=true;c[j]:=true;end;

for i:=1 to 6 do
 if c[i]=false then bol:=false;
end;


procedure done;
begin
 assign(output,out);
  rewrite(output);
   if bol then write('POSSIBLE') ELSE WRITE('IMPOSSIBLE');
   
  close(output);
end;

begin
init;
 solve;
  done;
end.
 