program B;

{$APPTYPE CONSOLE}
var
 a :array[1..6, 1..2] of LongInt;
 wa : array[1..3] of LongInt;
 k : array[1..3, 1..3] of LongInt;
 nwa : LongInt;
 Cyc1, Cyc2, Cyc3 : Integer;
 res : boolean;
 begin
 FillChar(a, Sizeof(a), $00);
 FillChar(wa, Sizeof(wa), $00);
 FillChar(k, Sizeof(k), $00);
 res := true;
  Assign(Input, 'box.in'); //box
  Reset(Input);
  Assign(Output, 'box.out');
  Rewrite(Output);
  for Cyc1 := 1 to 6 do
  begin
   for Cyc2 := 1 to 2 do
	begin
	 Read(a[Cyc1, Cyc2]);
	 if (nwa = 0) then
	 begin
	  nwa := nwa + 1;
	  wa[nwa] := a[Cyc1, Cyc2];
	 end
	 else
	 if (nwa = 1) and (wa[1] <> a[Cyc1, Cyc2]) then
	 begin
	  nwa := nwa + 1;
	  wa[nwa] := a[Cyc1, Cyc2];
	 end
	 else
	 if (nwa = 2) and (wa[1] <> a[Cyc1, Cyc2]) and (wa[2] <> a[Cyc1, Cyc2]) then
	 begin
	  nwa := nwa + 1;
	  wa[nwa] := a[Cyc1, Cyc2];
	 end;
	end;

   for Cyc2 := 1 to nwa do
	if (a[Cyc1][1] = wa[cyc2]) then
	 for Cyc3 := 1 to nwa do
	  if (a[Cyc1][2] = wa[cyc3]) then
		k[Cyc2, cyc3] := k[Cyc2, Cyc3] + 1;
  end;

  if (nwa = 1) then
   Res := (k[1,1] = 6)
  else
  if (nwa = 2) then
   Res := ((k[1,1] = 2) and (k[1,2]+k[2,1] = 4)) or ((k[2,2] = 2) and (k[1,2]+k[2,1] = 4))
  else
  if (nwa = 3) then
   Res := (k[1,1] = 0) and (k[1,2] + k[2,1] = 2) and (k[1,3] + k[3, 1] = 2)
   and (k[2,2] = 0) and (k[2,3] + k[3, 2] = 2) and (k[3,3] = 0);
  if (res) then
   Write('POSSIBLE')
  else
   Write('IMPOSSIBLE');




  Close(Input);
  Close(Output);
end.

