uses crt;
var n,dem,i,t,j,kt:integer;
begin
clrscr;
readln(n);
dem:=0;
t:=0;
for i:=2 to n do
begin
kt:=0;
for j:=2 to trunc(sqrt(i)) do
if i mod j=0 then kt:=1;
if kt=0 then begin t:=t+i; dem:=dem+1; write(i:4); end;
end;
writeln;
writeln(dem);
writeln(t);
if (trunc(sqrt(t))=sqrt(t)) then writeln(t,' la so chinh phuong')
else writeln(t,' khong la so chinh phuong');
readln;
end.