Program HOC24;
var i,n,d,max,m: integer;
begin
write('Nhap so nguyen duong N: '); readln(n);
d:=1;
write('a) Cac uoc cua so ',n,' la: ');
for i:=1 to n/2 do
if n mod i=0 then
begin
write(i,' ');
d:=d+1;
end;
writeln;
writeln('b) So uoc cua so nguyen duong ',n,' la: ',d);
max:=0; d:=0;
while (n>0) do
begin
for i:=1 to n/2 do if n mod 2=0 then d=d+1;
if d>=max then
begin
max=d;
m=n;
end;
write('So M nho nhat la: ',m);
readln
end.