Var
i,n,j:integer;kt:boolean;
Begin
Readln(n);
For i:=2 to n do
Begin
kt:=true;
For j:=2 to i-1 do
If i mod j=0 then kt:=false;
If kt=true then write(i,' ');
end;
readln
End.
Var
i,n,j:integer;kt:boolean;
Begin
Readln(n);
For i:=2 to n do
Begin
kt:=true;
For j:=2 to i-1 do
If i mod j=0 then kt:=false;
If kt=true then write(i,' ');
end;
readln
End.
Function ktnt(x:int64):boolean;
var i:int64;
Begin
If x<2 then exit(false);
If (x=2) or (x=3) then exit(true);
If (x mod 2 =0) or (x mod 3=0) then exit(false);
i:=5;
While i<=trunc(sqrt(x)) do
If (x mod i=0) or (x mod i+2=0) then exit(false)
Else inc(i,6);
Exit(true);
End;
var n,i:longint;
Begin
Assign(input,'ngthgilinh.inp');reset(input);
Assign(output,'ngthgilinh.out');rewrite(output);
Read(n);
For i:=1 to n do
If ktnt(i) then write(i,' ');
End.
Function ktnt(x:int64):boolean;
var i:int64;
Begin
If x<2 then exit(false);
If (x=2) or (x=3) then exit(true);
If (x mod 2 =0) or (x mod 3=0) then exit(false);
i:=5;
While i<=trunc(sqrt(x)) do
If (x mod i=0) or (x mod i+2=0) then exit(false)
Else inc(i,6);
Exit(true);
End;
var n,i:longint;
Begin
Assign(input,'ngthgilinh.inp');reset(input);
Assign(output,'ngthgilinh.out');rewrite(output);
Read(n);
For i:=1 to n do
If ktnt(i) then write(i,' ');
End.