program SNT;
uses crt;
Var d, a, i, dea, j: Integer ;
begin
clrscr;
Write( ' Nhap a: '); Readln(a);
d:=0 ; Write( ' Cac so nguyen to: ' );
For i:=2 to a do
begin
dea:=0;
for J:=2 to ( i div 2) do;
if i mod j=0 then dea:=dea+1;
if dea=0 then Write(i,' ' );
end;
readln;
end.