#include <bits/stdc++.h>
using namespace std;
bool snt(int x)
{
    int i,dem=0;
    {
        for (i=2;i*i<=x;i++)
            if (x%i==0)
        {
            return false;
        }
        return true;
    }
}
int main ()
{
    freopen ("De001_2.inp","r",stdin);
    freopen ("De001_2.out","w",stdout);
    long int n,i,so=0;
    cin>>n;
    for(i=2;i<=n;i++)
        if (snt(i)==true)
    {
        cout << i << endl;
    }
    return 0;
}
