#include <iostream>
using namespace std;
int a[2005];
int main(){
int n;
cin >> n;
for(int i = 1; i <= n; i++){
a[i] = 1;
}
for(int i = 1; i <= n; i++){
for(int j = 1; j <= n; j++){
if(j % i == 0){
if(a[i] == 1){
a[i] = 0;
}else if(a[i] == 0){
a[i] == 1;
}
}
}
}
for(int i = 1; i <= n; i++){
if(a[i] == 0){
cout << i << " ";
}
}
return 0;
}