#include<stdio.h> //写代码最重要的思想就是分工;尽量先写步骤思路,再去实现
int main()
{
int a, b, n;int count = 0;
while (~scanf("%d", &n))
{
int arr[100] = { 0 };
for (int i = 2; i < n; i++)
{
arr[i - 2] = i;
}
for (a = 2; a < n; a++)
{
for (b = a - 1; b < n - 2; b++)
{
if (arr[b] % (a ) == 0)
{
arr[b] = 0;
}
}
}if (a == n)
{
for (int c = 0; c < n - 2; c++)
{
if (arr[c] != 0)
printf("%d ", arr[c]);
else
count++;
}printf("\n%d",count+1);
}
}
return 0;
}
int main()
{
int a, b, n;int count = 0;
while (~scanf("%d", &n))
{
int arr[100] = { 0 };
for (int i = 2; i < n; i++)
{
arr[i - 2] = i;
}
for (a = 2; a < n; a++)
{
for (b = a - 1; b < n - 2; b++)
{
if (arr[b] % (a ) == 0)
{
arr[b] = 0;
}
}
}if (a == n)
{
for (int c = 0; c < n - 2; c++)
{
if (arr[c] != 0)
printf("%d ", arr[c]);
else
count++;
}printf("\n%d",count+1);
}
}
return 0;
}