#include <bits/stdc++.h>
const int N = 1000 + 5;
int ans[N], n, m;
int main() {
  scanf("%d", &n);
  m = 0;
  for (int i = 2; i <= n; ++i) {
    bool f = true;
    for (int j = 2; j < i; ++j)
      if (i % j == 0) f = false;
    if (f) {
      int j = i;
      while (j <= n) {
        ans[++m] = j;
        j *= i;
      }
    }
  }
  printf("%d\n", m);
  for (int i = 1; i <= m; ++i) {
    if (i > 1) printf(" ");
    printf("%d", ans[i]);
  }
  printf("\n");
  return 0;
}
