#include <bits/stdc++.h>
using namespace std;
int n, k, p[1005];
set<int> y;
void sieve() {
  memset(p, 1, sizeof(p));
  for (int i = 2; i <= 32; i++) {
    if (p[i]) {
      for (int j = i * i; j <= 1000; j += i) p[j] = 0;
    }
  }
}
int main() {
  sieve();
  cin >> n;
  for (int i = 2; i <= n; i++) {
    if (p[i]) {
      for (int j = i; j <= n; j *= i) y.insert(j);
    }
  }
  cout << y.size() << endl;
  for (int i : y) cout << i << " ";
  return 0;
}
