#include <cstdio>
#include <cstring>
const long long MaxNum=42467232;
bool isPrime[MaxNum];
long long prime[MaxNum];
long long total=0;
inline void seive(long long Max)
{
memset(isPrime,true,sizeof(isPrime));
memset(prime,0,sizeof(prime));
isPrime[0]=false ;
isPrime[1]=false ;
for(long long i=2;i<=Max;i++)
{
if(isPrime[i])
prime[++total]=i;
for(long long j=1;j<=total&&i*prime[j]<=Max;j++)
{
isPrime[i*prime[j]]=false;
if(!(i%prime[j]))break;
}
}
}
int main()
{
freopen("p_rime.in","r",stdin);
freopen("p_rime.out","w",stdout);
long long n;
scanf("%lld",&n);
seive(n);
for(long long i=1;i<=total;i++)
{
printf("%lld\n",prime[i]);
}
return 0 ;
}