program Project2;

{$APPTYPE CONSOLE}
type
    paral=record
      a,b:longint;
      end;
var
 f:array [1..6] of paral;
 i,k,cnt:longint;
 flag:boolean;
 s_out:string;
 label 1;
begin
 assign(input,'box.in');
 reset(input);
 assign(output,'box.out');
 rewrite(output);
 for i:=1 to 6 do
  readln(f[i].a,f[i].b);
 flag:=true;
 FOR I:=1 TO 6 DO
  begin
   cnt:=0;
   for k:=1 to 6 do
    begin
     if (f[i].a=f[k].a) or (f[i].a=f[k].b) then
                  begin
                   inc(cnt);
                  end;
{     if (f[i].a=f[k].b) then
                  begin
                   inc(cnt);
                  end;  }
    end;
   flag:=flag and (cnt mod 4=0) ;
   if cnt=6 then
     begin
      flag:=true;
      goto 1;
     end;
  cnt:=0;
  for k:=1 to 6 do
    begin
     if (f[i].b=f[k].a) or (f[i].b=f[k].b)then
                  begin
                   inc(cnt);
                  end;
{     if (f[i].b=f[k].b) then
                  begin
                   inc(cnt);
                  end;}
    end;
   flag:=flag and (cnt mod 4=0) ;
end;
1: if flag then s_out:='POSSIBLE' else s_out:='IMPOSSIBLE';
 writeln(s_out);
 close(input);
 close(output);
end.
