Program HOC24;
const fi='dlv.inp';
fo='dulieura.out';
var f: text;
i,d,n: integer;
procedure ip;
begin
assign(f,fi);
reset(f);
read(f,n);
close(f);
end;
procedure out;
begin
assign(f,fo);
rewrite(f);
d:=0;
for i:=3 to n do if i=sqr(trunc(sqrt(i))) then d:=d+1;
writeln(f,d);
for i:=3 to n do if i=sqr(trunc(sqrt(i))) then write(f,i,' ');
close(f);
end;
begin
ip;
out;
end.