#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 7;
bool nprime[N];
vector<int> vec;
void sieve() {
  for (int i = 2; i < N; i++) {
    if (nprime[i]) continue;
    vec.push_back(i);
    for (int j = i * 2; j < N; j += i) nprime[j] = 1;
  }
}
int main() {
  ios::sync_with_stdio(0);
  int n;
  vector<int> ans;
  cin >> n;
  sieve();
  for (int i = 0; i < vec.size(); i++) {
    for (int j = vec[i]; j <= n; j *= vec[i]) ans.push_back(j);
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << ' ';
  cout << endl;
  return 0;
}
