#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const int N = 1e3 + 5;
bool prime[N];
int A[N];
vector<int> g[N];
void seive() {
  memset(prime, true, sizeof(prime));
  for (int i = 2; i * i < N; i++) {
    if (prime[i] == true) {
      for (int j = 2 * i; j < N; j += i) {
        prime[j] = false;
      }
    }
  }
  for (int i = 2; i < N; i++) {
    if (prime[i] == false) continue;
    for (int j = i; j < N; j += i) g[j].push_back(i);
  }
}
int main() {
  int n;
  scanf("%d", &n);
  seive();
  for (int i = 2; i <= n; i++) {
    int t = i;
    for (int x : g[i]) {
      int ret = 0;
      while (t % x == 0) {
        ret += 1;
        t /= x;
      }
      A[x] = max(A[x], ret);
    }
  }
  set<int> second;
  for (int i = 2; i <= n; i++) {
    if (prime[i] == false) continue;
    if (A[i] == 0) continue;
    int ret = i;
    for (int j = 0; j < (A[i] - 1); j++) {
      second.insert(ret);
      ret = ret * i;
    }
    second.insert(ret);
  }
  printf("%d\n", second.size());
  for (int x : second) {
    cout << x << " ";
  }
  cout << endl;
  return 0;
}
