var n,i:integer;
function simply (n:integer):boolean;
var i,m:integer;
flag:boolean;
begin
if (n<2) <strong>then flag:=false else flag:=true;
m:=round(sqrt(n));
for i:=2 to m do
if (n mod i = 0) then
begin
flag:=false;
break;
end;
simply:=flag;
end;
begin
readln (n);
for i:=2 to n do
if (simply(i)) then write (i,' ');
end.