using System;
public class Program
{
public static void Main()
int n = int.Parse(Console.ReadLine());
for (int i = 2; i <= n; i++)
if (i%2!= 0 && i%3!= 0 && i%5!=0 && i%7!= 0)
Console.WriteLine(i);
}
else if (i==2 || i==3 || i==5 || i==7)