program optesprezece; var max, n,i,val:integer; 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; function numar(n:integer):integer; var a,i:integer; begin a:=0; for i:=2 to n-1 do if (n mod i=0) and (prim(i)=true) then a:=a+1; numar:=a; end; begin write ('n='); readln(n); max:=0; val:=0; for i:=2 to n-1 do if numar(i)>max then begin max:=numar(i); val:=i; end; writeln(val,' are un numar maxim de divozori proprii primi'); readln; end. end.