program Project1;

{$APPTYPE CONSOLE}
var
  i,j, s, max: integer;
  w: array [1..6] of integer;
  h,chek: array [1..6] of integer;


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;

     end;
    end;
   end;
   end;
   end;
  end;
     if (s = 3) then
          write('POSSIBLE')
         else
           write('IMPOSSIBLE');
     close(Input);
     close(Output);

     end.


