program box;

{$APPTYPE CONSOLE}

type
	tRect	= record
   	x, y	: integer;
   end;

var
	i, n, j	: integer;
	a	: array [1..6] of tRect;
   r	: tRect;

begin
	assign(input, 'box.in');
   reset(input);
   assign(output, 'box.out');
   rewrite(output);

   for i := 1 to 6 do begin
   	readln(a[i].x, a[i].y);
      if a[i].x > a[i].y then begin
      	j := a[i].x;
         a[i].x := a[i].y;
         a[i].y := j;
      end;
   end;
   for i := 1 to 5 do
   	for j := i + 1 to 6 do
      	if (a[i].x > a[j].x) or (a[i].x = a[j].x) and (a[i].y > a[j].y) then begin
         	r := a[i];
            a[i] := a[j];
            a[j] := r;
         end;

   for i := 1 to 3 do
   	if (a[i*2 - 1].x <> a[i*2].x) or (a[i*2 - 1].y <> a[i*2].y) then begin
      	writeln('IMPOSSIBLE');
         halt;
      end;

   if (a[1].x = a[3].x) and (a[3].y = a[5].x) and (a[5].y = a[1].y) or
   	(a[1].x = a[3].x) and (a[3].y = a[5].y) and (a[5].x = a[1].y) or
   	(a[1].x = a[3].y) and (a[3].x = a[5].x) and (a[5].y = a[1].y) or
   	(a[1].x = a[3].y) and (a[3].x = a[5].y) and (a[5].x = a[1].y)
   then
     	writeln('POSSIBLE')
   else
     	writeln('IMPOSSIBLE');
end.
