//http://znanija.com/task/19064777 var i,n: integer; function IsSimple(c: integer): boolean; var j: integer; begin IsSimple:=true; for j:=2 to c-1 do if c mod j=0 then IsSimple:=false; end; begin write('n='); readln(n); for i:=2 to n do if IsSimple(i) then write(i,' '); end.