program Project1;

{$APPTYPE CONSOLE}
var
  i,j, s, max: integer;
  w: array [1..6] of integer;
  h,chek: array [1..6] of integer;
  a,b,c, a1,b1,c1: Integer;
  bool:Boolean;
begin
  Assign(Input, 'box.in');
  Assign(Output, 'box.out');
  s:=0;
  for i:=1 to 6 do
    begin
     readln(w[i], h[i]);
     chek[i]:=0;
    end;

  for i:=1 to 6 do
  begin
   if (chek[i] <> 1) then begin
   for j:=1 to 6 do
   begin
     if (i<>j) then begin
     if (chek[j] <> 1) then begin
     if  ((w[i] = w[j]) and (h[i] = h[j])) or ((w[i] = h[j]) and (w[j] = h[i]))   then
     begin
       inc(s);
       chek[i]:= 1;
       chek[j]:= 1;
       break;
     end;
    end;
   end;
   end;
   end;
  end;

  a:=0; b:=0; c:=0;
  a1:=0; b1:=0; c1:=0;
  a:=w[1];
  for i:=1 to 6 do begin
     if (w[i] <> a) then begin b := w[i]; break; end;
     if (h[i] <> a) then begin b := h[i]; break; end;
  end;
  for i:=1 to 6 do begin
     if (w[i] <> a) and (w[i] <> b)then begin c := w[i]; break; end;
     if (h[i] <> a) and (h[i] <> b)then begin c := h[i]; break; end;
  end;

  for i:=1 to 6 do begin
     if (h[i] = a) then inc(a1);
     if (w[i] = a ) then inc(a1);
     if (h[i] = b) then inc(b1);
     if (w[i] = b) then inc(b1);
     if (h[i] = c) then inc(c1);
     if (w[i] = c ) then inc(c1);
  end;
  if (a1 mod 4 = 0) then
  if (b1 mod 4 = 0) then
  if (c1 mod 4 = 0) then
  if (a1+b1+c1 = 12) and (s=3) then
     begin
     write('POSSIBLE');
     close(Input);
     close(Output);
     halt;
     end ;
  write('IMPOSSIBLE');
  close(Input);
  close(Output);
end.


