#include <iostream>
#include <fstream>

using namespace std;

int main()
{
	ifstream input;
	ofstream output;
	int n;
	input.open("dnton.inp");
	input >> n;
	input.close();
	output.open("dnton.out");
	for (int i = 1; i <= n; i++)
	{
		int count = 0;
		for (int j = 1; j <= i; j++)
		{
			if (i % j == 0)
			{
				count++;
			}
		}
		if (count == 2)
		{
			output << i << endl;
		}
	}
	output.close();
	return 0;
}