#include <bits/stdc++.h>
using namespace std;
vector<int> primes(1005, 0);
void precompute() {
  for (int i = 2; i < 1005; i++) {
    if (primes[i] == 0) {
      for (int j = i + i; j < 1005; j += i) primes[j] = i;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  int i, j, n;
  cin >> n;
  precompute();
  vector<int> ques;
  for (i = 2; i <= n; i++) {
    if (primes[i] == 0) {
      int var = n, xar = i;
      while (n / xar) {
        ques.emplace_back(xar);
        xar *= i;
      }
    }
  }
  cout << ques.size() << "\n";
  for (auto it : ques) cout << it << " ";
  cout << "\n";
  return 0;
}
