#include <bits/stdc++.h>
int main() {
  int i, j, n, count;
  scanf("%d", &n);
  for (i = 2; i <= n; i++) {
    count = 0;
    for (j = 2; j < i; j++) {
      if (i % j == 0) {
        count++;
        break;
      }
    }
    if (count == 0) printf(" %d", i);
  }
  return 0;
}
