#include <iostream>
#include <vector>
using namespace std;

int main () {
    int n;
    cin >> n;
    vector <int> s (n);
    for (int i = 2; i * i < n; i++)
        if (!s[i])
            for (int j = i * i; j < n; j += i)
                s[j] = 1;
    for (int i = 2; i < n; i++)
        if (!s[i])
            cout << i << endl;
    return 0;
}
