program unu; var n,i,q:integer; f:text; function prim(n:integer):boolean; var i:integer; begin prim:=true; for i:=2 to n-1 do if n mod i=0 then prim:=false; end; begin assign(f,'out.txt'); rewrite(f); close(f); write('n='); readln(n); q:=0; for i:=1 to n do if n mod i=0 then begin append(f); write(f,i,' '); close(f); if (prim(i)=true) and(i>=2) then q:=q+1; end; append(f); writeln(f); write(f,q); close(f); end.