#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6;
const int MOD = 1e9 + 7;
vector<int> primes;
bool isPrime[1234];
void seive() {
  memset(isPrime, true, sizeof isPrime);
  isPrime[1] = false;
  for (int i = 2; i <= 100; i++) {
    if (isPrime[i]) {
      primes.push_back(i);
      for (int j = i * i; j <= 1000; j += i) isPrime[j] = false;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  seive();
  int N;
  cin >> N;
  vector<int> ans;
  for (int i = 1; i <= N; i++) {
    if (isPrime[i]) {
      int temp = 1;
      while (temp <= N / i) {
        temp *= i;
        ans.push_back(temp);
      }
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
