#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
const int INF = (int)1e9;
const int SZ = (int)100001;
const double PI = 3.1415926535897932384626433832795;
set<double> ans;
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int k = i;
    int p = 2;
    while (k != 1) {
      int c = 0;
      while (k % p == 0) {
        c++;
        k /= p;
      }
      if (c) ans.insert(pow(p, c));
      p++;
    }
  }
  cout << ans.size() << "\n";
  for (int i : ans) cout << (int)i << " ";
  return 0;
}
