#include <stdio.h> int main() { int num = 0; while (scanf("%d", &num) != EOF) { int arr[100] = {0}; for (int i = 0; i < num - 1; i++) { arr[i] = 2 + i; } int sum = 0; for (int i = 2; i < num;i++) { for (int j = num - 2; j > 0; j--) { if (arr[j] != 0 && arr[j] != i && arr[j] % i == 0) { arr[j] = 0; sum++; } } } for (int i = 0; i < num - 1; i++) { if (arr[i] != 0) { printf("%d ",arr[i]); } } printf("\n%d",sum); } return 0; }