var
mas:array[1..1000000]of longint;
i,k,n,summa,j,kolvo:longint;
begin
write('n=');
read(n);
for i:= 3 to n do begin
summa:=0;
for k:=1 to n do begin
if i mod k=0 then
summa:=summa+1;
end;
if (summa=2) or (summa=1) then
kolvo:=kolvo+1;
for j:= i to i do
mas[j]:=i;
writeln('sredi ',n,' chisel:',kolvo,' prostih);
writeln('A imenno:');
for j:= 1 to n do
if mas[j]<>0 then
write(mas[j]:3);
end.
var
mas:array[1..1000000]of longint;
i,k,n,summa,j,kolvo:longint;
begin
write('n=');
read(n);
for i:= 3 to n do begin
summa:=0;
for k:=1 to n do begin
if i mod k=0 then
summa:=summa+1;
end;
if (summa=2) or (summa=1) then
begin
kolvo:=kolvo+1;
for j:= i to i do
mas[j]:=i;
end;
end;
writeln('sredi ',n,' chisel:',kolvo,' prostih);
writeln('A imenno:');
for j:= 1 to n do
if mas[j]<>0 then
write(mas[j]:3);
end.