#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int n;
bool prime(int a) {
  if (a == 1) return false;
  for (int j = 2; j * j <= a; j++)
    if (a % j == 0) return false;
  return true;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int c = n;
    int ans = 1;
    if (prime(i)) {
      while (c >= i) {
        ans *= i;
        v.push_back(ans);
        c /= i;
      }
    }
  }
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  return 0;
}
