program maxfact (input,output); var N , i, j ,m : integer; a : array [1..5000000] of boolean; begin read(N); for i:=1 to N do a[i]:=true; m:=trunc(sqrt(N)); for i:=2 to m do for j:=2 to m do a[i*j]:=false; for i:=1 to N do begin if (a[i]=true) then write(a[i], ' ') end; end.