#include <bits/stdc++.h>
using namespace std;
int n, ans[1010], cnt;
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) {
    bool flag = 0;
    for (int j = 2; j * j <= i; j++) {
      if (i % j == 0) {
        flag = 1;
        break;
      }
    }
    if (flag) continue;
    for (int j = i; j <= n; j *= i) ans[++cnt] = j;
  }
  printf("%d\n", cnt);
  for (int i = 1; i <= cnt; i++) printf("%d ", ans[i]);
  return 0;
}
