program b_1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
   a:array[1..6,1..2] of integer;
   b:array[1..3,1..2] of integer;
   k,t:integer;
   i,j:integer;
   s:string;
begin
   assign(input,'box.in');
   assign(output,'box.out');
   reset(input);
   rewrite(output);

   s:='POSSIBLE';
   for i:=1 to 6 do begin
      read(a[i,1], a[i,2]);
      if a[i,1]>a[i,2] then begin
         k:=a[i,1];
         a[i,1]:=a[i,2];
         a[i,2]:=k;
      end;
   end;



   for i:=1 to 6 do
    for j:= 1 to 6 do
     if a[i,1]<a[j,1] then
       begin t:=a[i,1]; a[i,1]:=a[j,1]; a[j,1]:=t;
             t:=a[i,2]; a[i,2]:=a[j,2]; a[j,2]:=t;
       end;

   for i:=1 to 6 do
    for j:= 1 to 6 do
     if (a[i,1]=a[j,1]) and (a[i,2] < a[j,2]) then
       begin t:=a[i,1]; a[i,1]:=a[j,1]; a[j,1]:=t;
             t:=a[i,2]; a[i,2]:=a[j,2]; a[j,2]:=t;
       end;





   if (a[1,1]<>a[2,1]) or (a[1,2]<>a[2,2]) then s:='IMPOSSIBLE';
   if (a[3,1]<>a[4,1]) or (a[3,2]<>a[4,2]) then s:='IMPOSSIBLE';
   if (a[5,1]<>a[6,1]) or (a[5,2]<>a[6,2]) then s:='IMPOSSIBLE';

   if (a[1,1]<>a[3,1]) or (a[1,2]<>a[5,1]) then s:='IMPOSSIBLE';
   if (a[3,2]<>a[5,2]) then s:='IMPOSSIBLE';

   write(s);
   close(input);
   close(output);

end.
