#include <iostream>
#include <math.h>
#include <fstream>
using namespace std;
int main()
{
	int n,i,j,ok;
	ifstream f1; f1.open("De001_2.inp");
	ofstream f2; f2.open("De001_2.out");
	f1>>n;
	f1.close();
	for(i==2;i<n;i++)
	{
		ok=1;
		for (j==2;j*j<=i;j++)
		{
			if (i%j==0){
				ok=0;break;
			}
		}
		if(ok==1)
		{
			f2<<i<<endl;
		}
	}
	f2.close();
	return 0;
}
