var
   i,j,k,l              :integer;
   x                    :array[1..10,1..3]of integer;
   control             :array[1..10]of integer;
   size                 :integer;
procedure check;
var j:integer;
    test:integer;
begin
   test:=0;
   for j:=1 to 6 do
   begin
      if x[i,1]=control[j] then
      begin
         test:=1;
         break;
      end;
   end;
   if test=0 then
   begin
      inc(size);
      control[size]:=x[i,1];
   end;

   test:=0;
   for j:=1 to 6 do
   begin
      if x[i,2]=control[j] then
      begin
         test:=1;
         break;
      end;
   end;
   if test=0 then
   begin
      inc(size);
      control[size]:=x[i,2];
   end;

end;
procedure readfile;
begin
   assign(input,'box.in');
   assign(output,'box.out');
   reset(input);
   rewrite(output);
   for i:=1 to 6 do
   begin
      readln(x[i,1],x[i,2]);
      check;
   end;
end;
begin
   readfile;
   if size>3 then
   begin
   write('IMPOSSIBLE');
   close(input);
   close(output);
   halt;
   end;
   for i:=1 to 6 do
   begin
    if x[i,3]<>2 then
    begin
    x[i,3]:=1;
      for j:=1 to 6 do
      begin
         if (x[j,3]<>1)and(x[j,3]<>2) then
         begin
            if ((x[j,1]=x[i,1])and(x[j,2]=x[i,2]))or((x[j,1]=x[i,2])and(x[j,2]=x[i,1]))then
            begin
               x[i,3]:=2;
               x[j,3]:=2;
            end;
         end;
      end;
      if x[i,3]=1 then x[i,3]:=0;
    end;  
   end;
   for i:=1 to 6 do
   begin
      if x[i,3]<>2 then
      begin
         write('IMPOSSIBLE');
         close(input);
         close(output);
         halt;
      end;
   end;
   write('POSSIBLE');
   close(input);
   close(output);
end.
