#include <bits/stdc++.h>
using namespace std;
vector<int> vet;
bool prime(int x) {
  int c = 0;
  for (int i = 1; i <= x; i++)
    if (x % i == 0) c++;
  return c == 2;
}
void solve() {
  int n, ret = 0;
  scanf("%d", &n);
  for (int i = 2; i <= n; i++)
    if (prime(i)) {
      int x = n, y = 1;
      while (x >= i) x /= i, y *= i, vet.push_back(y);
    }
  printf("%d\n", (int)vet.size());
  for (int i = 0; i < (int)vet.size(); i++) printf("%d ", vet[i]);
}
int main() {
  solve();
  return 0;
}
