#include <bits/stdc++.h>
using namespace std;
int main() {
  int h;
  cin >> h;
  if (h < 2) {
    cout << "0";
    return 0;
  }
  int l = 0, i, j;
  vector<int> v, o;
  v.push_back(2);
  for (i = 3; i < 1000; i++) {
    l = 0;
    for (j = 2; j < i; j++) {
      if (i % j == 0) {
        l++;
      }
    }
    if (l == 0) {
      v.push_back(j);
    }
  }
  int k = 0;
  l = 1;
  for (i = 0; v[i] <= h; i++) {
    l = 1;
    while (pow(v[i], l) <= h) {
      o.push_back(pow(v[i], l));
      l++;
    }
  }
  cout << o.size() << endl;
  for (i = 0; i < o.size(); i++) {
    cout << o[i] << " ";
  }
  return 0;
}
